Update BatteryIcon.cpp
Improvement to the mapping of battery percentage to the battery icon to be displayed.
This commit is contained in:
		
							parent
							
								
									79f0fcb07a
								
							
						
					
					
						commit
						d0df278b0b
					
				@ -4,13 +4,13 @@
 | 
			
		||||
using namespace Pinetime::Applications::Screens;
 | 
			
		||||
 | 
			
		||||
const char* BatteryIcon::GetBatteryIcon(int batteryPercent) {
 | 
			
		||||
  if (batteryPercent > 90)
 | 
			
		||||
  if (batteryPercent > 87)
 | 
			
		||||
    return Symbols::batteryFull;
 | 
			
		||||
  if (batteryPercent > 75)
 | 
			
		||||
  if (batteryPercent > 62)
 | 
			
		||||
    return Symbols::batteryThreeQuarter;
 | 
			
		||||
  if (batteryPercent > 50)
 | 
			
		||||
  if (batteryPercent > 37)
 | 
			
		||||
    return Symbols::batteryHalf;
 | 
			
		||||
  if (batteryPercent > 25)
 | 
			
		||||
  if (batteryPercent > 12)
 | 
			
		||||
    return Symbols::batteryOneQuarter;
 | 
			
		||||
  return Symbols::batteryEmpty;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user