Logic fixed for charging/charged pin

This commit is contained in:
klaute 2019-02-02 15:21:03 +01:00
parent 1ea0ea410d
commit 589be0474f

View file

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