diff Discovery/Src/tMenuEdit.c @ 788:4abfb8a2a435

Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
author heinrichsweikamp
date Tue, 04 Jul 2023 14:39:06 +0200
parents 19ab6f3ed52a
children 17d9d6eddd8d
line wrap: on
line diff
--- a/Discovery/Src/tMenuEdit.c	Sun Jun 04 21:59:26 2023 +0200
+++ b/Discovery/Src/tMenuEdit.c	Tue Jul 04 14:39:06 2023 +0200
@@ -573,7 +573,6 @@
     block = 0;
     subBlockPosition = 0;
 
-
     if(ident[id].maintype == FIELD_NUMBERS)
     {
         change_CLUT_entry(CLUT_MenuEditLineSelected, CLUT_MenuEditCursor);
@@ -668,10 +667,9 @@
         }
         break;
     case FIELD_BUTTON:
-        set_globalState(menuID);
-        break;
     case FIELD_ON_OFF:
         set_globalState(menuID);
+
         break;
     case FIELD_SYMBOL:
         ident[id].input[0] += 1;
@@ -681,6 +679,10 @@
         write_content_of_actual_Id();
         set_globalState(menuID);
         break;
+    case FIELD_SELECT:
+        write_buttonTextline(TXT2BYTE_ButtonMinus, TXT2BYTE_ButtonEnter, TXT2BYTE_ButtonPlus);
+
+        break;
     }
 }
 
@@ -726,6 +728,15 @@
 
 }
 
+
+static void startNextEdit(void)
+{
+    EnterPressed = 1;
+    nextMenuEditField();
+    enterMenuEditField();
+}
+
+
 void nextMenuEditFieldDigit(void)
 {
     uint8_t action;
@@ -768,6 +779,12 @@
             exitMenuEdit_to_Home();
             return;
         }
+
+        if (newContent == EXIT_TO_NEXT_MENU) {
+            startNextEdit();
+
+            return;
+        }
     }
 
     if((ident[id].maintype == FIELD_NUMBERS) && (ident[id].subtype == FIELD_3DIGIT) && (action == ACTION_BUTTON_ENTER) &&(newContent >= '0') && (newContent <= '0' + 99))
@@ -1676,6 +1693,7 @@
     enterMenuEditField();
 }
 
+
 void exitEditWithUpdate(void)
 {
     createDiveSettings();