Skip to content

Commit c159bb0

Browse files
committed
[FIX] battery have a default voltage when off and plug in the rps function
1 parent 32beabf commit c159bb0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

elio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def repetition_per_second(self):
4848
float: The number of repetitions per second.
4949
"""
5050
vBatt = self.get_battery_voltage()
51+
if vBatt < 2:
52+
vBatt = 2
5153
rpm = 20.3 * vBatt
5254
rps = rpm / 60
5355
return rps

0 commit comments

Comments
 (0)