Browse Source

Disable Octoprint handling of SD card print cancel

Kevin Lee 3 years ago
parent
commit
a2827579db
2 changed files with 7 additions and 5 deletions
  1. 1 1
      Firmware/Marlin_main.cpp
  2. 6 4
      Firmware/ultralcd.cpp

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -668,7 +668,7 @@ void crashdet_cancel()
 	if (saved_printing_type == PRINTING_TYPE_SD) {
 		lcd_print_stop();
 	}else if(saved_printing_type == PRINTING_TYPE_USB){
-		SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL); //for Octoprint: works the same as clicking "Abort" button in Octoprint GUI
+		//SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL); //for Octoprint: works the same as clicking "Abort" button in Octoprint GUI
 		cmdqueue_reset();
 	}
 }

+ 6 - 4
Firmware/ultralcd.cpp

@@ -7019,9 +7019,9 @@ static void lcd_sd_updir()
 
 void lcd_print_stop()
 {
-    if (!card.sdprinting) {
-        SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL);   // for Octoprint
-    }
+    //if (!card.sdprinting) {
+    //    SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL);   // for Octoprint
+    //}
     cmdqueue_serial_disabled = false; //for when canceling a print with a fancheck
 
     CRITICAL_SECTION_START;
@@ -7055,11 +7055,13 @@ void lcd_print_stop()
     cancel_heatup = true; //unroll temperature wait loop stack.
 
     current_position[Z_AXIS] += 10; //lift Z.
+    current_position[E_AXIS] -= FILAMENTCHANGE_LOADRETRACT; //retract E.
+    
     plan_buffer_line_curposXYZE(manual_feedrate[Z_AXIS] / 60);
 
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS]) //if axis are homed, move to parked position.
     {
-        current_position[X_AXIS] = X_CANCEL_POS;
+        // current_position[X_AXIS] = X_CANCEL_POS;
         current_position[Y_AXIS] = Y_CANCEL_POS;
         plan_buffer_line_curposXYZE(manual_feedrate[0] / 60);
     }