summaryrefslogtreecommitdiff
path: root/uisimulator/common
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common')
-rw-r--r--uisimulator/common/powermgmt-sim.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/uisimulator/common/powermgmt-sim.c b/uisimulator/common/powermgmt-sim.c
index 3430b1ea79..511648bc9d 100644
--- a/uisimulator/common/powermgmt-sim.c
+++ b/uisimulator/common/powermgmt-sim.c
@@ -79,7 +79,7 @@ static void battery_status_update(void)
79#if CONFIG_CHARGING >= CHARGING_MONITOR 79#if CONFIG_CHARGING >= CHARGING_MONITOR
80 /* Keep external power until tick */ 80 /* Keep external power until tick */
81 ext_power_until_tick = current_tick + POWER_AFTER_CHARGE_TICKS; 81 ext_power_until_tick = current_tick + POWER_AFTER_CHARGE_TICKS;
82#elif CONFIG_CHARGING 82#elif CONFIG_CHARGING
83 /* Pretend the charger was disconnected */ 83 /* Pretend the charger was disconnected */
84 charger_input_state = CHARGER_UNPLUGGED; 84 charger_input_state = CHARGER_UNPLUGGED;
85#endif 85#endif
@@ -111,13 +111,17 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
111const unsigned short percent_to_volt_charge[11] = 111const unsigned short percent_to_volt_charge[11] =
112{ 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 }; 112{ 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 };
113 113
114
115int _battery_voltage(void) 114int _battery_voltage(void)
116{ 115{
117 battery_status_update(); 116 battery_status_update();
118 return battery_millivolts; 117 return battery_millivolts;
119} 118}
120 119
120#if (CONFIG_BATTERY_MEASURE & TIME_MEASURE)
121static int powermgmt_est_runningtime_min;
122int _battery_time(void) { return powermgmt_est_runningtime_min; }
123#endif
124
121#if CONFIG_CHARGING 125#if CONFIG_CHARGING
122unsigned int power_input_status(void) 126unsigned int power_input_status(void)
123{ 127{