Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
324:d4d8d717e9a7 | 325:8e62f4701676 |
---|---|
1199 logbook_SetAverageDepth(pStateReal->lifeData.average_depth_meter); | 1199 logbook_SetAverageDepth(pStateReal->lifeData.average_depth_meter); |
1200 logbook_SetMinTemperature(min_temperature_float_celsius); | 1200 logbook_SetMinTemperature(min_temperature_float_celsius); |
1201 logbook_SetMaxCNS(pStateReal->lifeData.cns); | 1201 logbook_SetMaxCNS(pStateReal->lifeData.cns); |
1202 logbook_SetCompartmentDesaturation(pStateReal); | 1202 logbook_SetCompartmentDesaturation(pStateReal); |
1203 logbook_SetLastStop(pStateReal->diveSettings.last_stop_depth_bar); | 1203 logbook_SetLastStop(pStateReal->diveSettings.last_stop_depth_bar); |
1204 header.batteryVoltage = pStateReal->lifeData.battery_voltage * 1000; | |
1204 logbook_EndDive(); | 1205 logbook_EndDive(); |
1205 bDiveMode = 0; | 1206 bDiveMode = 0; |
1206 } else | 1207 } else |
1207 { | 1208 { |
1208 ext_flash_enable_protection(); | 1209 ext_flash_enable_protection(); |