diff Discovery/Src/tMenuEditDeco.c @ 707:e81afd727993

Menu cleanup rebreather specific settings: In the previous version the selection for Fix setpoint or sensor was in the deco menu and the Fallback option in the hardware menu. As they have a dependency and are only relevant for rebreather operation, they have been moved into the extra menu which is containing rebreather related data and which is only visible in rebreather mode.
author Ideenmodellierer
date Thu, 03 Nov 2022 20:44:21 +0100
parents 1b995079c045
children
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditDeco.c	Thu Nov 03 20:37:06 2022 +0100
+++ b/Discovery/Src/tMenuEditDeco.c	Thu Nov 03 20:44:21 2022 +0100
@@ -40,7 +40,6 @@
 /* Private function prototypes -----------------------------------------------*/
 
 static void openEdit_DiveMode(void);
-static void openEdit_CCRModeSensorOrFixedSP(void);
 static void openEdit_ppO2max(void);
 static void openEdit_SafetyStop(void);
 static void openEdit_FutureTTS(void);
@@ -59,13 +58,8 @@
     set_globalState_Menu_Line(line);
     resetMenuEdit(CLUT_MenuPageDeco);
 
-    SSettings *data = settingsGetPointer();
-
     lineSelected = line;
 
-    if((!isLoopMode(data->dive_mode)) &&  (line > 1))
-        line += 1;
-
     switch(line)
     {
     case 1:
@@ -73,18 +67,15 @@
         openEdit_DiveMode();
         break;
     case 2:
-        openEdit_CCRModeSensorOrFixedSP();
+        openEdit_ppO2max();
         break;
     case 3:
-        openEdit_ppO2max();
+        openEdit_SafetyStop();
         break;
     case 4:
-        openEdit_SafetyStop();
+        openEdit_FutureTTS();
         break;
     case 5:
-        openEdit_FutureTTS();
-        break;
-    case 6:
         openEdit_Salinity();
         break;
     }
@@ -207,17 +198,7 @@
 }
 
 
-static void openEdit_CCRModeSensorOrFixedSP(void)
-{
-    SSettings *pSettings = settingsGetPointer();
 
-    if(pSettings->CCR_Mode == CCRMODE_Sensors)
-        pSettings->CCR_Mode = CCRMODE_FixedSetpoint;
-    else
-        pSettings->CCR_Mode = CCRMODE_Sensors;
-
-    exitEditWithUpdate();
-}
 
 
 static void openEdit_SafetyStop(void)