Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion VitesseAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,12 @@ def clearEncoders(self):
# backward compatible with older firmware
if (self.version < 1000):
return self


# numClearCountersOn is capped at 5 per call.
# Clear Cart X/Y/Theta accumulator.
self.clearCounterEnable([0, 0, 0, 0, 0, 0, 0, 0])
self.clearCounterEnable([0, 0, 0, 0, 1, 1, 1, 0])
# Clear encoder 1 and 2.
self.clearCounterEnable([0, 0, 0, 0, 0, 0, 0, 0])
self.clearCounterEnable([1, 0, 0, 0, 0, 0, 0, 0])
return self
Expand Down