Mercurial > public > ostc4
comparison Common/Inc/data_exchange.h @ 969:81049905d829 Evo_2_23
Zusammenf?hren
author | heinrichsweikamp |
---|---|
date | Sun, 19 Jan 2025 12:02:59 +0100 (2 months ago) |
parents | 3420e3ba698d |
children |
comparison
equal
deleted
inserted
replaced
968:b9a1710522b1 | 969:81049905d829 |
---|---|
31 #include "settings.h" | 31 #include "settings.h" |
32 #include "stm32f4xx_hal.h" | 32 #include "stm32f4xx_hal.h" |
33 | 33 |
34 /* Command definitions for control of external interface */ | 34 /* Command definitions for control of external interface */ |
35 /* 1st nibble binary on/off states */ | 35 /* 1st nibble binary on/off states */ |
36 /* 2nd nibble UART protocol selection */ | 36 /* 2nd nibble target sensor ID (if sensor command is active) */ |
37 /* 3rd nibble reserve */ | 37 /* 3rd nibble sensor commands */ |
38 /* 4th nibble command channel */ | 38 /* 4th nibble control channel */ |
39 #define EXT_INTERFACE_33V_ON (0x8000u) /* Bit set to enable 3.3V power interface */ | 39 #define EXT_INTERFACE_33V_ON (0x8000u) /* Bit set to enable 3.3V power interface */ |
40 #define EXT_INTERFACE_ADC_ON (0x4000u) /* Bit set to enable ADC conversion */ | 40 #define EXT_INTERFACE_ADC_ON (0x4000u) /* Bit set to enable ADC conversion */ |
41 #define EXT_INTERFACE_BUZZER_ON (0x2000u) /* Bit set to enable the buzzer */ | |
41 | 42 |
42 /* Command subset */ | 43 /* Command subset */ |
43 #define EXT_INTERFACE_AUTODETECT (0x0001u) /* Start auto detection of connected sensors */ | 44 #define EXT_INTERFACE_AUTODETECT (0x0001u) /* Start auto detection of connected sensors */ |
44 #define EXT_INTERFACE_COPY_SENSORMAP (0x0002u) /* Use the sensor map provided by master for internal operations */ | 45 #define EXT_INTERFACE_COPY_SENSORMAP (0x0002u) /* Use the sensor map provided by master for internal operations */ |
45 #define EXT_INTERFACE_CO2_CALIB (0x0010u) /* Request calibration of CO2Sensor */ | 46 #define EXT_INTERFACE_CO2_CALIB (0x0010u) /* Request calibration of CO2Sensor */ |
53 #define CO2_WARNING_LEVEL_PPM (2000u) /* Early warning to indicate unexpected high co2 concentration (yellow) */ | 54 #define CO2_WARNING_LEVEL_PPM (2000u) /* Early warning to indicate unexpected high co2 concentration (yellow) */ |
54 #define CO2_ALARM_LEVEL_PPM (5000u) /* starting by this level CO2 has a negative impact on health (long exposure) */ | 55 #define CO2_ALARM_LEVEL_PPM (5000u) /* starting by this level CO2 has a negative impact on health (long exposure) */ |
55 | 56 |
56 #define GNSS_ALIVE_STATE_ALIVE (0x01u) /* Communication to module active */ | 57 #define GNSS_ALIVE_STATE_ALIVE (0x01u) /* Communication to module active */ |
57 #define GNSS_ALIVE_STATE_TIME (0x02u) /* Time information valid */ | 58 #define GNSS_ALIVE_STATE_TIME (0x02u) /* Time information valid */ |
59 #define GNSS_ALIVE_BACKUP_POS (0x04u) /* Backup position not older than x hours */ | |
58 | 60 |
59 enum MODE | 61 enum MODE |
60 { | 62 { |
61 MODE_SURFACE = 0, | 63 MODE_SURFACE = 0, |
62 MODE_DIVE = 1, | 64 MODE_DIVE = 1, |