From 28c0c9d7a57cb0c8e94167201ffc469889d1b694 Mon Sep 17 00:00:00 2001 From: Tobias Diedrich Date: Sat, 28 Sep 2024 21:41:34 +0200 Subject: [PATCH] Fix typo in Battery.cpp When the limit is valid, use the actual configured limit, not the bool value :) --- src/Battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Battery.cpp b/src/Battery.cpp index e10abb1fa..7483c1de4 100644 --- a/src/Battery.cpp +++ b/src/Battery.cpp @@ -108,7 +108,7 @@ float BatteryClass::getDischargeCurrentLimit() } if (dischargeCurrentValid) { - return dischargeCurrentValid; + return dischargeCurrentLimit; } return FLT_MAX;