Round up the charge % when drawing battery icon (#912)
Causes anxious urge to recharge otherwise
This commit is contained in:
		
							parent
							
								
									93871f9425
								
							
						
					
					
						commit
						26b2d07dd6
					
				@ -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) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user