From 53b4f6406f336b59b850452cd848c3f3f9260823 Mon Sep 17 00:00:00 2001 From: nanthony21 Date: Sat, 10 Feb 2018 11:42:22 -0600 Subject: [PATCH] cell_voltage is no longer constant --- src/modules/systemlib/battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/systemlib/battery.cpp b/src/modules/systemlib/battery.cpp index dbc5360a41..c1d5c7b56c 100644 --- a/src/modules/systemlib/battery.cpp +++ b/src/modules/systemlib/battery.cpp @@ -173,7 +173,7 @@ Battery::estimateRemaining(float voltage_v, float current_a, float throttle_norm // remaining battery capacity based on voltage - const float cell_voltage = voltage_v / _n_cells.get(); + float cell_voltage = voltage_v / _n_cells.get(); // correct battery voltage locally for load drop to avoid estimation fluctuations if (_r_internal.get() >= 0.f) {