Ensure real90 axis moves are signed and axis-aligned#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9079744791
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if abs(dtheta) > 1e-9: | ||
| emit_turn_in_place(out, dtheta, feed_turn) | ||
| heading = axis_y | ||
| emit_straight(out, abs(dy), feed_lin) | ||
| heading = axis_heading | ||
| if abs(delta) > 1e-9: | ||
| emit_straight(out, delta, feed_lin) |
There was a problem hiding this comment.
Signed axis legs reverse motion in real90 moves
In axis_move_to, emit_axis_leg now forwards the signed delta to emit_straight after rotating to the target axis heading. When dx/dy is negative (e.g., moving from x=10 to x=0 in real90 mode), the heading is set to π or -π/2 to face the target, but emit_straight receives a negative distance, which drives the robot backwards relative to that heading—moving away from the target instead of toward it. This reverses travel for any negative leg and prevents the plotter from reaching the intended point.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task