Browse Source

Set full voltage correctly to ensure percentage range fits. Force all users to new value by param renaming. Since this will tend to show batteries as more drained than before, this is a change in a safe direction and will not trigger unnoticed discharges.

sbg
Lorenz Meier 11 years ago
parent
commit
3935540c7d
  1. 6
      src/modules/commander/commander_helper.cpp
  2. 2
      src/modules/commander/commander_params.c

6
src/modules/commander/commander_helper.cpp

@ -289,8 +289,8 @@ float battery_remaining_estimate_voltage(float voltage, float discharged, float @@ -289,8 +289,8 @@ float battery_remaining_estimate_voltage(float voltage, float discharged, float
static param_t bat_n_cells_h;
static param_t bat_capacity_h;
static param_t bat_v_load_drop_h;
static float bat_v_empty = 3.2f;
static float bat_v_full = 4.0f;
static float bat_v_empty = 3.4f;
static float bat_v_full = 4.2f;
static float bat_v_load_drop = 0.1f;
static int bat_n_cells = 3;
static float bat_capacity = -1.0f;
@ -299,7 +299,7 @@ float battery_remaining_estimate_voltage(float voltage, float discharged, float @@ -299,7 +299,7 @@ float battery_remaining_estimate_voltage(float voltage, float discharged, float
if (!initialized) {
bat_v_empty_h = param_find("BAT_V_EMPTY");
bat_v_full_h = param_find("BAT_V_FULL");
bat_v_full_h = param_find("BAT_V_CHARGED");
bat_n_cells_h = param_find("BAT_N_CELLS");
bat_capacity_h = param_find("BAT_CAPACITY");
bat_v_load_drop_h = param_find("BAT_V_LOAD_DROP");

2
src/modules/commander/commander_params.c

@ -65,7 +65,7 @@ PARAM_DEFINE_FLOAT(BAT_V_EMPTY, 3.4f); @@ -65,7 +65,7 @@ PARAM_DEFINE_FLOAT(BAT_V_EMPTY, 3.4f);
*
* @group Battery Calibration
*/
PARAM_DEFINE_FLOAT(BAT_V_FULL, 4.15f);
PARAM_DEFINE_FLOAT(BAT_V_CHARGED, 4.2f);
/**
* Number of cells.

Loading…
Cancel
Save