We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent def43ba commit ba3e0b5Copy full SHA for ba3e0b5
arduino_alvik.py
@@ -609,12 +609,14 @@ def _parse_message(self) -> int:
609
610
return 0
611
612
- def get_battery_charge(self) -> float:
+ def get_battery_charge(self) -> int:
613
"""
614
Returns the battery SOC
615
:return:
616
617
- return self.battery_perc
+ if self.battery_perc > 100:
618
+ return 100
619
+ return round(self.battery_perc)
620
621
def _get_touch(self) -> int:
622
0 commit comments