New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.1.x] Operate in Native Machine Space #8229
[1.1.x] Operate in Native Machine Space #8229
Conversation
94df280
to
a07dd28
Compare
Looks like quite the improvement. |
a07dd28
to
072c3c6
Compare
072c3c6
to
47a359f
Compare
Looks like must be tested, tested, TESTED! |
That's why it's here, instead of in my back pocket. 😉 The most likely issue I expect would be changes that got missed. Checking over the changes that have been made, they're all simplifications. The key thing: Every function and all logic should now deal only with machine-native coordinates. Only when doing input/output with the outside world do we need to subtract/add workspace offsets. A true relief, as this has been a source of confusion and errors — some of which this PR repairs. |
cefd900
to
cca7fad
Compare
91f69f3
to
b38d04d
Compare
bb58d68
to
524f4ee
Compare
b38d04d
to
8081694
Compare
Thank you for asking me. Yes i'm very interested... |
8081694
to
640526f
Compare
Installed and tested, and it's working well. The amount of computational savings is essentially the same as using |
Background: Marlin operates internally using coordinates offset by the current workspace origin. As a result, in order to perform operations that are workspace-agnostic —such as moving to a machine-relative point, doing bed leveling, etc— Marlin must subtract the workspace origin first. This can significantly increase overhead, especially when using segmented moves, as we do with Delta (and as we will be doing more as a standard aspect of mesh leveling).
Proposal: Internally, always work in native machine space, but subtract the workspace offset in
gcode_get_destination
(and other parameters that take coordinates), and add the workspace offset when reporting current position to the LCD or host.From the user perspective there will be no change whatsoever.
An extra advantage of this approach is that it will be possible to use the fixed-point planner (due to be added soon) even when custom workspaces are enabled.
Suggested by @GMagician in response to #8200.
@MagoKimbra — I think you'll approve of this one.
@MarlinFirmware/testers-cartesian-team
@MarlinFirmware/testers-corexy-team
@MarlinFirmware/testers-delta-team