소스 검색

Round up the charge % when drawing battery icon (#912)

Causes anxious urge to recharge otherwise
Vlad Roskov 4 년 전
부모
커밋
26b2d07dd6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      applications/power/power_service/power.c

+ 1 - 1
applications/power/power_service/power.c

@@ -17,7 +17,7 @@ void power_draw_battery_callback(Canvas* canvas, void* context) {
     furi_assert(context);
     furi_assert(context);
     Power* power = context;
     Power* power = context;
     canvas_draw_icon(canvas, 0, 0, &I_Battery_26x8);
     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) {
 static ViewPort* power_battery_view_port_alloc(Power* power) {