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

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents d784f281833a
children c00a80f26641
comparison
equal deleted inserted replaced
661:87bee7cc77b3 662:1b995079c045
48 uint8_t nitrogen_percentage; 48 uint8_t nitrogen_percentage;
49 uint8_t helium_percentage; 49 uint8_t helium_percentage;
50 uint8_t setPoint_cbar; 50 uint8_t setPoint_cbar;
51 uint8_t change_during_ascent_depth_meter_otherwise_zero; 51 uint8_t change_during_ascent_depth_meter_otherwise_zero;
52 uint8_t GasIdInSettings; 52 uint8_t GasIdInSettings;
53 uint8_t temp1_for16bitalign; 53 uint8_t AppliedDiveMode;
54 float pscr_factor;
54 } SGas; 55 } SGas;
55 56
56 typedef struct 57 typedef struct
57 { 58 {
58 float use_from_depth_bar; 59 float use_from_depth_bar;
72 uint16_t ageInMilliSeconds; 73 uint16_t ageInMilliSeconds;
73 uint8_t numberOfBytes; 74 uint8_t numberOfBytes;
74 uint8_t status; 75 uint8_t status;
75 uint8_t data[12]; 76 uint8_t data[12];
76 } SDataWireless; 77 } SDataWireless;
78
79
80 typedef struct
81 {
82 uint16_t CO2_ppm;
83 uint16_t signalStrength;
84 } SCO2Sensor;
77 85
78 /* Main structs -------------------------------------------------------------*/ 86 /* Main structs -------------------------------------------------------------*/
79 87
80 88
81 //struct SDecoinfo 89 //struct SDecoinfo
185 float battery_voltage; 193 float battery_voltage;
186 float battery_charge; 194 float battery_charge;
187 uint16_t ambient_light_level; 195 uint16_t ambient_light_level;
188 SDataWireless wireless_data[4]; 196 SDataWireless wireless_data[4];
189 uint8_t buttonPICdata[4]; 197 uint8_t buttonPICdata[4];
198 SCO2Sensor CO2_data;
199
190 200
191 /* by create DiveSettings() and by setActualGas() 201 /* by create DiveSettings() and by setActualGas()
192 * is send to Small CPU2 for nitrogen calculation 202 * is send to Small CPU2 for nitrogen calculation
193 * includes setpoint information 203 * includes setpoint information
194 */ 204 */
219 /* from local sensor or direct HUD communication */ 229 /* from local sensor or direct HUD communication */
220 //pp O2 Sensor 230 //pp O2 Sensor
221 float ppO2Sensor_bar[3]; 231 float ppO2Sensor_bar[3];
222 float sensorVoltage_mV[3]; 232 float sensorVoltage_mV[3];
223 float HUD_battery_voltage_V; 233 float HUD_battery_voltage_V;
234
235 /* for PSCR Mode */
236 float ppo2Simulated_bar;
224 } SLifeData; 237 } SLifeData;
225 238
226 239
227 typedef struct 240 typedef struct
228 { 241 {
321 334
322 /* 335 /*
323 */ 336 */
324 float internal__pressure_first_stop_ambient_bar_as_upper_limit_for_gf_low_otherwise_zero; 337 float internal__pressure_first_stop_ambient_bar_as_upper_limit_for_gf_low_otherwise_zero;
325 uint16_t compassHeading; 338 uint16_t compassHeading;
339
340 uint8_t pscr_o2_drop;
341 uint8_t pscr_lung_ratio;
326 } SDiveSettings; 342 } SDiveSettings;
327 343
328 enum CHARGE_STATUS{ 344 enum CHARGE_STATUS{
329 CHARGER_off = 0, 345 CHARGER_off = 0,
330 CHARGER_running, 346 CHARGER_running,
452 uint32_t CRC_CalcBlockCRC(uint32_t *buffer, uint32_t words); 468 uint32_t CRC_CalcBlockCRC(uint32_t *buffer, uint32_t words);
453 uint32_t CRC_CalcBlockCRC_moreThan768000(uint32_t *buffer1, uint32_t *buffer2, uint32_t words); 469 uint32_t CRC_CalcBlockCRC_moreThan768000(uint32_t *buffer1, uint32_t *buffer2, uint32_t words);
454 470
455 _Bool is_ambient_pressure_close_to_surface(SLifeData *lifeData); 471 _Bool is_ambient_pressure_close_to_surface(SLifeData *lifeData);
456 472
473 uint8_t isLoopMode(uint8_t Mode);
474
457 #endif // DATA_CENTRAL_H 475 #endif // DATA_CENTRAL_H