Round battery temperature
This commit is contained in:
		@@ -32,7 +32,7 @@
 | 
			
		||||
    <h3>{{b.name}}</h3>
 | 
			
		||||
    {{b.history[0].percentage * 100}}%
 | 
			
		||||
    <br>
 | 
			
		||||
    {{b.history[0].temp}} °C
 | 
			
		||||
    {{round(b.history[0].temp)}} °C
 | 
			
		||||
    <br>
 | 
			
		||||
    Charging: {{b.history[0].charging}}
 | 
			
		||||
</mat-card>
 | 
			
		||||
 
 | 
			
		||||
@@ -22,4 +22,8 @@ export class BatteryComponent {
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    constructor(public batteryService: BatteryService) { }
 | 
			
		||||
 | 
			
		||||
    round(num: number) {
 | 
			
		||||
        return Math.round(num * 10) / 10;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user