Logic fixed for charging/charged pin

This commit is contained in:
klaute 2019-02-02 15:21:03 +01:00
parent 1ea0ea410d
commit 589be0474f
1 changed files with 2 additions and 2 deletions

View File

@ -63,10 +63,10 @@ float getBatteryVoltage() {
}
float isBatCharging() {
if (HIGH == digitalRead(BAT_CHARGED_PIN))
if (LOW == digitalRead(BAT_CHARGED_PIN))
{
return BAT_CHARGE_STATE_CHARGED;
} else if (HIGH == digitalRead(BAT_CHARGING_PIN))
} else if (LOW == digitalRead(BAT_CHARGING_PIN))
{
return BAT_CHARGE_STATE_CHARGING;
}