diff Common/Inc/data_central.h @ 796:75ace7af8212

Expanded Sensor map structure: In the previous version the number of possible sensors were set to 5 based on the assumption that ADC slots are shared with digital O2 sensors. As result three of five slots would have been limited to O2 measurement usecase, leaving just two slots left for other sensors (e.g. CO2). In order to have as much flexibility (and less risk for data structure changes) the number of sensors has been set to 7 (3 ADC + 4 UART MUX)
author Ideenmodellierer
date Mon, 31 Jul 2023 20:00:06 +0200
parents 4abfb8a2a435
children 1e3c12d772eb
line wrap: on
line diff
--- a/Common/Inc/data_central.h	Mon Jul 31 19:50:36 2023 +0200
+++ b/Common/Inc/data_central.h	Mon Jul 31 20:00:06 2023 +0200
@@ -41,8 +41,8 @@
 #define false  0
 #define true 1
 
-#define EXT_INTERFACE_SENSOR_CNT	(5u)		/* 5 sensors may be connected to the external interface */
-
+#define EXT_INTERFACE_SENSOR_CNT	(8u)		/* 1 MUX + 7 sensors may be connected to the external interface (1 MUX + 3 ADC + 4 UART) */
+#define EXT_INTERFACE_MUX_OFFSET	(3u)		/* the sensor struct starts with 3 ADC sensors */
 
 /* Helper structs ------------------------------------------------------------*/
 
@@ -433,6 +433,7 @@
 	 SENSOR_OPTIC,
 	 SENSOR_ANALOG,
 	 SENSOR_DIGO2,
+	 SENSOR_DIGO2M,
 	 SENSOR_SENTINEL,
 	 SENSOR_TYPE_O2_END,
 	 SENSOR_CO2,