From 41e49ef4e6e7b27ef5fa65415c11bfd3ebd43d92 Mon Sep 17 00:00:00 2001 From: o9000 Date: Fri, 19 Jan 2018 21:20:03 +0000 Subject: [PATCH] Do not spin when battery is unplugged --- src/battery/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battery/battery.c b/src/battery/battery.c index f89f8af..eb8ae62 100644 --- a/src/battery/battery.c +++ b/src/battery/battery.c @@ -225,7 +225,7 @@ void init_battery() battery_found = battery_os_init(); - change_timer(&battery_timer, true, 10, 30000, update_battery_tick, 0); + change_timer(&battery_timer, true, battery_found ? 10 : 30000, 30000, update_battery_tick, 0); update_battery(); }