Mercurial > public > ostc4
diff Discovery/Src/tMenuXtra.c @ 816:c4ee952b9425
Fix a bug that disables arbitrary menu lines in dive mode if lines are disabled / inactive in surface mode. (mikeller)
author | heinrichsweikamp |
---|---|
date | Sun, 10 Sep 2023 11:46:45 +0200 |
parents | 4c41d9a18c7f |
children | ffb1036c27c2 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuXtra.c Sun Sep 03 18:03:49 2023 +0200 +++ b/Discovery/Src/tMenuXtra.c Sun Sep 10 11:46:45 2023 +0200 @@ -152,45 +152,42 @@ } 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 - ); + { + 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 && canDoFallback) - text[textPointer++] = '\005'; - else - text[textPointer++] = '\006'; + text[textPointer++] = '\t'; + if(settingsGetPointer()->fallbackToFixedSetpoint && canDoFallback) + text[textPointer++] = '\005'; + else + text[textPointer++] = '\006'; - if (!canDoFallback) { - text[textPointer++] = '\020'; - disableLine(StMXTRA_O2_Fallback); - } - else { - enableLine(StMXTRA_O2_Fallback); - } - strcpy(&text[textPointer],"\n\r"); - textPointer += 2; - } + if (!canDoFallback) { + text[textPointer++] = '\020'; + disableLine(StMXTRA_O2_Fallback); + } else { + enableLine(StMXTRA_O2_Fallback); + } + strcpy(&text[textPointer],"\n\r"); + textPointer += 2; + } if((line == 0) || (line == 3)) - { - textPointer += snprintf(&text[textPointer], 60,\ - "%c" - ,TXT_ScrubTime - ); - strcpy(&text[textPointer],"\n\r"); - textPointer += 2; - } - - + { + textPointer += snprintf(&text[textPointer], 60,\ + "%c" + ,TXT_ScrubTime + ); + strcpy(&text[textPointer],"\n\r"); + textPointer += 2; + } #ifdef ENABLE_PSCR_MODE if(pSettings->dive_mode == DIVEMODE_PSCR)