changeset 733:7b0e020513e3

Optical sensor as default: The optical sensor is now set as default configuration ensuring that the external interface is switched off per default. Otherwise power would be consumed e.g. by the ADC even no sensors are connectet because OSTC is used for OC dives only.
author Ideenmodellierer
date Sun, 15 Jan 2023 21:48:34 +0100
parents e33d661d1743
children 190e5814b2f5
files Common/Inc/data_central.h Discovery/Src/settings.c
diffstat 2 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Common/Inc/data_central.h	Sun Jan 15 21:45:14 2023 +0100
+++ b/Common/Inc/data_central.h	Sun Jan 15 21:48:34 2023 +0100
@@ -424,6 +424,7 @@
 typedef enum
 {
 	 SENSOR_NONE,
+	 SENSOR_OPTIC,
 	 SENSOR_ANALOG,
 	 SENSOR_DIGO2,
 	 SENSOR_CO2,
--- a/Discovery/Src/settings.c	Sun Jan 15 21:45:14 2023 +0100
+++ b/Discovery/Src/settings.c	Sun Jan 15 21:48:34 2023 +0100
@@ -325,9 +325,9 @@
 	.scrubTimerMax_Obsolete = 0,
 	.scrubTimerCur_Obsolete = 0,
 	.scrubTimerMode = SCRUB_TIMER_OFF,
-	.ext_sensor_map[0] = SENSOR_ANALOG,
-	.ext_sensor_map[1] = SENSOR_ANALOG,
-	.ext_sensor_map[2] = SENSOR_ANALOG,
+	.ext_sensor_map[0] = SENSOR_OPTIC,
+	.ext_sensor_map[1] = SENSOR_OPTIC,
+	.ext_sensor_map[2] = SENSOR_OPTIC,
 	.ext_sensor_map[3] = SENSOR_NONE,
 	.ext_sensor_map[4] = SENSOR_NONE,
 };
@@ -523,9 +523,9 @@
     	pSettings->scrubberData[1].lastDive.Date = 0;
     	pSettings->scrubberData[1].lastDive.Year = 0;
     	// no break;
-    case 0xFFFF0023: pSettings->ext_sensor_map[0] = SENSOR_ANALOG;
-    				 pSettings->ext_sensor_map[1] = SENSOR_ANALOG;
-    				 pSettings->ext_sensor_map[2] = SENSOR_ANALOG;
+    case 0xFFFF0023: pSettings->ext_sensor_map[0] = SENSOR_OPTIC;
+    				 pSettings->ext_sensor_map[1] = SENSOR_OPTIC;
+    				 pSettings->ext_sensor_map[2] = SENSOR_OPTIC;
     				 pSettings->ext_sensor_map[3] = SENSOR_NONE;
     				 pSettings->ext_sensor_map[4] = SENSOR_NONE;
     	// no break;
@@ -1539,9 +1539,9 @@
 			|| (Settings.ext_sensor_map[3] >= SENSOR_END)
 			|| (Settings.ext_sensor_map[4] >= SENSOR_END))
     {
-    	Settings.ext_sensor_map[0] = SENSOR_ANALOG;
-    	Settings.ext_sensor_map[1] = SENSOR_ANALOG;
-    	Settings.ext_sensor_map[2] = SENSOR_ANALOG;
+    	Settings.ext_sensor_map[0] = SENSOR_OPTIC;
+    	Settings.ext_sensor_map[1] = SENSOR_OPTIC;
+    	Settings.ext_sensor_map[2] = SENSOR_OPTIC;
     	Settings.ext_sensor_map[3] = SENSOR_NONE;
     	Settings.ext_sensor_map[4] = SENSOR_NONE;
        	corrections++;