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 authored and rogerlz committed Jul 4, 2024
1 parent c37fab4 commit 82364d4
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 @@ -338,7 +338,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
Expand Down

0 comments on commit 82364d4

Please sign in to comment.