From 26b2d07dd623dbc781bd712e481d1fd375ddc1c3 Mon Sep 17 00:00:00 2001 From: Vlad Roskov Date: Sat, 18 Dec 2021 14:11:18 +0300 Subject: [PATCH] Round up the charge % when drawing battery icon (#912) Causes anxious urge to recharge otherwise --- applications/power/power_service/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/power/power_service/power.c b/applications/power/power_service/power.c index a1bdc854..61a35b6a 100644 --- a/applications/power/power_service/power.c +++ b/applications/power/power_service/power.c @@ -17,7 +17,7 @@ void power_draw_battery_callback(Canvas* canvas, void* context) { furi_assert(context); Power* power = context; canvas_draw_icon(canvas, 0, 0, &I_Battery_26x8); - canvas_draw_box(canvas, 2, 2, power->info.charge / 5, 4); + canvas_draw_box(canvas, 2, 2, (power->info.charge + 4) / 5, 4); } static ViewPort* power_battery_view_port_alloc(Power* power) {