-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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] sd abort: expose sd abort code path via new M524 #11386
[1.1.x] sd abort: expose sd abort code path via new M524 #11386
Conversation
Basically it just needs to be added to the http://reprap.org/wiki/G-code page to reserve it. It's the de-facto central repository for RepRap G-Codes. |
Check out the README and make a fork of https://github.com/MarlinFirmware/MarlinDocumentation and contribute to it just as you would contribute to the main Marlin repo:
|
After looking through the RepRap wiki G-codes page now I'm thinking that It might also be fine to make it an extension to |
Further testing, reveals that a subsequent M24 causes an endless loop of "Error:SD read error" lines, but that seems like a latent issue that has simply been exposed (and could be addressed through separate patches). Right now, it is a drastic improvement to be able to abort the job cleanly. |
The reprap wiki lists M33 twice.... Marlin already implements the "get long file name" version of the code. |
After further reflection on this issue, I would rather see Marlin add a new gcode than overload (and thus change) the semantics of an existing code. If hosts already support So, given a separate command, the existence of the
Personally, I would not put money on changing either of our I spent a little time to clone the MarlinDocumentation repository and add a blurb about From this perspective, adding FWIW, Marlin could drop its Still, this solution runs into the problem of shifting semantics and host software assuming old behavior, where old hosts ask for long names and the new firmware tries to abort a SD print job. With that in mind, we find ourselves with a new code, don't we? If we have usable and meaningful protocol versioning, we can later bump the version when all of this is done and the time comes to rename it to Certainly, that last option seems like a good candidate for the |
72f7cd2
to
3ef6cf0
Compare
With Marlin 1.1.x now end-of-life, all new code will have to be directed to the |
0e92833
to
dad2f63
Compare
5351fa1
to
6afe5ab
Compare
Description
This PR implements the Feature Request presented in issue #11377. It adds the M524 command as "SD abort job", performing the same logical checks that enable the Stop SD Job option in the LCD menu.
Why M524?
This feature was tested with my custom host software.
Benefits
Host software can trigger a graceful abort of an SD print job.
Related Issues
No new output has been added yet. If the command successfully closes the file, the firmware will produce the same output that the display would trigger. If a SD job is not being printed, that might deserve to be reported to the host, requiring a new message. That can be added as a follow-up patch in this PR, if all else looks good.
If the PR is accepted, the website needs to be updated to list the new code. How is that manged?