-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
crashdet_cancel()
doesnt cleanup all variables when USB printing
#4207
Conversation
crashdet_cancel()
doesnt cleanup all variables when using USB printingcrashdet_cancel()
doesnt cleanup all variables when USB printing
9593f50
to
9e78b13
Compare
I generally agree here, I think this has always been overlooked recently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree here, I think this has always been overlooked
Maybe we can also call directly print_stop() when handling the CRASHDET_CANCEL command in Marlin_main.cpp:4035.
9e78b13
to
5faa0d0
Compare
All values in bytes. Δ Delta to base
|
I pushed another commit which optimizes setting the crash detection on or off. |
crashdet_cancel()
doesnt cleanup all variables when USB printingcrashdet_cancel()
doesnt cleanup all variables when USB printing
Adding 🚧 to the title as this PR is not tested |
365ca48
to
5b4983a
Compare
I would think that this should behave similarly as when stopping the print via the LCD. Changed UnconditionalSto()p to not close the SD card file if we're using Octoprint. Then there shouldnt be any file open. Some of the variables which were not reset: isPrintPaused pause_time saved_start_position saved_printing_type Bed heater may be left on? Change in memory: Flash: -28 bytes SRAM: 0 bytes
Change in memory: Flash: -6 bytes SRAM: 0 bytes
Add function crashdet_use_eeprom_setting Change in memory: Flash: -52 bytes SRAM: 0 bytes
5b4983a
to
e1e0b0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on MK404
Started USB print
- Triggered crash recovers
- Triggered crash stop, stops the print correctly on printer and host
- Crash det. [OFF] does work as it ignores the crashes
Approved only change I would like to see is that Recover crash default is YES
crashdet_cancel()
doesnt cleanup all variables when USB printingcrashdet_cancel()
doesnt cleanup all variables when USB printing
This function doesn't look correct to me 🤔 I would think that this should behave similarly as when stopping the print via the LCD. This PR is my proposed improvement, un-tested at the moment.
Changed
UnconditionalStop()
to not close the SD card file if we're using Octoprint. Then there shouldnt be any file open.Some of the variables which were not reset:
isPrintPaused
pause_time
saved_start_position
saved_printing_type
It seems like the bed heater could also be left enabled?
Fixes #4324
Change in memory:
Flash: -28 bytes
SRAM: 0 bytes