From a18f22bd918f4f482f023c0500419b9621cb3df3 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;