Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
727:1dca3bb187d7 | 728:5143e927219f |
---|---|
37 #define BUEHLMANN_STRUCT_MAX_ASCENDRATES 3 | 37 #define BUEHLMANN_STRUCT_MAX_ASCENDRATES 3 |
38 #define DECOINFO_STRUCT_MAX_STOPS 50 | 38 #define DECOINFO_STRUCT_MAX_STOPS 50 |
39 | 39 |
40 #define false 0 | 40 #define false 0 |
41 #define true 1 | 41 #define true 1 |
42 | |
43 #define EXT_INTERFACE_SENSOR_CNT (5u) /* 5 sensors may be connected to the external interface */ | |
44 | |
42 | 45 |
43 /* Helper structs ------------------------------------------------------------*/ | 46 /* Helper structs ------------------------------------------------------------*/ |
44 | 47 |
45 //struct SGas | 48 //struct SGas |
46 //contains gasinfos of single gas for deco calculation | 49 //contains gasinfos of single gas for deco calculation |
198 uint8_t buttonPICdata[4]; | 201 uint8_t buttonPICdata[4]; |
199 SCO2Sensor CO2_data; | 202 SCO2Sensor CO2_data; |
200 uint8_t extIf_sensor_Id; | 203 uint8_t extIf_sensor_Id; |
201 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 */ | 204 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 */ |
202 uint8_t extIf_sensor_data[32]; | 205 uint8_t extIf_sensor_data[32]; |
203 | 206 uint8_t extIf_sensor_map[EXT_INTERFACE_SENSOR_CNT]; |
204 | 207 |
205 /* by create DiveSettings() and by setActualGas() | 208 /* by create DiveSettings() and by setActualGas() |
206 * is send to Small CPU2 for nitrogen calculation | 209 * is send to Small CPU2 for nitrogen calculation |
207 * includes setpoint information | 210 * includes setpoint information |
208 */ | 211 */ |
415 DECO_CALC_FINSHED_FutureBuehlmann, | 418 DECO_CALC_FINSHED_FutureBuehlmann, |
416 DECO_CALC_FINSHED_Futurevpm, | 419 DECO_CALC_FINSHED_Futurevpm, |
417 DECO_CALC_init_as_is_start_of_dive, | 420 DECO_CALC_init_as_is_start_of_dive, |
418 DECO_CALC_undefined | 421 DECO_CALC_undefined |
419 }; | 422 }; |
423 | |
424 typedef enum | |
425 { | |
426 SENSOR_NONE, | |
427 SENSOR_ANALOG, | |
428 SENSOR_DIGO2, | |
429 SENSOR_CO2, | |
430 SENSOR_END | |
431 } externalInterfaceSensorType; | |
432 | |
420 | 433 |
421 uint32_t time_elapsed_ms(uint32_t ticksstart,uint32_t ticksnow); | 434 uint32_t time_elapsed_ms(uint32_t ticksstart,uint32_t ticksnow); |
422 | 435 |
423 void set_stateUsedToSim(void); | 436 void set_stateUsedToSim(void); |
424 void set_stateUsedToReal(void); | 437 void set_stateUsedToReal(void); |