comparison Discovery/Src/tMenuSetpoint.c @ 811:4c41d9a18c7f

Added function to skip lines which are not needed for operation: It was not possible in the previous version to skip lines in the top level menu view which were not used for operation. In the past context sensitive menus as well as layout changes have been introduced which cause the cursor to be placed on lines without function. To avoid this it is not possible to mark a line as not in use by enabling / disabling it by the individual meni Id.
author Ideenmodellierer
date Sun, 27 Aug 2023 20:59:12 +0200
parents 25103f5c7e29
children c4ee952b9425
comparison
equal deleted inserted replaced
810:e6827fcd7604 811:4c41d9a18c7f
53 *tab = 130; 53 *tab = 130;
54 *subtext = 0; 54 *subtext = 0;
55 55
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 if (settings->autoSetpoint) {
59 disableLine(StMSP_Blank);
60 }
61 else {
62 enableLine(StMSP_Blank);
63 }
58 for(int spId=1;spId<=NUM_GASES;spId++) 64 for(int spId=1;spId<=NUM_GASES;spId++)
59 { 65 {
60 if (settings->autoSetpoint) { 66 if (settings->autoSetpoint) {
67 disableLine(StMSP_Blank);
61 if (spId == 5) { 68 if (spId == 5) {
62 if (actual_menu_content == MENU_SURFACE) { 69 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'); 70 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 { 71 } else {
65 textPointer += snprintf(&text[textPointer], 40, "\020%c%c %c%c\n\r", TXT_2BYTE, TXT2BYTE_Custom, TXT_2BYTE, TXT2BYTE_Setpoint); 72 textPointer += snprintf(&text[textPointer], 40, "\020%c%c %c%c\n\r", TXT_2BYTE, TXT2BYTE_Custom, TXT_2BYTE, TXT2BYTE_Setpoint);