Mercurial > public > ostc4
comparison Discovery/Inc/logbook.h @ 486:3db9eba89e3c FixLayout_Header_LogView
Bugfix header EEPROM layout:
Batterycharge was added to the header memory structure which is also used to store data in EEPROM => Information read from EEPROM which were created before the change was not read out correct.
To avoid this problem and to keep the layout consistent a not used data item has been changed to the new batterycharge value
author | ideenmodellierer |
---|---|
date | Tue, 26 May 2020 21:13:12 +0200 |
parents | 73da921869d9 |
children | b33a8c1c72e5 |
comparison
equal
deleted
inserted
replaced
485:7a17bfc932b6 | 486:3db9eba89e3c |
---|---|
73 uint16_t batteryVoltage; | 73 uint16_t batteryVoltage; |
74 uint16_t cnsAtBeginning; | 74 uint16_t cnsAtBeginning; |
75 uint8_t gfAtBeginning; | 75 uint8_t gfAtBeginning; |
76 uint8_t gfAtEnd; | 76 uint8_t gfAtEnd; |
77 uint16_t personalDiveCount; | 77 uint16_t personalDiveCount; |
78 uint8_t batteryCharge; | |
79 SSetpointLog setpoint[NUM_GAS]; | 78 SSetpointLog setpoint[NUM_GAS]; |
80 uint16_t maxCNS; | 79 uint16_t maxCNS; |
81 uint16_t averageDepth_mbar; | 80 uint16_t averageDepth_mbar; |
82 uint16_t total_diveTime_seconds; | 81 uint16_t total_diveTime_seconds; |
83 uint8_t salinity; | 82 uint8_t salinity; |
92 uint8_t lastDecostop_m; | 91 uint8_t lastDecostop_m; |
93 uint8_t CCRmode; | 92 uint8_t CCRmode; |
94 uint8_t diveMode; | 93 uint8_t diveMode; |
95 uint8_t hwHudLastStatus; /* from here on identical to OSTC3 again */ | 94 uint8_t hwHudLastStatus; /* from here on identical to OSTC3 again */ |
96 uint16_t hwHudBattery_mV; | 95 uint16_t hwHudBattery_mV; |
97 uint8_t batteryGaugeRegisters[6]; | 96 uint8_t batteryGaugeRegisters[5]; /* former batteryGaugeRegisters (6 Bytes) which were not used => use as reserve to keep memory layout */ |
97 uint8_t batteryCharge; /* first reuse byte */ | |
98 uint16_t diveHeaderEnd; | 98 uint16_t diveHeaderEnd; |
99 } SLogbookHeader; | 99 } SLogbookHeader; |
100 | 100 |
101 //Logbook OSTC3 | 101 //Logbook OSTC3 |
102 typedef struct | 102 typedef struct |