Mercurial > public > ostc4
comparison Discovery/Src/logbook.c @ 671:b456be1e152d Betatest
Support of unknown charging counter values:
The RTE now provides negativ charge counter values in case the counter value has not yet been confirmed by a completed charge cycle. Some condition checks needed to be updated to be compatible with the usage of negativ values.
| author | Ideenmodellierer |
|---|---|
| date | Sat, 12 Mar 2022 22:58:22 +0100 |
| parents | 1b995079c045 |
| children | 63c340abd70e |
comparison
equal
deleted
inserted
replaced
| 670:7a352b449055 | 671:b456be1e152d |
|---|---|
| 1307 logbook_SetMinTemperature(min_temperature_float_celsius); | 1307 logbook_SetMinTemperature(min_temperature_float_celsius); |
| 1308 logbook_SetMaxCNS(pStateReal->lifeData.cns); | 1308 logbook_SetMaxCNS(pStateReal->lifeData.cns); |
| 1309 logbook_SetCompartmentDesaturation(pStateReal); | 1309 logbook_SetCompartmentDesaturation(pStateReal); |
| 1310 logbook_SetLastStop(pStateReal->diveSettings.last_stop_depth_bar); | 1310 logbook_SetLastStop(pStateReal->diveSettings.last_stop_depth_bar); |
| 1311 gheader.batteryVoltage = pStateReal->lifeData.battery_voltage * 1000; | 1311 gheader.batteryVoltage = pStateReal->lifeData.battery_voltage * 1000; |
| 1312 gheader.batteryCharge = pStateReal->lifeData.battery_charge; | 1312 if(pStateReal->lifeData.battery_charge > 0.0) |
| 1313 { | |
| 1314 gheader.batteryCharge = pStateReal->lifeData.battery_charge; | |
| 1315 } | |
| 1316 else | |
| 1317 { | |
| 1318 gheader.batteryCharge = 0.0; | |
| 1319 } | |
| 1313 logbook_EndDive(); | 1320 logbook_EndDive(); |
| 1314 bDiveMode = 0; | 1321 bDiveMode = 0; |
| 1315 } else | 1322 } else |
| 1316 { | 1323 { |
| 1317 ext_flash_enable_protection(); | 1324 ext_flash_enable_protection(); |
