# HG changeset patch # User heinrichsweikamp # Date 1682063226 -7200 # Node ID 6b248bcdbf28ff94a56a2dcf81422ffb9a07803b # Parent dfdfea8897f31b32c64f3ef9b9a64d688e37f0ed Deactivation of the 'fallback' option when the CCR mode is set to 'Fixed' - this makes it a little clearer that the option has no influence in this mode. diff -r dfdfea8897f3 -r 6b248bcdbf28 Discovery/Src/tMenuEditXtra.c --- a/Discovery/Src/tMenuEditXtra.c Thu Apr 13 09:35:43 2023 +0200 +++ b/Discovery/Src/tMenuEditXtra.c Fri Apr 21 09:47:06 2023 +0200 @@ -79,7 +79,6 @@ { set_globalState_Menu_Line(line); - /* DIVE MODE */ if(actual_menu_content != MENU_SURFACE) { @@ -114,7 +113,7 @@ } else /* surface mode */ { - if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3)) /* PSCR items are only optional */ + if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3)) /* PSCR items are only optional */ { line = 6; } @@ -192,14 +191,10 @@ SSettings *pSettings = settingsGetPointer(); - if(pSettings->fallbackToFixedSetpoint == 0) - { - pSettings->fallbackToFixedSetpoint = 1; + if (pSettings->CCR_Mode == CCRMODE_Sensors) { + pSettings->fallbackToFixedSetpoint = (pSettings->fallbackToFixedSetpoint + 1) % 2; } - else - { - pSettings->fallbackToFixedSetpoint = 0; - } + exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); } diff -r dfdfea8897f3 -r 6b248bcdbf28 Discovery/Src/tMenuXtra.c --- a/Discovery/Src/tMenuXtra.c Thu Apr 13 09:35:43 2023 +0200 +++ b/Discovery/Src/tMenuXtra.c Fri Apr 21 09:47:06 2023 +0200 @@ -29,6 +29,7 @@ /* Includes ------------------------------------------------------------------*/ #include #include +#include #include "tMenu.h" #include "tStructure.h" #include "tMenuXtra.h" @@ -152,17 +153,24 @@ if((line == 0) || (line == 2)) { + bool canDoFallback = pSettings->CCR_Mode == CCRMODE_Sensors; + if (!canDoFallback) { + text[textPointer++] = '\031'; + } textPointer += snprintf(&text[textPointer], 60,\ "%c" ,TXT_Fallback ); text[textPointer++] = '\t'; - if(settingsGetPointer()->fallbackToFixedSetpoint) + if(settingsGetPointer()->fallbackToFixedSetpoint && canDoFallback) text[textPointer++] = '\005'; else text[textPointer++] = '\006'; + if (!canDoFallback) { + text[textPointer++] = '\020'; + } strcpy(&text[textPointer],"\n\r"); textPointer += 2; }