diff Discovery/Src/logbook.c @ 325:8e62f4701676 fix-batt-1

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 <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Thu, 20 Jun 2019 14:24:57 +0200
parents 50c26a4442af
children e908b894f107
line wrap: on
line diff
--- 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