comparison Common/Inc/data_central.h @ 270:2e58a4094770 write-from-sim

feature, debug: make simulator write a logbook entry When compiling the code with -DSIM_WRITES_LOGBOOK, the simulator writes to the logbook. This is for debug purpose only. This commit does *not* define this SIM_WRITES_LOGBOOK, so when compiled, things are functionally unchanged. Caveat 1: a simulator generated log cannot be advanced with +5 min. It needs to run in real time. Caveat 2: The generated log is currently not "complete". For example, CCR setpoint switches are not logged. There are likely more small events not logged. This means that a sim generated log is not a full replacement for real dive testing. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Wed, 24 Apr 2019 17:10:51 +0200
parents 3949781096d4
children 1303747b5ba2
comparison
equal deleted inserted replaced
269:6e78137952af 270:2e58a4094770
452 uint8_t calc_MinOD(uint8_t gasId); 452 uint8_t calc_MinOD(uint8_t gasId);
453 //float calc_ppO2(float input_ambient_pressure_bar, SGas* pGas); 453 //float calc_ppO2(float input_ambient_pressure_bar, SGas* pGas);
454 int current_second(void); 454 int current_second(void);
455 _Bool vpm_crush(SDiveState* pDiveState); 455 _Bool vpm_crush(SDiveState* pDiveState);
456 _Bool deco_zone_reached(void); 456 _Bool deco_zone_reached(void);
457 void resetEvents(void); 457 void resetEvents(const SDiveState *pStateUsed);
458 458
459 uint32_t crc32c_checksum(uint8_t* message, uint16_t length, uint8_t* message2, uint16_t length2); 459 uint32_t crc32c_checksum(uint8_t* message, uint16_t length, uint8_t* message2, uint16_t length2);
460 uint32_t CRC_CalcBlockCRC(uint32_t *buffer, uint32_t words); 460 uint32_t CRC_CalcBlockCRC(uint32_t *buffer, uint32_t words);
461 uint32_t CRC_CalcBlockCRC_moreThan768000(uint32_t *buffer1, uint32_t *buffer2, uint32_t words); 461 uint32_t CRC_CalcBlockCRC_moreThan768000(uint32_t *buffer1, uint32_t *buffer2, uint32_t words);
462 462