From 4630df6cf4f51384e875ddd8ef7d5b464fcbee41 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Tue, 14 Nov 2017 16:51:34 +0100 Subject: [PATCH] pause print fix for absolute mode, minor first layer cal. fix for snmm --- Firmware/ultralcd.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index cd1d3685..70c41610 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -553,7 +553,6 @@ static void lcd_status_screen() void lcd_commands() { - char cmd1[25]; if (lcd_commands_type == LCD_COMMAND_LONG_PAUSE) { if(lcd_commands_step == 0) { @@ -596,10 +595,16 @@ void lcd_commands() strcpy(cmd1, "G1 Z"); strcat(cmd1, ftostr32(pause_lastpos[Z_AXIS])); enquecommand(cmd1); - if (axis_relative_modes[3] == true) enquecommand_P(PSTR("M83")); // set extruder to relative mode. - else enquecommand_P(PSTR("M82")); // set extruder to absolute mode + + if (axis_relative_modes[3] == false) { + enquecommand_P(PSTR("M83")); // set extruder to relative mode enquecommand_P(PSTR("G1 E" STRINGIFY(DEFAULT_RETRACTION))); //unretract - enquecommand_P(PSTR("G90")); //absolute positioning + enquecommand_P(PSTR("M82")); // set extruder to absolute mode + } + else { + enquecommand_P(PSTR("G1 E" STRINGIFY(DEFAULT_RETRACTION))); //unretract + } + lcd_commands_step = 1; } if (lcd_commands_step == 3 && !blocks_queued()) { //wait for nozzle to reach target temp @@ -614,7 +619,7 @@ void lcd_commands() strcpy(cmd1, "M104 S"); strcat(cmd1, ftostr3(HotendTempBckp)); enquecommand(cmd1); - + enquecommand_P(PSTR("G90")); //absolute positioning strcpy(cmd1, "G1 X"); strcat(cmd1, ftostr32(pause_lastpos[X_AXIS])); strcat(cmd1, " Y"); @@ -862,7 +867,7 @@ void lcd_commands() enquecommand_P(PSTR("G1 X50 Y1 E-5.0000")); enquecommand_P(PSTR("G1 F2400")); enquecommand_P(PSTR("G1 X0 Y1 E5.0000")); - enquecommand_P(PSTR("G1 X50 Y1 E - 5.0000")); + enquecommand_P(PSTR("G1 X50 Y1 E-5.0000")); enquecommand_P(PSTR("G1 F2400")); enquecommand_P(PSTR("G1 X0 Y1 E5.0000")); enquecommand_P(PSTR("G1 X50 Y1 E-3.0000")); @@ -1126,7 +1131,7 @@ void lcd_commands() if (lcd_commands_type == LCD_COMMAND_STOP_PRINT) /// stop print { - uint8_t stopped_extruder; + if (lcd_commands_step == 0) {