Mercurial > public > ostc4
comparison Discovery/Inc/logbook.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 | 6e78137952af |
children | 928a14568689 |
comparison
equal
deleted
inserted
replaced
269:6e78137952af | 270:2e58a4094770 |
---|---|
197 { | 197 { |
198 int8_t percentageO2; | 198 int8_t percentageO2; |
199 int8_t percentageHe; | 199 int8_t percentageHe; |
200 } SManualGas; | 200 } SManualGas; |
201 | 201 |
202 void logbook_writeSample(SDiveState *state); | 202 void logbook_writeSample(const SDiveState *state); |
203 void logbook_initNewdiveProfile(const SDiveState* pInfo, SSettings* pSettings); | 203 void logbook_initNewdiveProfile(const SDiveState* pInfo, SSettings* pSettings); |
204 void logbook_EndDive(void); | 204 void logbook_EndDive(void); |
205 | 205 |
206 SLogbookHeader* logbook_getCurrentHeader(void); | 206 SLogbookHeader* logbook_getCurrentHeader(void); |
207 SLogbookHeaderOSTC3 * logbook_build_ostc3header(SLogbookHeader* pLogbookHeader); | 207 SLogbookHeaderOSTC3 * logbook_build_ostc3header(SLogbookHeader* pLogbookHeader); |
209 | 209 |
210 uint8_t logbook_getNumberOfHeaders(void); | 210 uint8_t logbook_getNumberOfHeaders(void); |
211 uint8_t logbook_getHeader(uint8_t StepBackwards,SLogbookHeader* pLogbookHeader); | 211 uint8_t logbook_getHeader(uint8_t StepBackwards,SLogbookHeader* pLogbookHeader); |
212 uint16_t logbook_readSampleData(uint8_t StepBackwards, uint16_t length,uint16_t* depth, uint8_t* gasid, int16_t* temperature, uint16_t* ppo2, uint16_t* setpoint, uint16_t* sensor1, uint16_t* sensor2, uint16_t* sensor3, uint16_t* cns, uint8_t* bailout, uint16_t* decostopDepth); | 212 uint16_t logbook_readSampleData(uint8_t StepBackwards, uint16_t length,uint16_t* depth, uint8_t* gasid, int16_t* temperature, uint16_t* ppo2, uint16_t* setpoint, uint16_t* sensor1, uint16_t* sensor2, uint16_t* sensor3, uint16_t* cns, uint8_t* bailout, uint16_t* decostopDepth); |
213 void logbook_test(void); | 213 void logbook_test(void); |
214 void logbook_InitAndWrite(void); | 214 void logbook_InitAndWrite(const SDiveState* pStateReal); |
215 void logbook_recover_brokenlog(uint8_t headerId); | 215 void logbook_recover_brokenlog(uint8_t headerId); |
216 | 216 |
217 uint16_t logbook_lastDive_diveNumber(void); | 217 uint16_t logbook_lastDive_diveNumber(void); |
218 | 218 |
219 #endif /* LOGBOOK_H */ | 219 #endif /* LOGBOOK_H */ |