Skip to content

feat: calculate expected live position for remote drivers#1214

Merged
dc42 merged 8 commits into3.7-devfrom
3.7-dev-machine-position
Apr 13, 2026
Merged

feat: calculate expected live position for remote drivers#1214
dc42 merged 8 commits into3.7-devfrom
3.7-dev-machine-position

Conversation

@AndyEveritt
Copy link
Copy Markdown
Collaborator

Calculate the expected live position using the phase stepping method to enable better live position feedback of remote drivers.

Without this the live machine position is only updated frequently during homing moves and once per segment, this allows the inter segment position to be calculated in a more efficient way than using interrupts for the remote drivers

Copilot AI review requested due to automatic review settings March 10, 2026 13:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves live position reporting for (especially remote) drivers by computing an expected position from the active motion segment (phase-stepping style evaluation), instead of only updating at segment boundaries.

Changes:

  • Split “query motion” into a const/non-mutating GetCurrentMotion and a mutating UpdateCurrentMotion (advances segments as needed), for both Move and DriveMovement.
  • Use the new const motion query in Move::GetLiveMachineCoordinates() to provide more frequent live coordinate updates.
  • Improve step error debug output to include drive index and axis/extruder identifier; adjust segment preparation so u is available for the new motion evaluation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/Movement/Move.h Makes GetCurrentMotion const and adds UpdateCurrentMotion API.
src/Movement/Move.cpp Switches phase-stepping call sites to UpdateCurrentMotion; computes live coords via per-drive motion evaluation.
src/Movement/DriveMovement.h Introduces const GetCurrentMotion (non-advancing) and UpdateCurrentMotion (advancing) with updated docs.
src/Movement/DriveMovement.cpp Ensures u is calculated early; enhances step error logging context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Movement/Move.cpp Outdated
Comment thread src/Movement/DriveMovement.h Outdated
Comment thread src/Movement/DriveMovement.h Outdated
Comment thread src/Movement/DriveMovement.h Outdated
Comment thread src/Movement/Move.cpp Outdated
@dc42 dc42 merged commit bad4820 into 3.7-dev Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants