diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index 41ae901b4..b44b6b92d 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -869,6 +869,9 @@ enum menuModelSetupItems { ITEM_MODEL_THROTTLE_TRACE, ITEM_MODEL_THROTTLE_TRIM, ITEM_MODEL_THROTTLE_WARNING, +#if defined(PCBTARANIS) + ITEM_MODEL_CHECKLIST_DISPLAY, +#endif ITEM_MODEL_SWITCHES_WARNING, CASE_PCBTARANIS(ITEM_MODEL_POT_WARNING) ITEM_MODEL_BEEP_CENTER, @@ -956,7 +959,7 @@ void menuModelSetup(uint8_t event) #define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0) bool CURSOR_ON_CELL = (m_posHorz >= 0); - MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 7, POT_WARN_ITEMS(), NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)}); + MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, CASE_PCBTARANIS(0) 7, POT_WARN_ITEMS(), NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)}); #elif defined(CPUM64) #define CURSOR_ON_CELL (true) #define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX) @@ -1137,6 +1140,12 @@ void menuModelSetup(uint8_t event) case ITEM_MODEL_THROTTLE_WARNING: g_model.disableThrottleWarning = !onoffMenuItem(!g_model.disableThrottleWarning, MODEL_SETUP_2ND_COLUMN, y, STR_THROTTLEWARNING, attr, event); break; + +#if defined(PCBTARANIS) + case ITEM_MODEL_CHECKLIST_DISPLAY: + g_model.displayText = onoffMenuItem(g_model.displayText, MODEL_SETUP_2ND_COLUMN, y, STR_CHECKLIST, attr, event); + break; +#endif case ITEM_MODEL_SWITCHES_WARNING: { diff --git a/radio/src/gui/menus.h b/radio/src/gui/menus.h index 891267ac1..50c097337 100644 --- a/radio/src/gui/menus.h +++ b/radio/src/gui/menus.h @@ -369,6 +369,7 @@ void displayWarning(uint8_t event); #if defined(PCBTARANIS) void menuChannelsView(uint8_t event); void pushMenuTextView(const char *filename); +bool modelHasNotes(); #endif #define LABEL(...) (uint8_t)-1 diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 5191c1fb1..a0da724b6 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -2114,6 +2114,16 @@ void checkAll() checkTHR(); checkSwitches(); + +#if defined(PCBTARANIS) + if (modelHasNotes() && g_model.displayText) { + char filename[sizeof(MODELS_PATH)+1+sizeof(g_model.header.name)+sizeof(TEXT_EXT)] = MODELS_PATH "/"; + char *buf = strcat_modelname(&filename[sizeof(MODELS_PATH)], g_eeGeneral.currModel); + strcpy(buf, TEXT_EXT); + pushMenuTextView(filename); + } +#endif + clearKeyEvents(); } diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 4327afedf..98a09f777 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -488,6 +488,7 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text"; const pm_char STR_VIEW_CHANNELS[] PROGMEM = "View Channels"; const pm_char STR_VIEW_NOTES[] PROGMEM = "View Notes"; const pm_char STR_POTWARNING[] PROGMEM = TR_POTWARNING; + const pm_char STR_CHECKLIST[] PROGMEM = TR_CHECKLIST; #endif #if MENUS_LOCK == 1 diff --git a/radio/src/translations.h b/radio/src/translations.h index 2c17f5f5f..c21004212 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -669,6 +669,7 @@ extern const pm_char STR_VIEW_TEXT[]; extern const pm_char STR_VIEW_CHANNELS[]; extern const pm_char STR_VIEW_NOTES[]; extern const pm_char STR_POTWARNING[]; + extern const pm_char STR_CHECKLIST[]; #endif #if MENUS_LOCK == 1 diff --git a/radio/src/translations/cz.h b/radio/src/translations/cz.h index c755b1ea2..e46a43802 100644 --- a/radio/src/translations/cz.h +++ b/radio/src/translations/cz.h @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "N\204zk\212 Alarm" #define TR_CRITICALALARM INDENT "Kritick\212 Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index da208deb5..1930e080c 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Nízký Alarm" #define TR_CRITICALALARM INDENT "Kritický Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h index 676f50753..b864488b9 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/en.h @@ -668,6 +668,7 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/es.h b/radio/src/translations/es.h index 01bf2230b..dd32a5f36 100644 --- a/radio/src/translations/es.h +++ b/radio/src/translations/es.h @@ -661,7 +661,7 @@ #define TR_LOWALARM INDENT "Alarma baja" #define TR_CRITICALALARM INDENT "Alarma Critica" #define TR_PERSISTENT_MAH INDENT "Valor mAh" -#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index d22c7d7ad..da487df5f 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -661,7 +661,7 @@ #define TR_LOWALARM INDENT "Alarma baja" #define TR_CRITICALALARM INDENT "Alarma Critica" #define TR_PERSISTENT_MAH INDENT "Valor mAh" -#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/fr.h b/radio/src/translations/fr.h index 206b75ff1..9b758246a 100644 --- a/radio/src/translations/fr.h +++ b/radio/src/translations/fr.h @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Alarme basse" #define TR_CRITICALALARM INDENT "Alarme critique" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Afficher notes" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 29227323c..b6a9aeba4 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Alarme basse" #define TR_CRITICALALARM INDENT "Alarme critique" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Afficher notes" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/it.h b/radio/src/translations/it.h index 9febcb4ac..aeab9bd89 100644 --- a/radio/src/translations/it.h +++ b/radio/src/translations/it.h @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Allarme Basso" #define TR_CRITICALALARM INDENT "Allarme Critico" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index aaac01d6b..4ddc543a0 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Allarme Basso" #define TR_CRITICALALARM INDENT "Allarme Critico" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/pl.h b/radio/src/translations/pl.h index ced420977..ab68d3f2f 100644 --- a/radio/src/translations/pl.h +++ b/radio/src/translations/pl.h @@ -662,6 +662,7 @@ #define TR_LOWALARM INDENT "Alarm niski" #define TR_CRITICALALARM INDENT "Alarm krytyczny" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index 5530cd50a..89affe3e0 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -662,6 +662,7 @@ #define TR_LOWALARM INDENT "Alarm niski" #define TR_CRITICALALARM INDENT "Alarm krytyczny" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/pt.h b/radio/src/translations/pt.h index 0b6748e88..fe9c983d4 100644 --- a/radio/src/translations/pt.h +++ b/radio/src/translations/pt.h @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index 0b6748e88..fe9c983d4 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -661,6 +661,7 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/se.h b/radio/src/translations/se.h index 279afdbcb..4faac910c 100644 --- a/radio/src/translations/se.h +++ b/radio/src/translations/se.h @@ -664,6 +664,7 @@ #define TR_LOWALARM INDENT "L\200g-alarm" #define TR_CRITICALALARM INDENT "Kritiskt alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index 72c7aab93..c579bc219 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -664,6 +664,7 @@ #define TR_LOWALARM INDENT "Låg-alarm" #define TR_CRITICALALARM INDENT "Kritiskt alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"