Logic fixed for charging/charged pin
This commit is contained in:
parent
1ea0ea410d
commit
589be0474f
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue