diff Common/Inc/data_central.h @ 728:5143e927219f

Added sensor map to Firmware <=> RTE inferface: The sensor map contains a list of up to five sensors which may be connected to the external interface. The update includes the definition of the type as well as the data structure. to ensure compatibility the RTE and needed RTE version has been set to 3.0
author Ideenmodellierer
date Sat, 14 Jan 2023 20:41:36 +0100
parents 045ff7800501
children 7b0e020513e3
line wrap: on
line diff
--- a/Common/Inc/data_central.h	Sat Jan 14 20:37:20 2023 +0100
+++ b/Common/Inc/data_central.h	Sat Jan 14 20:41:36 2023 +0100
@@ -40,6 +40,9 @@
 #define false  0
 #define true 1
 
+#define EXT_INTERFACE_SENSOR_CNT	(5u)		/* 5 sensors may be connected to the external interface */
+
+
 /* Helper structs ------------------------------------------------------------*/
 
 //struct SGas
@@ -200,7 +203,7 @@
 	uint8_t extIf_sensor_Id;
 	uint8_t UINT64ALIGNMENT;					/* If your program crash check if you changed something in the life data structure ! The external sensor may contain a 64 bit ID */
 	uint8_t extIf_sensor_data[32];
-
+	uint8_t extIf_sensor_map[EXT_INTERFACE_SENSOR_CNT];
 
 	/* by create DiveSettings() and by setActualGas()
 	 * is send to Small CPU2 for nitrogen calculation
@@ -418,6 +421,16 @@
 		DECO_CALC_undefined
 };
 
+typedef enum
+{
+	 SENSOR_NONE,
+	 SENSOR_ANALOG,
+	 SENSOR_DIGO2,
+	 SENSOR_CO2,
+	 SENSOR_END
+} externalInterfaceSensorType;
+
+
 uint32_t time_elapsed_ms(uint32_t ticksstart,uint32_t ticksnow);
 
 void set_stateUsedToSim(void);