From 032f2637a793b5258911e288aea5d0e99743f680 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Sun, 30 Apr 2017 17:08:00 +0200 Subject: [PATCH] adding edits made by akukan --- Firmware/Marlin_main.cpp | 33 ++++++++++++++++++++++++++++---- Firmware/stepper.cpp | 41 ++++++++++++++++++++++++++++++++-------- Firmware/ultralcd.cpp | 9 +++++++++ Firmware/ultralcd.h | 4 ++++ 4 files changed, 75 insertions(+), 12 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 2c1a6bf0..0f8d9fd0 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -5109,11 +5109,35 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp } else { - #ifdef FILAMENTCHANGE_FINALRETRACT - target[E_AXIS]+= FILAMENTCHANGE_FINALRETRACT ; - #endif + #ifdef SNMM + + #else + #ifdef FILAMENTCHANGE_FINALRETRACT + target[E_AXIS] += FILAMENTCHANGE_FINALRETRACT; + #endif + #endif // SNMM } - plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], FILAMENTCHANGE_RFEED, active_extruder); + +#ifdef SNMM + target[E_AXIS] += 12; + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 3500, active_extruder); + target[E_AXIS] += 6; + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5000, active_extruder); + target[E_AXIS] += (FIL_LOAD_LENGTH * -1); + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5000, active_extruder); + st_synchronize(); + target[E_AXIS] += (FIL_COOLING); + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 50, active_extruder); + target[E_AXIS] += (FIL_COOLING*-1); + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 50, active_extruder); + target[E_AXIS] += (BOWDEN_LENGTH*-1); + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 3000, active_extruder); + st_synchronize(); + +#else + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], FILAMENTCHANGE_RFEED, active_extruder); +#endif // SNMM + //finish moves st_synchronize(); @@ -5389,6 +5413,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp else { tmp_extruder = code_value(); #ifdef SNMM + snmm_extruder = tmp_extruder; st_synchronize(); delay(100); diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 919c5591..b92f54ee 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -515,14 +515,39 @@ ISR(TIMER1_COMPA_vect) } #endif - if ((out_bits & (1<