Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2020-03-05 10:43:01 +01:00
144 changed files with 3009 additions and 1035 deletions
+1 -1
View File
@@ -301,7 +301,7 @@ FlightModesType editFlightModes(coord_t x, coord_t y, event_t event, FlightModes
#endif
#define IS_MAIN_VIEW_DISPLAYED() menuHandlers[0] == menuMainView
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuViewTelemetryFrsky
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuViewTelemetry
#define IS_OTHER_VIEW_DISPLAYED() (menuHandlers[0] == menuMainViewChannelsMonitor || menuHandlers[0] == menuChannelsView)
#endif // _GUI_H_
+2 -2
View File
@@ -21,11 +21,11 @@
#include "opentx.h"
const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = {
menuRadioSetup,
menuRadioSdManager,
#if defined(LUA) || defined(PXX2)
menuRadioTools,
#endif
menuRadioSdManager,
menuRadioSetup,
menuRadioSpecialFunctions,
menuRadioTrainer,
menuRadioHardware,
+3 -3
View File
@@ -39,7 +39,7 @@ void menuFirstCalib(event_t event);
void menuMainViewChannelsMonitor(event_t event);
void menuChannelsView(event_t event);
void menuMainView(event_t event);
void menuViewTelemetryFrsky(event_t event);
void menuViewTelemetry(event_t event);
void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomFunctionsContext * functionsContext);
void menuModelNotes(event_t event);
void menuStatisticsView(event_t event);
@@ -52,11 +52,11 @@ void menuTraceBuffer(event_t event);
#endif
enum MenuRadioIndexes {
MENU_RADIO_SETUP,
MENU_RADIO_SD_MANAGER,
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE)
MENU_RADIO_TOOLS,
#endif
MENU_RADIO_SD_MANAGER,
MENU_RADIO_SETUP,
MENU_RADIO_SPECIAL_FUNCTIONS,
MENU_RADIO_TRAINER,
MENU_RADIO_HARDWARE,
+4
View File
@@ -86,6 +86,9 @@ void onLimitsMenu(const char *result)
copyTrimsToOffset(ch);
storageDirty(EE_MODEL);
}
else if (result == STR_COPY_MIN_MAX_TO_OUTPUTS) {
copyMinMaxToOutputs(ch);
}
}
void menuModelLimits(event_t event)
@@ -142,6 +145,7 @@ void menuModelLimits(event_t event)
POPUP_MENU_ADD_ITEM(STR_RESET);
POPUP_MENU_ADD_ITEM(STR_COPY_TRIMS_TO_OFS);
POPUP_MENU_ADD_ITEM(STR_COPY_STICKS_TO_OFS);
POPUP_MENU_ADD_ITEM(STR_COPY_MIN_MAX_TO_OUTPUTS);
POPUP_MENU_START(onLimitsMenu);
}
+1 -1
View File
@@ -353,7 +353,7 @@ void menuModelSetup(event_t event)
LABEL(InternalModule),
INTERNAL_MODULE_TYPE_ROWS,
MODULE_CHANNELS_ROWS(INTERNAL_MODULE),
IF_NOT_ACCESS_MODULE_RF(INTERNAL_MODULE, IF_INTERNAL_MODULE_ON(isModuleFailsafeAvailable(INTERNAL_MODULE) ? (uint8_t)2 : (uint8_t)1)),
IF_NOT_ACCESS_MODULE_RF(INTERNAL_MODULE, IF_INTERNAL_MODULE_ON(isModuleRangeAvailable(INTERNAL_MODULE)? (uint8_t)2 : (uint8_t)1)), // RxNum, Range check and Register buttons
IF_ACCESS_MODULE_RF(INTERNAL_MODULE, 0), // RxNum for ACCESS
IF_INTERNAL_MODULE_ON(FAILSAFE_ROWS(INTERNAL_MODULE)), // Failsafe
IF_ACCESS_MODULE_RF(INTERNAL_MODULE, 1), // Range check and Register buttons
+2 -2
View File
@@ -455,7 +455,7 @@ void menuMainView(event_t event)
break;
case EVT_KEY_LONG(KEY_MENU):
pushMenu(menuRadioSetup);
pushMenu(menuRadioTools);
killEvents(event);
break;
#endif
@@ -470,7 +470,7 @@ void menuMainView(event_t event)
break;
case EVT_KEY_LONG(KEY_PAGE):
chainMenu(menuViewTelemetryFrsky);
chainMenu(menuViewTelemetry);
killEvents(event);
break;
-62
View File
@@ -200,65 +200,3 @@ bool displayTelemetryScreen()
return true;
}
enum NavigationDirection {
none,
up,
down
};
#define decrTelemetryScreen() direction = up
#define incrTelemetryScreen() direction = down
void menuViewTelemetryFrsky(event_t event)
{
enum NavigationDirection direction = none;
switch (event) {
case EVT_KEY_FIRST(KEY_EXIT):
case EVT_KEY_LONG(KEY_EXIT):
killEvents(event);
chainMenu(menuMainView);
break;
case EVT_KEY_LONG(KEY_PAGE):
killEvents(event);
// no break;
case EVT_KEY_FIRST(KEY_UP):
decrTelemetryScreen();
break;
case EVT_KEY_BREAK(KEY_PAGE):
case EVT_KEY_FIRST(KEY_DOWN):
incrTelemetryScreen();
break;
case EVT_KEY_LONG(KEY_ENTER):
killEvents(event);
POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY);
POPUP_MENU_ADD_ITEM(STR_RESET_FLIGHT);
POPUP_MENU_START(onMainViewMenu);
break;
}
for (int i=0; i<=TELEMETRY_SCREEN_TYPE_MAX; i++) {
if (direction == up) {
if (s_frsky_view-- == 0)
s_frsky_view = TELEMETRY_VIEW_MAX;
}
else if (direction == down) {
if (s_frsky_view++ == TELEMETRY_VIEW_MAX)
s_frsky_view = 0;
}
else {
direction = down;
}
if (displayTelemetryScreen()) {
return;
}
}
drawTelemetryTopBar();
lcdDrawText(8*FW, 3*FH, "No Telemetry Screens");
displayRssiLine();
}