Add turn90 row advance mode and pen-state simulation#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e101d4d18e
ℹ️ 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(dy) > 1e-9: | ||
| turn_dir = math.copysign(math.pi / 2.0, dy) | ||
| emit_turn_in_place(out, turn_dir, feed_turn) | ||
| heading = wrap_pi(heading + turn_dir) | ||
| emit_straight(out, abs(dy), feed_lin) |
There was a problem hiding this comment.
Choose turn90 vertical turn based on current heading
The new turn90 row advance always turns sign(dy) * 90° before the vertical leg, independent of the current heading. After finishing a serpentine row drawn right‑to‑left the heading is π, so for the next row (dy > 0) this code rotates +90° and drives along −Y, stepping to the wrong row before turning back. In turn90 mode every odd serpentine row will traverse the opposite vertical direction, so the plotter heads to the wrong row and subsequent strokes are misplaced.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task