Tool Change Migration fixes and debugging (#18448)

This commit is contained in:
InsanityAutomation
2020-06-27 22:57:01 -04:00
committed by GitHub
parent e392745c86
commit c1dcc56a0b
4 changed files with 45 additions and 8 deletions

View File

@ -40,6 +40,7 @@ bool FilamentMonitorBase::enabled = true,
#endif
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
//#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
#include "../module/tool_change.h"
#endif
@ -80,8 +81,18 @@ void event_filament_runout() {
if (TERN0(ADVANCED_PAUSE_FEATURE, did_pause_print)) return; // Action already in progress. Purge triggered repeated runout.
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
if (migration.in_progress) return; // Action already in progress. Purge triggered repeated runout.
if (migration.automode) { extruder_migration(); return; }
if (migration.in_progress) {
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
SERIAL_ECHOLN("Migration Already In Progress");
#endif
return; // Action already in progress. Purge triggered repeated runout.
}
if (migration.automode) {
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
SERIAL_ECHOLN("Migration Starting");
#endif
if (extruder_migration()) return;
}
#endif
TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getActiveTool()));