diff 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
line wrap: on
line diff
--- a/Discovery/Src/tMenuSetpoint.c	Tue Jul 04 14:39:06 2023 +0200
+++ b/Discovery/Src/tMenuSetpoint.c	Wed Jul 12 10:13:25 2023 +0200
@@ -58,8 +58,13 @@
 		for(int spId=1;spId<=NUM_GASES;spId++)
 		{
             if (settings->autoSetpoint) {
-                if (actual_menu_content == MENU_SURFACE && spId == 5) {
-                    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');
+                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');
+                    } else {
+                        textPointer += snprintf(&text[textPointer], 40, "\020%c%c %c%c\n\r", TXT_2BYTE, TXT2BYTE_Custom, TXT_2BYTE, TXT2BYTE_Setpoint);
+                    }
+
                     continue;
                 } else if (spId > SETPOINT_INDEX_AUTO_DECO) {
                     textPointer += snprintf(&text[textPointer], 3, "\n\r");