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.

This commit is contained in:
Lorenz Meier 2014-07-20 16:23:43 +02:00
parent e21cb64553
commit 3935540c7d
2 changed files with 4 additions and 4 deletions

View File

@ -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_n_cells_h;
static param_t bat_capacity_h; static param_t bat_capacity_h;
static param_t bat_v_load_drop_h; static param_t bat_v_load_drop_h;
static float bat_v_empty = 3.2f; static float bat_v_empty = 3.4f;
static float bat_v_full = 4.0f; static float bat_v_full = 4.2f;
static float bat_v_load_drop = 0.1f; static float bat_v_load_drop = 0.1f;
static int bat_n_cells = 3; static int bat_n_cells = 3;
static float bat_capacity = -1.0f; static float bat_capacity = -1.0f;
@ -299,7 +299,7 @@ float battery_remaining_estimate_voltage(float voltage, float discharged, float
if (!initialized) { if (!initialized) {
bat_v_empty_h = param_find("BAT_V_EMPTY"); 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_n_cells_h = param_find("BAT_N_CELLS");
bat_capacity_h = param_find("BAT_CAPACITY"); bat_capacity_h = param_find("BAT_CAPACITY");
bat_v_load_drop_h = param_find("BAT_V_LOAD_DROP"); bat_v_load_drop_h = param_find("BAT_V_LOAD_DROP");

View File

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