Mercurial > public > ostc4
diff Common/Inc/data_exchange.h @ 981:c6c781a2e85b default tip
Merge into default
author | heinrichsweikamp |
---|---|
date | Tue, 11 Feb 2025 18:12:00 +0100 |
parents | 3420e3ba698d |
children |
line wrap: on
line diff
--- a/Common/Inc/data_exchange.h Tue Aug 13 13:24:54 2024 +0200 +++ b/Common/Inc/data_exchange.h Tue Feb 11 18:12:00 2025 +0100 @@ -33,15 +33,12 @@ /* Command definitions for control of external interface */ /* 1st nibble binary on/off states */ -/* 2nd nibble UART protocol selection */ -/* 3rd nibble reserve */ -/* 4th nibble command channel */ +/* 2nd nibble target sensor ID (if sensor command is active) */ +/* 3rd nibble sensor commands */ +/* 4th nibble control channel */ #define EXT_INTERFACE_33V_ON (0x8000u) /* Bit set to enable 3.3V power interface */ #define EXT_INTERFACE_ADC_ON (0x4000u) /* Bit set to enable ADC conversion */ -#define EXT_INTERFACE_UART_MASK (0x0700u) /* Reserve 3 bits for UART protocol selection */ -#define EXT_INTERFACE_UART_CO2 (0x0100u) /* Activate protocol for CO2 sensor */ -#define EXT_INTERFACE_UART_SENTINEL (0x0200u) /* Activate Sentinel Backup monitor protocol */ -#define EXT_INTERFACE_UART_O2 (0x0400u) /* Activate digital o2 sensor protocol (DiveO2) */ +#define EXT_INTERFACE_BUZZER_ON (0x2000u) /* Bit set to enable the buzzer */ /* Command subset */ #define EXT_INTERFACE_AUTODETECT (0x0001u) /* Start auto detection of connected sensors */ @@ -57,6 +54,10 @@ #define CO2_WARNING_LEVEL_PPM (2000u) /* Early warning to indicate unexpected high co2 concentration (yellow) */ #define CO2_ALARM_LEVEL_PPM (5000u) /* starting by this level CO2 has a negative impact on health (long exposure) */ +#define GNSS_ALIVE_STATE_ALIVE (0x01u) /* Communication to module active */ +#define GNSS_ALIVE_STATE_TIME (0x02u) /* Time information valid */ +#define GNSS_ALIVE_BACKUP_POS (0x04u) /* Backup position not older than x hours */ + enum MODE { MODE_SURFACE = 0, @@ -202,6 +203,7 @@ //debug uint32_t pressure_uTick; uint32_t compass_uTick; + SGnssInfo gnssInfo; } SExchangeData;