Fix SD_FINISHED_RELEASECOMMAND bug

Fixes #17401 bug that was introduced in 8f26c3a
This commit is contained in:
Scott Lahteine
2020-04-11 21:27:49 -05:00
parent a97ae51cc7
commit 7aed32df00
6 changed files with 21 additions and 18 deletions

View File

@ -27,6 +27,10 @@
#include "../gcode.h"
#include "../../module/printcounter.h"
#ifdef SD_FINISHED_RELEASECOMMAND
#include "../queue.h"
#endif
#if EITHER(LCD_SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE)
#include "../../lcd/ultralcd.h"
#endif
@ -47,10 +51,6 @@
#include "../../feature/host_actions.h"
#endif
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
#include "../../module/planner.h"
#endif
#ifndef PE_LEDS_COMPLETED_TIME
#define PE_LEDS_COMPLETED_TIME (30*60)
#endif
@ -95,9 +95,9 @@ void GcodeSuite::M1001() {
}
#endif
// Wait for the queue to empty (and "clean"), inject SD_FINISHED_RELEASECOMMAND
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
planner.finish_and_disable();
// Inject SD_FINISHED_RELEASECOMMAND, if any
#ifdef SD_FINISHED_RELEASECOMMAND
queue.inject_P(PSTR(SD_FINISHED_RELEASECOMMAND));
#endif
// Re-select the last printed file in the UI