瀏覽代碼

EVENT_GCODE_SD_STOP => ABORT (#18978)

Robby Candra 4 年之前
父節點
當前提交
9590fcd855
沒有連結到貢獻者的電子郵件帳戶。
共有 4 個檔案被更改,包括 9 行新增7 行删除
  1. 1
    1
      Marlin/Configuration_adv.h
  2. 2
    2
      Marlin/src/MarlinCore.cpp
  3. 4
    2
      Marlin/src/inc/SanityCheck.h
  4. 2
    2
      Marlin/src/lcd/dwin/dwin.cpp

+ 1
- 1
Marlin/Configuration_adv.h 查看文件

@@ -1137,7 +1137,7 @@
1137 1137
 
1138 1138
   //#define MENU_ADDAUTOSTART               // Add a menu option to run auto#.g files
1139 1139
 
1140
-  #define EVENT_GCODE_SD_STOP "G28XY"       // G-code to run on Stop Print (e.g., "G28XY" or "G27")
1140
+  #define EVENT_GCODE_SD_ABORT "G28XY"      // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
1141 1141
 
1142 1142
   #if ENABLED(PRINTER_EVENT_LEDS)
1143 1143
     #define PE_LEDS_COMPLETED_TIME  (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination

+ 2
- 2
Marlin/src/MarlinCore.cpp 查看文件

@@ -453,8 +453,8 @@ void startOrResumeJob() {
453 453
     #endif
454 454
     wait_for_heatup = false;
455 455
     TERN_(POWER_LOSS_RECOVERY, recovery.purge());
456
-    #ifdef EVENT_GCODE_SD_STOP
457
-      queue.inject_P(PSTR(EVENT_GCODE_SD_STOP));
456
+    #ifdef EVENT_GCODE_SD_ABORT
457
+      queue.inject_P(PSTR(EVENT_GCODE_SD_ABORT));
458 458
     #endif
459 459
 
460 460
     TERN_(PASSWORD_AFTER_SD_PRINT_ABORT, password.lock_machine());

+ 4
- 2
Marlin/src/inc/SanityCheck.h 查看文件

@@ -517,6 +517,8 @@
517 517
   #error "TOUCH_BUTTONS is now TOUCH_SCREEN. Please update your Configuration.h."
518 518
 #elif defined(ANYCUBIC_TFT_MODEL)
519 519
   #error "ANYCUBIC_TFT_MODEL is now ANYCUBIC_LCD_I3MEGA. Please update your Configuration.h."
520
+#elif defined(EVENT_GCODE_SD_STOP)
521
+  #error "EVENT_GCODE_SD_STOP is now EVENT_GCODE_SD_ABORT. Please update your Configuration.h."
520 522
 #endif
521 523
 
522 524
 #ifdef FIL_RUNOUT_INVERTING
@@ -742,8 +744,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
742 744
   #endif
743 745
 #endif
744 746
 
745
-#if defined(EVENT_GCODE_SD_STOP) && DISABLED(NOZZLE_PARK_FEATURE)
746
-  static_assert(nullptr == strstr(EVENT_GCODE_SD_STOP, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP.");
747
+#if defined(EVENT_GCODE_SD_ABORT) && DISABLED(NOZZLE_PARK_FEATURE)
748
+  static_assert(nullptr == strstr(EVENT_GCODE_SD_ABORT, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_ABORT.");
747 749
 #endif
748 750
 
749 751
 /**

+ 2
- 2
Marlin/src/lcd/dwin/dwin.cpp 查看文件

@@ -2072,9 +2072,9 @@ void HMI_PauseOrStop(void) {
2072 2072
           #ifdef ACTION_ON_CANCEL
2073 2073
             host_action_cancel();
2074 2074
           #endif
2075
-          #ifdef EVENT_GCODE_SD_STOP
2075
+          #ifdef EVENT_GCODE_SD_ABORT
2076 2076
             Popup_Window_Home();
2077
-            queue.inject_P(PSTR(EVENT_GCODE_SD_STOP)); // For Ender 3 "G28 X Y"
2077
+            queue.inject_P(PSTR(EVENT_GCODE_SD_ABORT));
2078 2078
           #endif
2079 2079
           abort_flag = true;
2080 2080
         #endif

Loading…
取消
儲存