# HG changeset patch # User Jan Mulder # Date 1561033497 -7200 # Node ID 8e62f4701676bc6b5ada2d31180457a80aa8889f # Parent d4d8d717e9a711eae78ecfd4a9c21a4d4d9aad91 bugfix: implement battery at end in dive header For some reason, the byte 50/51 data in the dive header was not populated at the end of dive. These bytes represent the battery voltage (in mV) at end in dive. Simply implement it in this commit. Signed-off-by: Jan Mulder diff -r d4d8d717e9a7 -r 8e62f4701676 Discovery/Src/logbook.c --- a/Discovery/Src/logbook.c Sun Jun 30 22:12:15 2019 +0200 +++ b/Discovery/Src/logbook.c Thu Jun 20 14:24:57 2019 +0200 @@ -1201,6 +1201,7 @@ logbook_SetMaxCNS(pStateReal->lifeData.cns); logbook_SetCompartmentDesaturation(pStateReal); logbook_SetLastStop(pStateReal->diveSettings.last_stop_depth_bar); + header.batteryVoltage = pStateReal->lifeData.battery_voltage * 1000; logbook_EndDive(); bDiveMode = 0; } else