Mercurial > public > ostc4
diff Discovery/Src/logbook.c @ 483:90d1f793dcf2 FixLayout_Header_LogView
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"
author | ideenmodellierer |
---|---|
date | Tue, 26 May 2020 21:12:02 +0200 |
parents | 73da921869d9 |
children | b33a8c1c72e5 |
line wrap: on
line diff
--- 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); }