Mercurial > public > ostc4
diff Discovery/Src/check_warning.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 | 6de83d8205a0 |
line wrap: on
line diff
--- a/Discovery/Src/check_warning.c Sat Mar 12 22:54:26 2022 +0100 +++ b/Discovery/Src/check_warning.c Sat Mar 12 22:58:22 2022 +0100 @@ -348,7 +348,7 @@ static int8_t check_Battery(SDiveState * pDiveState) { - if(pDiveState->lifeData.battery_charge < 10) + if((pDiveState->lifeData.battery_charge > 0) && (pDiveState->lifeData.battery_charge < 10)) pDiveState->warnings.lowBattery = 1; else pDiveState->warnings.lowBattery = 0;