Skip to content
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

refactor(ControlPanel): use SAVE/RESTORE STATE when moving #1988

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

meteyou
Copy link
Member

@meteyou meteyou commented Sep 1, 2024

Description

This PR should switch to SAVE_GCODE_STATE/RESTORE_GCODE_STATE to set everytime back to the original movement mode.

Related Tickets & Documents

Comment from @pedrolamas in the extrude panel PR: #1965 (comment)

Mobile & Desktop Screenshots/Recordings

Bildschirmaufnahme.2024-09-01.um.23.56.39.mov

[optional] Are there any post-deployment tasks we need to perform?

none

…e commands

Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
@meteyou meteyou changed the title refactor(ControlPanel): use SAVE/RESTORE STATE when sending mov… refactor(ControlPanel): use SAVE/RESTORE STATE when moving Sep 1, 2024
@zellneralex
Copy link
Member

zellneralex commented Sep 3, 2024

Tested several edge cases:

  • very slow moves (1mm/sec) and tried to modify other values like babystepping, speed and extruder factor while the move is ongoing
  • multiple hitting of the move arrow while slow and fast (100 mm/sec) moves. System starts in absolute and must also end in that mode.

All tests where PASS so that I would approve the change

@meteyou meteyou marked this pull request as ready for review September 3, 2024 07:57
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 3, 2024
@pedrolamas
Copy link
Contributor

I guess the question now is in terms of value provided: I do think this makes sense, but does it solve a problem or provide new value?

The only downside I could see is that it adds a lot of "noise" to the logs... but even that is mitigatable, I think!

@meteyou
Copy link
Member Author

meteyou commented Sep 3, 2024

I guess the question now is in terms of value provided: I do think this makes sense, but does it solve a problem or provide new value?

The only downside I could see is that it adds a lot of "noise" to the logs... but even that is mitigatable, I think!

It only brings the "added value" that the previous mode is always set again. Some users, for example, do not have absolute mode in their start macro. We have already had a few support-requests as to "why the printer cannot print after a movement" (out-of-range message).

Where you should say, “Please fix your gcode/macros”... So it's a trade-off between “error protection” vs “noise in the console”.

Co-authored-by: Pedro Lamas <pedrolamas@gmail.com>
@meteyou
Copy link
Member Author

meteyou commented Sep 3, 2024

@pedrolamas thx for your suggestion! you are complete right. i also opened a PR to rename the gcode_state name in the extruder panel.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 5, 2024
@meteyou meteyou merged commit 0bbf359 into mainsail-crew:develop Nov 5, 2024
11 checks passed
@meteyou meteyou deleted the refactor/control-panel branch November 5, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants