Mercurial > public > ostc4
comparison Discovery/Src/tMenuSetpoint.c @ 789:b7cd0c5c8e43
When using automatic setpoint switching, allow the user to set an arbitrary ppO2 as a custom setpoint during the dive.
author | heinrichsweikamp |
---|---|
date | Wed, 12 Jul 2023 10:13:25 +0200 |
parents | 4abfb8a2a435 |
children | 25103f5c7e29 |
comparison
equal
deleted
inserted
replaced
788:4abfb8a2a435 | 789:b7cd0c5c8e43 |
---|---|
56 if((actual_menu_content == MENU_SURFACE) || (stateUsed->diveSettings.diveMode != DIVEMODE_PSCR)) /* do not show setpoints in PSCR mode */ | 56 if((actual_menu_content == MENU_SURFACE) || (stateUsed->diveSettings.diveMode != DIVEMODE_PSCR)) /* do not show setpoints in PSCR mode */ |
57 { | 57 { |
58 for(int spId=1;spId<=NUM_GASES;spId++) | 58 for(int spId=1;spId<=NUM_GASES;spId++) |
59 { | 59 { |
60 if (settings->autoSetpoint) { | 60 if (settings->autoSetpoint) { |
61 if (actual_menu_content == MENU_SURFACE && spId == 5) { | 61 if (spId == 5) { |
62 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'); | 62 if (actual_menu_content == MENU_SURFACE) { |
63 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'); | |
64 } else { | |
65 textPointer += snprintf(&text[textPointer], 40, "\020%c%c %c%c\n\r", TXT_2BYTE, TXT2BYTE_Custom, TXT_2BYTE, TXT2BYTE_Setpoint); | |
66 } | |
67 | |
63 continue; | 68 continue; |
64 } else if (spId > SETPOINT_INDEX_AUTO_DECO) { | 69 } else if (spId > SETPOINT_INDEX_AUTO_DECO) { |
65 textPointer += snprintf(&text[textPointer], 3, "\n\r"); | 70 textPointer += snprintf(&text[textPointer], 3, "\n\r"); |
66 | 71 |
67 continue; | 72 continue; |