feat: calculate expected live position for remote drivers#1214
Merged
Conversation
There was a problem hiding this comment.
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
GetCurrentMotionand a mutatingUpdateCurrentMotion(advances segments as needed), for bothMoveandDriveMovement. - 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
uis 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.
dc42
reviewed
Mar 16, 2026
dc42
reviewed
Mar 16, 2026
dc42
reviewed
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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