Skip to content

Commit

Permalink
motan: Fix logic error resulting in incorrect stepper phase graphing
Browse files Browse the repository at this point in the history
The mcu_phase_offset should be added not subtracted.

Signed-off-by: Kevin O'Connor <[email protected]>
  • Loading branch information
KevinOConnor committed Jun 5, 2024
1 parent 6cd1742 commit 49c0ad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/motan/readlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def pull_data(self, req_time):
self._pull_block(req_time)
continue
step_pos = step_data[data_pos][1]
return (step_pos - self.mcu_phase_offset) % self.phases
return (step_pos + self.mcu_phase_offset) % self.phases
def _pull_block(self, req_time):
step_data = self.step_data
del step_data[:-1]
Expand Down

0 comments on commit 49c0ad6

Please sign in to comment.