Mercurial > public > ostc4
diff Discovery/Src/tMenuSetpoint.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 |
line wrap: on
line diff
--- a/Discovery/Src/tMenuSetpoint.c Sun Sep 03 18:03:49 2023 +0200 +++ b/Discovery/Src/tMenuSetpoint.c Sun Sep 10 11:46:45 2023 +0200 @@ -55,16 +55,15 @@ if((actual_menu_content == MENU_SURFACE) || (stateUsed->diveSettings.diveMode != DIVEMODE_PSCR)) /* do not show setpoints in PSCR mode */ { - if (settings->autoSetpoint) { - disableLine(StMSP_Blank); - } - else { - enableLine(StMSP_Blank); + if (settings->autoSetpoint) { + disableLine(StMSP_Blank); + } else { + enableLine(StMSP_Blank); } + for(int spId=1;spId<=NUM_GASES;spId++) { if (settings->autoSetpoint) { - disableLine(StMSP_Blank); if (spId == 5) { if (actual_menu_content == MENU_SURFACE) { textPointer += snprintf(&text[textPointer], 40, "\020%c%c\016\016%c%c\017 %c%c\002%c\n\r", TXT_2BYTE, TXT2BYTE_SetpointShort, TXT_2BYTE, TXT2BYTE_SetpointLow, TXT_2BYTE, TXT2BYTE_SetpointDelayed, settings->delaySetpointLow ? '\005' : '\006');