diff Discovery/Src/tMenuEdit.c @ 783:c31237d20491

Update digital O2 sensor information: In the previous version only one digital O2 sensor was supported and the additional data could be accessed via a separate menu item. Because of the intraduction of the multiplexer there are three datasets available not. Because of the existing menu structure it was not possible to add additional menu items. To solve the problem the sensor information has been moved beghind the sensor On/Off functionality. When selecting a sensor the sensor data will be shown and the de-/activation of a sensor may be done in scope of the sensor information dialog.
author Ideenmodellierer
date Mon, 29 May 2023 20:26:38 +0200
parents 45b8f3c2acce
children 19ab6f3ed52a
line wrap: on
line diff
--- a/Discovery/Src/tMenuEdit.c	Mon May 29 20:22:15 2023 +0200
+++ b/Discovery/Src/tMenuEdit.c	Mon May 29 20:26:38 2023 +0200
@@ -129,7 +129,6 @@
 
 void draw_tMEcursorNewDesign(void);
 
-void exitMenuEdit(uint8_t writeSettingsIfEnterPressed);
 uint8_t split_Content_to_Digit_helper(uint8_t inContentAscii, uint8_t *outDigit100, uint8_t *outDigit10, uint8_t *outDigit1);
 
 /* Exported functions --------------------------------------------------------*/
@@ -348,8 +347,19 @@
 
 void exitMenuEdit_to_InfoSensor(void)
 {
+	uint32_t globState = get_globalState();
+
     exitMenuEdit(1);
-    openInfo_Sensor();
+	switch(globState)
+	{
+	 	 case (StMHARD3_O2_Sensor3): openInfo_Sensor(3);
+			break;
+	 	 case (StMHARD3_O2_Sensor2): openInfo_Sensor(2);
+	 	 	 break;
+	 	 default:
+	 	 case (StMHARD3_O2_Sensor1): openInfo_Sensor(1);
+	 	 	 break;
+	}
 }