diff Discovery/Src/tMenuEdit.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 b9f699d2e3d0
line wrap: on
line diff
--- a/Discovery/Src/tMenuEdit.c	Thu Nov 03 20:37:06 2022 +0100
+++ b/Discovery/Src/tMenuEdit.c	Thu Nov 03 20:44:21 2022 +0100
@@ -211,12 +211,19 @@
 	 	 	 break;
 	 	 case (StMHARD2_Compass_SetCourse & MaskFieldDigit): refreshFct = refresh_CompassEdit;
 	 	 	 break;
-	 	 case (StMXTRA_CompassHeading & MaskFieldDigit):  refreshFct = refresh_CompassHeading;
-	 	 	 break;
-	 	 case (StMXTRA_PSCR_O2_Drop & MaskFieldDigit): if(settingsGetPointer()->dive_mode != DIVEMODE_PSCR)	/* workaround because PSCR mode is set dynamic */
-	 	 	 	 	 	 	 	 	 	 	 	 	 	 {
-	 		 	 	 	 	 	 	 	 	 	 	 	 	 refreshFct = refresh_CO2Data;
-	 	 	 	 	 	 	 	 	 	 	 	 	 	 }
+	 	/* case (StMXTRA_CompassHeading & MaskFieldDigit):   StMXTRA_CompassHeading and  StMXTRA_PSCR_O2_Drop share the same menu ID => select function based on divemode */
+	 	 case (StMXTRA_PSCR_O2_Drop & MaskFieldDigit):
+														 if(actual_menu_content == MENU_SURFACE)
+														 {
+															 if(settingsGetPointer()->dive_mode != DIVEMODE_PSCR)	/* workaround because PSCR mode is set dynamic */
+															 {
+																 refreshFct = refresh_CO2Data;
+															 }
+														 }
+														 else
+														 {
+															 refreshFct = refresh_CompassHeading;
+														 }
 	 	 	 break;
 	 	 case (StMXTRA_CO2_Sensor & MaskFieldDigit):  refreshFct = refresh_CO2Data;
 	 	 	 break;