comparison Common/Inc/data_exchange.h @ 662:1b995079c045 Betatest

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents 84a4e1200726
children 52d68cf9994c
comparison
equal deleted inserted replaced
661:87bee7cc77b3 662:1b995079c045
28 #define DATA_EXCHANGE_H 28 #define DATA_EXCHANGE_H
29 29
30 #include "data_central.h" 30 #include "data_central.h"
31 #include "settings.h" 31 #include "settings.h"
32 #include "stm32f4xx_hal.h" 32 #include "stm32f4xx_hal.h"
33
34 /* Command definitions for contral of external interface */
35 #define EXT_INTERFACE_33V_ON (0x8000u) /* Bit set to enable 3.3V power interface */
36 #define EXT_INTERFACE_CO2_CALIB (0x0001u) /* Request calibration of CO2Sensor */
33 37
34 enum MODE 38 enum MODE
35 { 39 {
36 MODE_SURFACE = 0, 40 MODE_SURFACE = 0,
37 MODE_DIVE = 1, 41 MODE_DIVE = 1,
78 82
79 83
80 #define CRBUTTON (0x01) 84 #define CRBUTTON (0x01)
81 #define CRDATE (0x02) 85 #define CRDATE (0x02)
82 #define CRTIME (0x04) 86 #define CRTIME (0x04)
83 #define CRCLEARDECO (0x08) 87 #define CRCLEARDECO (0x08)
84 #define CRCOMPASS (0x10) 88 #define CRCOMPASS (0x10)
85 #define CRDEVICEDATA (0x20) 89 #define CRDEVICEDATA (0x20)
90 #define CRBATTERY (0x40)
91 #define CRACCIDENT (0x80)
86 92
87 typedef union{ 93 typedef union{
88 confirmbit8_t ub; 94 confirmbit8_t ub;
89 uint8_t uw; 95 uint8_t uw;
90 } confirmbit8_Type; 96 } confirmbit8_Type;
146 float battery_charge; 152 float battery_charge;
147 //ambient light 153 //ambient light
148 uint16_t ambient_light_level; 154 uint16_t ambient_light_level;
149 uint16_t SPARE_ALIGN32; 155 uint16_t SPARE_ALIGN32;
150 float extADC_voltage[3]; 156 float extADC_voltage[3];
151 uint8_t SPARE_OldWireless[50]; /* 64 - 12 for extADC */ 157 uint16_t CO2_ppm;
158 uint16_t CO2_signalStrength;
159 uint16_t externalInterface_CmdAnswer;
160 uint8_t SPARE_OldWireless[44]; /* 64 - 12 for extADC - 6 for CO2 */
152 // PIC data 161 // PIC data
153 uint8_t button_setting[4]; /* see dependency to SLiveData->buttonPICdata */ 162 uint8_t button_setting[4]; /* see dependency to SLiveData->buttonPICdata */
154 uint8_t SPARE1; 163 uint8_t SPARE1;
155 //debug 164 //debug
156 uint32_t pressure_uTick; 165 uint32_t pressure_uTick;
164 SGas actualGas; 173 SGas actualGas;
165 174
166 int8_t offsetPressureSensor_mbar; 175 int8_t offsetPressureSensor_mbar;
167 int8_t offsetTemperatureSensor_centiDegree; 176 int8_t offsetTemperatureSensor_centiDegree;
168 177
169 uint8_t SPARE1; 178 uint16_t externalInterface_Cmd;
170 uint8_t SPARE2;
171 179
172 float UNUSED1[16-1];//VPM_adjusted_critical_radius_he[16]; 180 float UNUSED1[16-1];//VPM_adjusted_critical_radius_he[16];
173 float UNUSED2[16];//VPM_adjusted_critical_radius_n2[16]; 181 float UNUSED2[16];//VPM_adjusted_critical_radius_n2[16];
174 float UNUSED3[16];//VPM_adjusted_crushing_pressure_he[16]; 182 float UNUSED3[16];//VPM_adjusted_crushing_pressure_he[16];
175 float UNUSED4[16];//VPM_adjusted_crushing_pressure_n2[16]; 183 float UNUSED4[16];//VPM_adjusted_crushing_pressure_n2[16];