diff --git a/include/defaults.h b/include/defaults.h index 67b1d122e..2ab8ec9e8 100644 --- a/include/defaults.h +++ b/include/defaults.h @@ -155,7 +155,7 @@ #define BATTERY_JKBMS_INTERFACE 0 #define BATTERY_JKBMS_POLLING_INTERVAL 5 #define BATTERY_ENABLE_DISCHARGE_CURRENT_LIMIT false -#define BATTERY_DISCHARGE_CURRENT_LIMIT 0 +#define BATTERY_DISCHARGE_CURRENT_LIMIT 0.0 #define BATTERY_USE_BATTERY_REPORTED_DISCHARGE_CURRENT_LIMIT false #define HUAWEI_ENABLED false 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;