From af9c6e6fce9555267f7f0349d29f5fd5df19459b Mon Sep 17 00:00:00 2001 From: Oleg Date: Fri, 28 Aug 2020 04:47:27 +0300 Subject: [PATCH] batterry_status: fix checking default a_per_v --- src/modules/battery_status/analog_battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/battery_status/analog_battery.cpp b/src/modules/battery_status/analog_battery.cpp index a2e2835875..8823c2c600 100644 --- a/src/modules/battery_status/analog_battery.cpp +++ b/src/modules/battery_status/analog_battery.cpp @@ -116,7 +116,7 @@ AnalogBattery::updateParams() } } - if (_analog_params.a_per_v <= 0.0f) { + if (_analog_params.a_per_v < 0.0f) { /* apply scaling according to defaults if set to default */ _analog_params.a_per_v = BOARD_BATTERY1_A_PER_V;