Fix pause/resume SD print

Followup to #12551, addressing #12566
This commit is contained in:
Scott Lahteine
2018-11-30 19:22:56 -06:00
parent 2224a4d61a
commit 261c6f4b96
6 changed files with 18 additions and 22 deletions

View File

@ -91,17 +91,11 @@ void GcodeSuite::M24() {
#if ENABLED(POWER_LOSS_RECOVERY)
if (parser.seenval('S')) card.setIndex(parser.value_long());
if (parser.seenval('T')) print_job_timer.resume(parser.value_long());
#endif
card.startFileprint();
#if ENABLED(POWER_LOSS_RECOVERY)
if (parser.seenval('T'))
print_job_timer.resume(parser.value_long());
else
#endif
print_job_timer.start();
print_job_timer.start();
ui.reset_status();
}
@ -109,11 +103,12 @@ void GcodeSuite::M24() {
* M25: Pause SD Print
*/
void GcodeSuite::M25() {
card.pauseSDPrint();
print_job_timer.pause();
#if ENABLED(PARK_HEAD_ON_PAUSE)
enqueue_and_echo_commands_P(PSTR("M125 S")); // To be last in the buffer, must enqueue after pauseSDPrint
M125();
#else
card.pauseSDPrint();
print_job_timer.pause();
ui.reset_status();
#endif
}