From c553c7f368b5fc80455c75e9c46386307caa7809 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Fri, 20 Jan 2017 16:20:45 +0100 Subject: [PATCH] M702: Unload filament; load filament fast sequence length: 65mm --- Firmware/Marlin_main.cpp | 18 +++++++++++++++--- Firmware/language_en.h | 1 + Firmware/ultralcd.cpp | 7 +++---- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 9e52f124d..4d666109b 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -5068,10 +5068,9 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp enable_z(); custom_message = true; custom_message_type = 2; - axis_relative_modes[3] = true; - + lcd_setstatuspgm(MSG_LOADING_FILAMENT); - current_position[E_AXIS] += 70; + current_position[E_AXIS] += 65; plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence current_position[E_AXIS] += 40; @@ -5099,6 +5098,19 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp custom_message_type = 0; } break; + case 702: + { + /*custom_message = true; + custom_message_type = 2; + lcd_setstatuspgm(MSG_UNLOADING_FILAMENT); //need to be tranlated to other languages + */ + current_position[E_AXIS] -= 80; + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 7000 / 60, active_extruder); + /*custom_message = false; + custom_message_type = 0; + */ + } + break; case 999: // M999: Restart after being stopped Stopped = false; diff --git a/Firmware/language_en.h b/Firmware/language_en.h index 69f85b6ff..12fd99b15 100644 --- a/Firmware/language_en.h +++ b/Firmware/language_en.h @@ -250,6 +250,7 @@ #define(length=20, lines=8) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done." #define(length=20, lines=3) MSG_WAITING_TEMP "Waiting for heater and bed cooling" #define(length=20, lines=2) MSG_FILAMENT_CLEAN "Is color clear?" +//#define(lenght=20, lines=1) MSG_UNLOADING_FILAMENT "Unloading filament" #define MSG_BED_CORRECTION_MENU "Bed level correct" #define MSG_BED_CORRECTION_LEFT "Left side um" diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 22eeae7b7..431343d5a 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -859,9 +859,8 @@ void lcd_unLoadFilament() { if (degHotend0() > EXTRUDE_MINTEMP) { - - enquecommand_P(PSTR(UNLOAD_FILAMENT_0)); - enquecommand_P(PSTR(UNLOAD_FILAMENT_1)); + + enquecommand_P(PSTR("M702")); //unload filament } else { @@ -1070,7 +1069,7 @@ void lcd_LoadFilament() { custom_message = true; loading_flag = true; - enquecommand_P(PSTR("M701")); + enquecommand_P(PSTR("M701")); //load filament SERIAL_ECHOLN("Loading filament"); } else