Fix "paused" message and M125 called by M25 (#12551)

This commit is contained in:
Scott Lahteine
2018-11-28 19:28:31 -06:00
committed by GitHub
parent 95d154a91f
commit 03ef2d6c82
8 changed files with 24 additions and 32 deletions

View File

@ -68,15 +68,16 @@ void GcodeSuite::M125() {
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
#endif
const bool job_running = print_job_timer.isRunning(),
sd_printing = IS_SD_PRINTING();
if (pause_print(retract, park_point)) {
#if ENABLED(SDSUPPORT)
const bool sd_printing = IS_SD_PRINTING() || parser.boolval('S'); // Undocumented parameter
#else
constexpr bool sd_printing = false;
#endif
if (!sd_printing) {
wait_for_confirmation();
resume_print();
}
if (job_running) print_job_timer.start();
}
}

View File

@ -129,8 +129,6 @@ void GcodeSuite::M600() {
#endif
);
const bool job_running = print_job_timer.isRunning();
if (pause_print(retract, park_point, unload_length, true DXC_PASS)) {
wait_for_confirmation(true, beep_count DXC_PASS);
resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count DXC_PASS);
@ -141,9 +139,6 @@ void GcodeSuite::M600() {
if (active_extruder_before_filament_change != active_extruder)
tool_change(active_extruder_before_filament_change, 0, true);
#endif
// Resume the print job timer if it was running
if (job_running) print_job_timer.start();
}
#endif // ADVANCED_PAUSE_FEATURE

View File

@ -113,7 +113,7 @@ void GcodeSuite::M25() {
print_job_timer.pause();
#if ENABLED(PARK_HEAD_ON_PAUSE)
enqueue_and_echo_commands_P(PSTR("M125")); // Must be enqueued with pauseSDPrint set to be last in the buffer
enqueue_and_echo_commands_P(PSTR("M125 S")); // To be last in the buffer, must enqueue after pauseSDPrint
#endif
}