# HG changeset patch # User ideenmodellierer # Date 1590520322 -7200 # Node ID 90d1f793dcf2b4f21a2b69c9a4617a6ddbf01d74 # Parent 230aed360da00ab0acf55049dc8fbdf7b575cbb1 Development option only read bottledata: If the header divisor is set (in my case because of switching between development and main versions) the samples need to be read considering the bottle values, too. Divelogs written by a SW not supporting bottle pressure have the divisor set to 0 => no impact to main SW Bugfix header memory layout: The batterygaugeregisters were not used and will be reused for other information. To keep the OSTC3 format up and running the datafield is not filled with "0x00" diff -r 230aed360da0 -r 90d1f793dcf2 Discovery/Src/logbook.c --- a/Discovery/Src/logbook.c Tue May 19 07:27:18 2020 +0000 +++ b/Discovery/Src/logbook.c Tue May 26 21:12:02 2020 +0200 @@ -901,7 +901,6 @@ divisor.cns--; } -#ifdef ENABLE_BOTTLE_SENSOR if(smallHeader.tankDivisor) { if(divisor.tank == 0) @@ -920,7 +919,6 @@ divisor.tank--; } } -#endif if (length != 0) return 0; @@ -1618,8 +1616,7 @@ headerOSTC3.hwHudLastStatus = pHead->hwHudLastStatus; - memcpy(headerOSTC3.batteryGaugeRegisters,&pHead->batteryGaugeRegisters, 6); - + memset(headerOSTC3.batteryGaugeRegisters, 0x00, 6); /* The battery registers are not evaluated => Set to zero */ memcpy(headerOSTC3.diveHeaderEnd, &pHead->diveHeaderEnd, 2); }