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 */
static unsigned int battery_millivolts;
#else
#ifndef SIMULATOR
int _battery_voltage(void) { return -1; }
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11];
const unsigned short percent_to_volt_charge[11];
#endif
#endif
#if !(CONFIG_BATTERY_MEASURE & TIME_MEASURE)
static int powermgmt_est_runningtime_min;

View File

@ -79,7 +79,7 @@ static void battery_status_update(void)
#if CONFIG_CHARGING >= CHARGING_MONITOR
/* Keep external power until tick */
ext_power_until_tick = current_tick + POWER_AFTER_CHARGE_TICKS;
#elif CONFIG_CHARGING
#elif CONFIG_CHARGING
/* Pretend the charger was disconnected */
charger_input_state = CHARGER_UNPLUGGED;
#endif
@ -111,13 +111,17 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
const unsigned short percent_to_volt_charge[11] =
{ 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 };
int _battery_voltage(void)
{
battery_status_update();
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
unsigned int power_input_status(void)
{