Fix red introduced in 841e704fc3

Change-Id: I5a924f77231a4764f3ad9b196875f5bf073945d6
This commit is contained in:
Solomon Peachy 2021-07-07 09:48:40 -04:00
parent 841e704fc3
commit e9ae1e9a8b
2 changed files with 8 additions and 2 deletions

View file

@ -103,10 +103,12 @@ static unsigned int avgbat;
/* filtered battery voltage, millivolts */ /* filtered battery voltage, millivolts */
static unsigned int battery_millivolts; static unsigned int battery_millivolts;
#else #else
#ifndef SIMULATOR
int _battery_voltage(void) { return -1; } int _battery_voltage(void) { return -1; }
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11]; const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11];
const unsigned short percent_to_volt_charge[11]; const unsigned short percent_to_volt_charge[11];
#endif #endif
#endif
#if !(CONFIG_BATTERY_MEASURE & TIME_MEASURE) #if !(CONFIG_BATTERY_MEASURE & TIME_MEASURE)
static int powermgmt_est_runningtime_min; static int powermgmt_est_runningtime_min;

View file

@ -111,13 +111,17 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
const unsigned short percent_to_volt_charge[11] = const unsigned short percent_to_volt_charge[11] =
{ 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 }; { 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 };
int _battery_voltage(void) int _battery_voltage(void)
{ {
battery_status_update(); battery_status_update();
return battery_millivolts; return battery_millivolts;
} }
#if (CONFIG_BATTERY_MEASURE & TIME_MEASURE)
static int powermgmt_est_runningtime_min;
int _battery_time(void) { return powermgmt_est_runningtime_min; }
#endif
#if CONFIG_CHARGING #if CONFIG_CHARGING
unsigned int power_input_status(void) unsigned int power_input_status(void)
{ {