Enable filament change feature

Adding support for headless M600/M108 filament change

Addressing #15
This commit is contained in:
David Ramiro
2019-02-05 15:24:00 +01:00
parent 79d00d560f
commit 5f7a252267
5 changed files with 56 additions and 12 deletions

View File

@@ -234,6 +234,12 @@ void AnycubicTFTClass::HandleSpecialMenu()
} else if (strcmp(SelectedDirectory, "<z down 0.1>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: Z Down 0.1");
enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-0.1\nG90"));
} else if (strcmp(SelectedDirectory, "<m600 pause>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: M600 Pause");
enqueue_and_echo_commands_P(PSTR("M600"));
} else if (strcmp(SelectedDirectory, "<m108 resume>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: M108 Resume");
enqueue_and_echo_commands_P(PSTR("M108"));
} else if (strcmp(SelectedDirectory, "<exit>")==0) {
SpecialMenu=false;
}
@@ -276,6 +282,13 @@ void AnycubicTFTClass::Ls()
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
break;
case 12: // Fourth Page
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M600 Pause>");
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M600 Pause>");
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M108 Resume>");
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M108 Resume>");
break;
default:
break;
}

View File

@@ -467,7 +467,7 @@
* Note: For Bowden Extruders make this large enough to allow load/unload.
*/
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
#define EXTRUDE_MAXLENGTH 600
//===========================================================================
//======================== Thermal Runaway Protection =======================
@@ -1284,7 +1284,7 @@
* P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/
//#define NOZZLE_PARK_FEATURE
#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }

View File

@@ -917,7 +917,7 @@
// enter the serial receive buffer, so they cannot be blocked.
// Currently handles M108, M112, M410
// Does not work on boards using AT90USB (USBCON) processors!
//#define EMERGENCY_PARSER
#define EMERGENCY_PARSER
// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients abort after 30 seconds in a timeout.
@@ -978,23 +978,23 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
//#define ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 500 // (mm) The length of filament for a complete unload.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
// Set to 0 for manual unloading.
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
// 0 to disable start loading and skip to fast load only
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 500 // (mm) Load length of filament, from extruder gear to nozzle.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
@@ -1009,11 +1009,11 @@
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
#define PAUSE_PARK_NOZZLE_TIMEOUT 300 // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
//#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.

View File

@@ -48,7 +48,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2019-02-02"
#define STRING_DISTRIBUTION_DATE "2019-02-05"
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.