diff Discovery/Src/tMenuEditXtra.c @ 769:6b248bcdbf28

Deactivation of the 'fallback' option when the CCR mode is set to 'Fixed' - this makes it a little clearer that the option has no influence in this mode.
author heinrichsweikamp
date Fri, 21 Apr 2023 09:47:06 +0200
parents b6d8a6fbf4fd
children 6169309d6eb9
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditXtra.c	Thu Apr 13 09:35:43 2023 +0200
+++ b/Discovery/Src/tMenuEditXtra.c	Fri Apr 21 09:47:06 2023 +0200
@@ -79,7 +79,6 @@
 {
     set_globalState_Menu_Line(line);
 
-
     /* DIVE MODE */
     if(actual_menu_content != MENU_SURFACE)
     {
@@ -114,7 +113,7 @@
     }
     else /* surface mode */
     {
-    	if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3))		/* PSCR items are only optional */
+        if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3))		/* PSCR items are only optional */
 		{
 			line = 6;
 		}
@@ -192,14 +191,10 @@
 
     SSettings *pSettings = settingsGetPointer();
 
-    if(pSettings->fallbackToFixedSetpoint == 0)
-    {
-    	pSettings->fallbackToFixedSetpoint = 1;
+    if (pSettings->CCR_Mode == CCRMODE_Sensors) {
+        pSettings->fallbackToFixedSetpoint = (pSettings->fallbackToFixedSetpoint + 1) % 2;
     }
-    else
-    {
-    	pSettings->fallbackToFixedSetpoint = 0;
-    }
+
     exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only();
 }