changeset 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 7a17bfc932b6
children 0f5080f50ba7
files Discovery/Inc/logbook.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Inc/logbook.h	Tue May 26 21:13:00 2020 +0200
+++ b/Discovery/Inc/logbook.h	Tue May 26 21:13:12 2020 +0200
@@ -75,7 +75,6 @@
     uint8_t  gfAtBeginning;
     uint8_t  gfAtEnd;
     uint16_t personalDiveCount;
-    uint8_t  batteryCharge;
     SSetpointLog setpoint[NUM_GAS];
     uint16_t maxCNS;
     uint16_t averageDepth_mbar;
@@ -94,7 +93,8 @@
     uint8_t  diveMode;
     uint8_t  hwHudLastStatus; /* from here on identical to OSTC3 again */
     uint16_t hwHudBattery_mV;
-    uint8_t batteryGaugeRegisters[6];
+    uint8_t batteryGaugeRegisters[5];	/* former batteryGaugeRegisters (6 Bytes) which were not used => use as reserve to keep memory layout */
+    uint8_t batteryCharge;				/* first reuse byte */
     uint16_t diveHeaderEnd;
 } SLogbookHeader;