Automatic Tool Migration feature (#17248)

This commit is contained in:
studiodyne
2020-04-23 04:03:28 +02:00
committed by GitHub
parent 4dce03fa42
commit 2f6262c27b
27 changed files with 575 additions and 151 deletions

View File

@ -39,6 +39,10 @@ bool FilamentMonitorBase::enabled = true,
bool FilamentMonitorBase::host_handling; // = false
#endif
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
#include "../module/tool_change.h"
#endif
/**
* Called by FilamentSensorSwitch::run when filament is detected.
* Called by FilamentSensorEncoder::block_completed when motion is detected.
@ -76,6 +80,11 @@ 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; }
#endif
TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getActiveTool()));
#if EITHER(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS)