diff Discovery/Src/tMenuEdit.c @ 718:b9f699d2e3d0

Updated menu structure to support new sensor information page: The sensor information page has been added to the sensor submenu of the hardware menu. It will be shown dynamically in case a smart sensor is detected. In order to have this dynamic visualization some new functions had to be added to the general menu file. The information page returns to the sensor menu, for this behavior also a new function had to be added.
author Ideenmodellierer
date Sun, 20 Nov 2022 20:49:41 +0100
parents e81afd727993
children 190e5814b2f5
line wrap: on
line diff
--- a/Discovery/Src/tMenuEdit.c	Sun Nov 20 20:46:10 2022 +0100
+++ b/Discovery/Src/tMenuEdit.c	Sun Nov 20 20:49:41 2022 +0100
@@ -33,6 +33,7 @@
 #include "gfx_fonts.h"
 #include "tHome.h"
 #include "tInfoCompass.h"
+#include "tInfoSensor.h"
 #include "tMenuEditHardware.h"
 #include "tMenuEditPlanner.h"
 #include "tMenuEditSystem.h"
@@ -205,9 +206,10 @@
 
 	 switch(globState)
 	 {
+	 	 case (StMHARD3_O2_Sensor1):
 	 	 case (StMHARD3_O2_Sensor1 & MaskFieldDigit):
 	 	 case (StMHARD3_O2_Calibrate):
-	 	 case (StMHARD3_O2_Source):						 refreshFct = refresh_O2Sensors;
+	 	 case (StMHARD3_O2_Source):							refreshFct = refresh_O2Sensors;
 	 	 	 break;
 	 	 case (StMHARD2_Compass_SetCourse & MaskFieldDigit): refreshFct = refresh_CompassEdit;
 	 	 	 break;
@@ -342,6 +344,12 @@
     openInfo_Compass();
 }
 
+void exitMenuEdit_to_InfoSensor(void)
+{
+    exitMenuEdit(1);
+    openInfo_Sensor();
+}
+
 
 void exitMenuEdit_to_Home(void)
 {
@@ -598,6 +606,11 @@
         return;
     }
 
+    if(newContent == EXIT_TO_INFO_SENSOR)
+    {
+        exitMenuEdit_to_InfoSensor();
+        return;
+    }
 
     switch(ident[id].maintype)
     {