[Taranis] The menu arrays were duplicated

This commit is contained in:
Bertrand Songis
2016-07-04 21:34:21 +02:00
parent 1f15636ca4
commit e6c01cd140
3 changed files with 66 additions and 60 deletions
+12
View File
@@ -20,6 +20,18 @@
#include "opentx.h" #include "opentx.h"
const MenuHandlerFunc menuTabGeneral[] = {
menuGeneralSetup,
menuGeneralSdManager,
menuGeneralCustomFunctions,
menuGeneralTrainer,
menuGeneralVersion,
menuGeneralDiagKeys,
menuGeneralDiagAna,
menuGeneralHardware,
menuGeneralCalib
};
void menuGeneralCustomFunctions(uint8_t event) void menuGeneralCustomFunctions(uint8_t event)
{ {
MENU(STR_MENUGLOBALFUNCS, menuTabGeneral, e_GeneralCustomFunctions, NUM_CFN, { NAVIGATION_LINE_BY_LINE|4/*repeated*/ }); MENU(STR_MENUGLOBALFUNCS, menuTabGeneral, e_GeneralCustomFunctions, NUM_CFN, { NAVIGATION_LINE_BY_LINE|4/*repeated*/ });
+22
View File
@@ -20,6 +20,28 @@
#include "opentx.h" #include "opentx.h"
const MenuHandlerFunc menuTabModel[] = {
menuModelSelect,
menuModelSetup,
CASE_HELI(menuModelHeli)
CASE_FLIGHT_MODES(menuModelFlightModesAll)
menuModelExposAll,
menuModelMixAll,
menuModelLimits,
CASE_CURVES(menuModelCurvesAll)
#if defined(GVARS) && defined(FLIGHT_MODES)
CASE_GVARS(menuModelGVars)
#endif
menuModelLogicalSwitches,
menuModelCustomFunctions,
#if defined(LUA_MODEL_SCRIPTS)
menuModelCustomScripts,
#endif
menuModelTelemetry,
CASE_MAVLINK(menuTelemetryMavlinkSetup)
menuModelDisplay
};
#if MENU_COLUMNS > 1 #if MENU_COLUMNS > 1
uint8_t editDelay(const coord_t x, const coord_t y, const uint8_t event, const uint8_t attr, const pm_char *str, uint8_t delay) uint8_t editDelay(const coord_t x, const coord_t y, const uint8_t event, const uint8_t attr, const pm_char *str, uint8_t delay)
{ {
+32 -60
View File
@@ -68,33 +68,6 @@ void menuFirstCalib(uint8_t event);
void onMainViewMenu(const char *result); void onMainViewMenu(const char *result);
void menuModelSelect(uint8_t event);
void menuModelSetup(uint8_t event);
void menuModelHeli(uint8_t event);
void menuModelFlightModesAll(uint8_t event);
void menuModelExposAll(uint8_t event);
void menuModelMixAll(uint8_t event);
void menuModelLimits(uint8_t event);
void menuModelCurvesAll(uint8_t event);
void menuModelCurveOne(uint8_t event);
void menuModelGVars(uint8_t event);
void menuModelLogicalSwitches(uint8_t event);
void menuModelCustomFunctions(uint8_t event);
void menuModelCustomScripts(uint8_t event);
void menuModelTelemetry(uint8_t event);
void menuModelDisplay(uint8_t event);
void menuModelExpoOne(uint8_t event);
void menuGeneralSetup(uint8_t event);
void menuGeneralSdManager(uint8_t event);
void menuGeneralCustomFunctions(uint8_t event);
void menuGeneralTrainer(uint8_t event);
void menuGeneralVersion(uint8_t event);
void menuGeneralDiagKeys(uint8_t event);
void menuGeneralDiagAna(uint8_t event);
void menuGeneralHardware(uint8_t event);
void menuGeneralCalib(uint8_t event);
void menuMainViewChannelsMonitor(uint8_t event); void menuMainViewChannelsMonitor(uint8_t event);
void menuChannelsView(uint8_t event); void menuChannelsView(uint8_t event);
void menuMainView(uint8_t event); void menuMainView(uint8_t event);
@@ -119,20 +92,21 @@ enum EnumTabRadio {
e_Keys, e_Keys,
e_Ana, e_Ana,
e_Hardware, e_Hardware,
e_Calib e_Calib,
e_TabRadioPagesCount
}; };
const MenuHandlerFunc menuTabGeneral[] = { void menuGeneralSetup(uint8_t event);
menuGeneralSetup, void menuGeneralSdManager(uint8_t event);
menuGeneralSdManager, void menuGeneralCustomFunctions(uint8_t event);
menuGeneralCustomFunctions, void menuGeneralTrainer(uint8_t event);
menuGeneralTrainer, void menuGeneralVersion(uint8_t event);
menuGeneralVersion, void menuGeneralDiagKeys(uint8_t event);
menuGeneralDiagKeys, void menuGeneralDiagAna(uint8_t event);
menuGeneralDiagAna, void menuGeneralHardware(uint8_t event);
menuGeneralHardware, void menuGeneralCalib(uint8_t event);
menuGeneralCalib
}; extern const MenuHandlerFunc menuTabGeneral[e_TabRadioPagesCount];
enum EnumTabModel { enum EnumTabModel {
e_ModelSelect, e_ModelSelect,
@@ -152,29 +126,27 @@ enum EnumTabModel {
e_Telemetry, e_Telemetry,
CASE_MAVLINK(e_MavSetup) CASE_MAVLINK(e_MavSetup)
e_Display, e_Display,
e_TabModelPagesCount
}; };
const MenuHandlerFunc menuTabModel[] = { void menuModelSelect(uint8_t event);
menuModelSelect, void menuModelSetup(uint8_t event);
menuModelSetup, void menuModelHeli(uint8_t event);
CASE_HELI(menuModelHeli) void menuModelFlightModesAll(uint8_t event);
CASE_FLIGHT_MODES(menuModelFlightModesAll) void menuModelExposAll(uint8_t event);
menuModelExposAll, void menuModelMixAll(uint8_t event);
menuModelMixAll, void menuModelLimits(uint8_t event);
menuModelLimits, void menuModelCurvesAll(uint8_t event);
CASE_CURVES(menuModelCurvesAll) void menuModelCurveOne(uint8_t event);
#if defined(GVARS) && defined(FLIGHT_MODES) void menuModelGVars(uint8_t event);
CASE_GVARS(menuModelGVars) void menuModelLogicalSwitches(uint8_t event);
#endif void menuModelCustomFunctions(uint8_t event);
menuModelLogicalSwitches, void menuModelCustomScripts(uint8_t event);
menuModelCustomFunctions, void menuModelTelemetry(uint8_t event);
#if defined(LUA_MODEL_SCRIPTS) void menuModelDisplay(uint8_t event);
menuModelCustomScripts, void menuModelExpoOne(uint8_t event);
#endif
menuModelTelemetry, extern const MenuHandlerFunc menuTabModel[e_TabModelPagesCount];
CASE_MAVLINK(menuTelemetryMavlinkSetup)
menuModelDisplay
};
void drawSlider(coord_t x, coord_t y, uint8_t value, uint8_t max, uint8_t attr); void drawSlider(coord_t x, coord_t y, uint8_t value, uint8_t max, uint8_t attr);