Skip to content

Commit 2d36203

Browse files
authored
Merge pull request #89 from Open-STEM/setspeedfixes
Clear speed controller history when set_speed is 0
2 parents 223085f + 5a203e9 commit 2d36203

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

XRPLib/encoded_motor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def set_speed(self, speed_rpm: float = None):
173173
if speed_rpm is None or speed_rpm == 0:
174174
self.target_speed = None
175175
self.set_effort(0)
176+
self.speedController.clear_history()
176177
return
177178
# Convert from rev per min to counts per 20ms (60 sec/min, 50 Hz)
178179
self.target_speed = speed_rpm*self._encoder.resolution/(60*50)

0 commit comments

Comments
 (0)