Massive cleaning (#5538)
[opentx.git] / radio / src / gui / 212x64 / menu_model.cpp
bloba7810b1315c67e431b968ccd27ca553fb370bb16
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #include "opentx.h"
23 const MenuHandlerFunc menuTabModel[] = {
24 menuModelSelect,
25 menuModelSetup,
26 CASE_HELI(menuModelHeli)
27 CASE_FLIGHT_MODES(menuModelFlightModesAll)
28 menuModelExposAll,
29 menuModelMixAll,
30 menuModelLimits,
31 CASE_CURVES(menuModelCurvesAll)
32 #if defined(GVARS) && defined(FLIGHT_MODES)
33 CASE_GVARS(menuModelGVars)
34 #endif
35 menuModelLogicalSwitches,
36 menuModelSpecialFunctions,
37 #if defined(LUA_MODEL_SCRIPTS)
38 menuModelCustomScripts,
39 #endif
40 CASE_FRSKY(menuModelTelemetryFrsky)
41 CASE_MAVLINK(menuModelTelemetryMavlink)
42 menuModelDisplay
45 uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay)
47 lcdDrawTextAlignedLeft(y, str);
48 lcdDrawNumber(MIXES_2ND_COLUMN, y, (10/DELAY_STEP)*delay, attr|PREC1|LEFT);
49 if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, delay, DELAY_MAX);
50 return delay;
53 #define COPY_MODE 1
54 #define MOVE_MODE 2
55 uint8_t s_copyMode = 0;
56 int8_t s_copySrcRow;
57 int8_t s_copyTgtOfs;
58 uint8_t s_maxLines = 8;
59 uint8_t s_copySrcIdx;
60 uint8_t s_copySrcCh;
62 uint8_t editNameCursorPos = 0;
64 void editSingleName(coord_t x, coord_t y, const pm_char * label, char *name, uint8_t size, event_t event, uint8_t active)
66 lcdDrawTextAlignedLeft(y, label);
67 editName(x, y, name, size, event, active);
70 uint8_t s_currIdx;