From 589be0474f23040d2e6e2b8688b0e6c56bab9ae4 Mon Sep 17 00:00:00 2001 From: klaute Date: Sat, 2 Feb 2019 15:21:03 +0100 Subject: [PATCH] Logic fixed for charging/charged pin --- firmware/sensors.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/sensors.ino b/firmware/sensors.ino index 2123cfb..4fc5c14 100755 --- a/firmware/sensors.ino +++ b/firmware/sensors.ino @@ -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; }