mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Update pisugarx.py
limits % to no deci dunno how i missed this lol Signed-off-by: LH <140523069+renewedbullet@users.noreply.github.com>
This commit is contained in:
@ -264,7 +264,7 @@ class PiSugar(plugins.Plugin):
|
|||||||
if self.drot == 0: # show battery voltage
|
if self.drot == 0: # show battery voltage
|
||||||
ui.set('bat', f"{voltage:.2f}V")
|
ui.set('bat', f"{voltage:.2f}V")
|
||||||
elif self.drot == 1: # show battery capacity
|
elif self.drot == 1: # show battery capacity
|
||||||
ui.set('bat', f"{capacity:.2f}%")
|
ui.set('bat', f"{capacity:.0f}%")
|
||||||
else: # show battery temperature
|
else: # show battery temperature
|
||||||
ui.set('bat', f"{temp}°C")
|
ui.set('bat', f"{temp}°C")
|
||||||
else:
|
else:
|
||||||
@ -272,7 +272,7 @@ class PiSugar(plugins.Plugin):
|
|||||||
if self.default_display == 'voltage':
|
if self.default_display == 'voltage':
|
||||||
ui.set('bat', f"{voltage:.2f}V")
|
ui.set('bat', f"{voltage:.2f}V")
|
||||||
elif self.default_display in ['percentage', 'percent']:
|
elif self.default_display in ['percentage', 'percent']:
|
||||||
ui.set('bat', f"{capacity:.2f}%")
|
ui.set('bat', f"{capacity:.0f}%")
|
||||||
elif self.default_display == 'temp':
|
elif self.default_display == 'temp':
|
||||||
ui.set('bat', f"{temp}°C")
|
ui.set('bat', f"{temp}°C")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user