瀏覽代碼

Merge pull request #6052 from thinkyhead/rc_lift_on_pause

Add PARK_HEAD_ON_PAUSE feature / M125
Scott Lahteine 8 年之前
父節點
當前提交
2573f4dd05

+ 2
- 2
.travis.yml 查看文件

@@ -201,11 +201,11 @@ script:
201 201
   - opt_set MOTHERBOARD BOARD_MINIRAMBO
202 202
   - build_marlin
203 203
   #
204
-  # Test FILAMENT_CHANGE_FEATURE and LCD_INFO_MENU
204
+  # Test FILAMENT_CHANGE_FEATURE, PARK_HEAD_ON_PAUSE, and LCD_INFO_MENU
205 205
   #
206 206
   - restore_configs
207 207
   - opt_enable ULTIMAKERCONTROLLER
208
-  - opt_enable_adv FILAMENT_CHANGE_FEATURE LCD_INFO_MENU
208
+  - opt_enable_adv FILAMENT_CHANGE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
209 209
   - build_marlin
210 210
   #
211 211
   # Enable filament sensor

+ 5
- 4
Marlin/Configuration_adv.h 查看文件

@@ -762,10 +762,11 @@
762 762
                                               // 0 to disable for manual extrusion
763 763
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
764 764
                                               // or until outcoming filament color is not clear for filament color change
765
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
766
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
767
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
768
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
765
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
766
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
767
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
768
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
769
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
769 770
 #endif
770 771
 
771 772
 // @section tmc

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

@@ -223,6 +223,7 @@ void manage_inactivity(bool ignore_stepper_queue = false);
223 223
 #define _AXIS(AXIS) AXIS ##_AXIS
224 224
 
225 225
 void enable_all_steppers();
226
+void disable_e_steppers();
226 227
 void disable_all_steppers();
227 228
 
228 229
 void FlushSerialRequestResend();

+ 202
- 51
Marlin/Marlin_main.cpp 查看文件

@@ -122,6 +122,7 @@
122 122
  * M119 - Report endstops status.
123 123
  * M120 - Enable endstops detection.
124 124
  * M121 - Disable endstops detection.
125
+ * M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
125 126
  * M126 - Solenoid Air Valve Open. (Requires BARICUDA)
126 127
  * M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
127 128
  * M128 - EtoP Open. (Requires BARICUDA)
@@ -150,7 +151,7 @@
150 151
  * M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>. (Requires FWRETRACT)
151 152
  * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT)
152 153
           Every normal extrude-only move will be classified as retract depending on the direction.
153
- * M211 - Enable, Disable, and/or Report software endstops: S<0|1>
154
+ * M211 - Enable, Disable, and/or Report software endstops: S<0|1> (Requires MIN_SOFTWARE_ENDSTOPS or MAX_SOFTWARE_ENDSTOPS)
154 155
  * M218 - Set a tool offset: "M218 T<index> X<offset> Y<offset>". (Requires 2 or more extruders)
155 156
  * M220 - Set Feedrate Percentage: "M220 S<percent>" (i.e., "FR" on the LCD)
156 157
  * M221 - Set Flow Percentage: "M221 S<percent>"
@@ -199,13 +200,11 @@
199 200
  * M350 - Set microstepping mode. (Requires digital microstepping pins.)
200 201
  * M351 - Toggle MS1 MS2 pins directly. (Requires digital microstepping pins.)
201 202
  *
202
- * ************ SCARA Specific - This can change to suit future G-code regulations
203 203
  * M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
204 204
  * M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
205 205
  * M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
206 206
  * M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
207 207
  * M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
208
- * ************* SCARA End ***************
209 208
  *
210 209
  * ************ Custom codes - This can change to suit future G-code regulations
211 210
  * M100 - Watch Free Memory (For Debugging). (Requires M100_FREE_MEMORY_WATCHER)
@@ -448,7 +447,7 @@ volatile bool wait_for_heatup = true;
448 447
 
449 448
 const char errormagic[] PROGMEM = "Error:";
450 449
 const char echomagic[] PROGMEM = "echo:";
451
-const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
450
+const char axis_codes[XYZE] = {'X', 'Y', 'Z', 'E'};
452 451
 
453 452
 // Number of characters read in the current line of serial input
454 453
 static int serial_count = 0;
@@ -690,7 +689,7 @@ void get_cartesian_from_steppers();
690 689
 void set_current_from_steppers_for_axis(const AxisEnum axis);
691 690
 
692 691
 #if ENABLED(ARC_SUPPORT)
693
-  void plan_arc(float target[NUM_AXIS], float* offset, uint8_t clockwise);
692
+  void plan_arc(float target[XYZE], float* offset, uint8_t clockwise);
694 693
 #endif
695 694
 
696 695
 #if ENABLED(BEZIER_CURVE_SUPPORT)
@@ -1333,7 +1332,7 @@ bool get_target_extruder_from_command(int code) {
1333 1332
 
1334 1333
   static float inactive_extruder_x_pos = X2_MAX_POS; // used in mode 0 & 1
1335 1334
   static bool active_extruder_parked = false;        // used in mode 1 & 2
1336
-  static float raised_parked_position[NUM_AXIS];     // used in mode 1
1335
+  static float raised_parked_position[XYZE];         // used in mode 1
1337 1336
   static millis_t delayed_move_time = 0;             // used in mode 1
1338 1337
   static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
1339 1338
   static float duplicate_extruder_temp_offset = 0;   // used in mode 2
@@ -4667,6 +4666,45 @@ inline void gcode_M17() {
4667 4666
   enable_all_steppers();
4668 4667
 }
4669 4668
 
4669
+#if IS_KINEMATIC
4670
+  #define RUNPLAN(RATE_MM_S) planner.buffer_line_kinematic(destination, RATE_MM_S, active_extruder)
4671
+#else
4672
+  #define RUNPLAN(RATE_MM_S) line_to_destination(RATE_MM_S)
4673
+#endif
4674
+
4675
+#if ENABLED(PARK_HEAD_ON_PAUSE)
4676
+  float resume_position[XYZE];
4677
+  bool move_away_flag = false;
4678
+
4679
+  inline void move_back_on_resume() {
4680
+    if (!move_away_flag) return;
4681
+    move_away_flag = false;
4682
+
4683
+    // Set extruder to saved position
4684
+    destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS];
4685
+    planner.set_e_position_mm(current_position[E_AXIS]);
4686
+
4687
+    #if IS_KINEMATIC
4688
+      // Move XYZ to starting position
4689
+      planner.buffer_line_kinematic(lastpos, FILAMENT_CHANGE_XY_FEEDRATE, active_extruder);
4690
+    #else
4691
+      // Move XY to starting position, then Z
4692
+      destination[X_AXIS] = resume_position[X_AXIS];
4693
+      destination[Y_AXIS] = resume_position[Y_AXIS];
4694
+      RUNPLAN(FILAMENT_CHANGE_XY_FEEDRATE);
4695
+      destination[Z_AXIS] = resume_position[Z_AXIS];
4696
+      RUNPLAN(FILAMENT_CHANGE_Z_FEEDRATE);
4697
+    #endif
4698
+    stepper.synchronize();
4699
+
4700
+    #if ENABLED(FILAMENT_RUNOUT_SENSOR)
4701
+      filament_ran_out = false;
4702
+    #endif
4703
+    set_current_to_destination();
4704
+  }
4705
+
4706
+#endif // PARK_HEAD_ON_PAUSE
4707
+
4670 4708
 #if ENABLED(SDSUPPORT)
4671 4709
 
4672 4710
   /**
@@ -4694,9 +4732,13 @@ inline void gcode_M17() {
4694 4732
   inline void gcode_M23() { card.openFile(current_command_args, true); }
4695 4733
 
4696 4734
   /**
4697
-   * M24: Start SD Print
4735
+   * M24: Start or Resume SD Print
4698 4736
    */
4699 4737
   inline void gcode_M24() {
4738
+    #if ENABLED(PARK_HEAD_ON_PAUSE)
4739
+      move_back_on_resume();
4740
+    #endif
4741
+
4700 4742
     card.startFileprint();
4701 4743
     print_job_timer.start();
4702 4744
   }
@@ -4704,7 +4746,14 @@ inline void gcode_M17() {
4704 4746
   /**
4705 4747
    * M25: Pause SD Print
4706 4748
    */
4707
-  inline void gcode_M25() { card.pauseSDPrint(); }
4749
+  inline void gcode_M25() {
4750
+    card.pauseSDPrint();
4751
+    print_job_timer.pause();
4752
+
4753
+    #if ENABLED(PARK_HEAD_ON_PAUSE)
4754
+      enqueue_and_echo_commands_P(PSTR("M125")); // Must be enqueued with pauseSDPrint set to be last in the buffer
4755
+    #endif
4756
+  }
4708 4757
 
4709 4758
   /**
4710 4759
    * M26: Set SD Card file index
@@ -5918,12 +5967,7 @@ inline void gcode_M18_M84() {
5918 5967
       if (code_seen('Y')) disable_y();
5919 5968
       if (code_seen('Z')) disable_z();
5920 5969
       #if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
5921
-        if (code_seen('E')) {
5922
-          disable_e0();
5923
-          disable_e1();
5924
-          disable_e2();
5925
-          disable_e3();
5926
-        }
5970
+        if (code_seen('E')) disable_e_steppers();
5927 5971
       #endif
5928 5972
     }
5929 5973
   }
@@ -6089,6 +6133,111 @@ inline void gcode_M120() { endstops.enable_globally(true); }
6089 6133
  */
6090 6134
 inline void gcode_M121() { endstops.enable_globally(false); }
6091 6135
 
6136
+#if ENABLED(PARK_HEAD_ON_PAUSE)
6137
+
6138
+  /**
6139
+   * M125: Store current position and move to filament change position.
6140
+   *       Called on pause (by M25) to prevent material leaking onto the
6141
+   *       object. On resume (M24) the head will be moved back and the
6142
+   *       print will resume.
6143
+   *
6144
+   *       If Marlin is compiled without SD Card support, M125 can be
6145
+   *       used directly to pause the print and move to park position,
6146
+   *       resuming with a button click or M108.
6147
+   *
6148
+   *    L = override retract length
6149
+   *    X = override X
6150
+   *    Y = override Y
6151
+   *    Z = override Z raise
6152
+   */
6153
+  inline void gcode_M125() {
6154
+    if (move_away_flag) return; // already paused
6155
+
6156
+    const bool job_running = print_job_timer.isRunning();
6157
+
6158
+    // there are blocks after this one, or sd printing
6159
+    move_away_flag = job_running || planner.blocks_queued()
6160
+      #if ENABLED(SDSUPPORT)
6161
+        || card.sdprinting
6162
+      #endif
6163
+    ;
6164
+
6165
+    if (!move_away_flag) return; // nothing to pause
6166
+
6167
+    // M125 can be used to pause a print too
6168
+    #if ENABLED(SDSUPPORT)
6169
+      card.pauseSDPrint();
6170
+    #endif
6171
+    print_job_timer.pause();
6172
+
6173
+    // Save current position
6174
+    COPY(resume_position, current_position);
6175
+
6176
+    set_destination_to_current();
6177
+
6178
+    // Initial retract before move to filament change position
6179
+    destination[E_AXIS] += code_seen('L') ? code_value_axis_units(E_AXIS) : 0
6180
+      #if defined(FILAMENT_CHANGE_RETRACT_LENGTH) && FILAMENT_CHANGE_RETRACT_LENGTH > 0
6181
+        - (FILAMENT_CHANGE_RETRACT_LENGTH)
6182
+      #endif
6183
+    ;
6184
+    RUNPLAN(FILAMENT_CHANGE_RETRACT_FEEDRATE);
6185
+
6186
+    // Lift Z axis
6187
+    const float z_lift = code_seen('Z') ? code_value_axis_units(Z_AXIS) :
6188
+      #if defined(FILAMENT_CHANGE_Z_ADD) && FILAMENT_CHANGE_Z_ADD > 0
6189
+        FILAMENT_CHANGE_Z_ADD
6190
+      #else
6191
+        0
6192
+      #endif
6193
+    ;
6194
+    if (z_lift > 0) {
6195
+      destination[Z_AXIS] += z_lift;
6196
+      NOMORE(destination[Z_AXIS], Z_MAX_POS);
6197
+      RUNPLAN(FILAMENT_CHANGE_Z_FEEDRATE);
6198
+    }
6199
+
6200
+    // Move XY axes to filament change position or given position
6201
+    destination[X_AXIS] = code_seen('X') ? code_value_axis_units(X_AXIS) : 0
6202
+      #ifdef FILAMENT_CHANGE_X_POS
6203
+        + FILAMENT_CHANGE_X_POS
6204
+      #endif
6205
+    ;
6206
+    destination[Y_AXIS] = code_seen('Y') ? code_value_axis_units(Y_AXIS) : 0
6207
+      #ifdef FILAMENT_CHANGE_Y_POS
6208
+        + FILAMENT_CHANGE_Y_POS
6209
+      #endif
6210
+    ;
6211
+
6212
+    #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
6213
+      if (active_extruder > 0) {
6214
+        if (!code_seen('X')) destination[X_AXIS] += hotend_offset[X_AXIS][active_extruder];
6215
+        if (!code_seen('Y')) destination[Y_AXIS] += hotend_offset[Y_AXIS][active_extruder];
6216
+      }
6217
+    #endif
6218
+
6219
+    clamp_to_software_endstops(destination);
6220
+    RUNPLAN(FILAMENT_CHANGE_XY_FEEDRATE);
6221
+    set_current_to_destination();
6222
+    stepper.synchronize();
6223
+    disable_e_steppers();
6224
+
6225
+    #if DISABLED(SDSUPPORT)
6226
+      // Wait for lcd click or M108
6227
+      wait_for_user = true;
6228
+      KEEPALIVE_STATE(PAUSED_FOR_USER);
6229
+      while (wait_for_user) idle();
6230
+      KEEPALIVE_STATE(IN_HANDLER);
6231
+
6232
+      // Return to print position and continue
6233
+      move_back_on_resume();
6234
+      if (job_running) print_job_timer.start();
6235
+      move_away_flag = false;
6236
+    #endif
6237
+  }
6238
+
6239
+#endif // PARK_HEAD_ON_PAUSE
6240
+
6092 6241
 #if ENABLED(BLINKM) || ENABLED(RGB_LED)
6093 6242
 
6094 6243
   void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) {
@@ -7217,10 +7366,12 @@ inline void gcode_M503() {
7217 7366
 
7218 7367
 #if ENABLED(FILAMENT_CHANGE_FEATURE)
7219 7368
 
7220
-  millis_t next_buzz = 0;
7221
-  unsigned long int runout_beep = 0;
7369
+  void filament_change_beep(const bool init=false) {
7370
+    static millis_t next_buzz = 0;
7371
+    static uint16_t runout_beep = 0;
7372
+
7373
+    if (init) next_buzz = runout_beep = 0;
7222 7374
 
7223
-  void filament_change_beep() {
7224 7375
     const millis_t ms = millis();
7225 7376
     if (ELAPSED(ms, next_buzz)) {
7226 7377
       if (runout_beep <= FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS + 5) { // Only beep as long as we're supposed to
@@ -7256,25 +7407,18 @@ inline void gcode_M503() {
7256 7407
     busy_doing_M600 = true;  // Stepper Motors can't timeout when this is set
7257 7408
 
7258 7409
     // Pause the print job timer
7259
-    bool job_running = print_job_timer.isRunning();
7410
+    const bool job_running = print_job_timer.isRunning();
7411
+
7260 7412
     print_job_timer.pause();
7261 7413
 
7262 7414
     // Show initial message and wait for synchronize steppers
7263 7415
     lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INIT);
7264 7416
     stepper.synchronize();
7265 7417
 
7266
-    float lastpos[NUM_AXIS];
7267
-
7268 7418
     // Save current position of all axes
7269
-    LOOP_XYZE(i)
7270
-      lastpos[i] = destination[i] = current_position[i];
7271
-
7272
-    // Define runplan for move axes
7273
-    #if IS_KINEMATIC
7274
-      #define RUNPLAN(RATE_MM_S) planner.buffer_line_kinematic(destination, RATE_MM_S, active_extruder);
7275
-    #else
7276
-      #define RUNPLAN(RATE_MM_S) line_to_destination(RATE_MM_S);
7277
-    #endif
7419
+    float lastpos[XYZE];
7420
+    COPY(lastpos, current_position);
7421
+    set_destination_to_current();
7278 7422
 
7279 7423
     // Initial retract before move to filament change position
7280 7424
     destination[E_AXIS] += code_seen('E') ? code_value_axis_units(E_AXIS) : 0
@@ -7328,26 +7472,25 @@ inline void gcode_M503() {
7328 7472
 
7329 7473
     // Synchronize steppers and then disable extruders steppers for manual filament changing
7330 7474
     stepper.synchronize();
7331
-    disable_e0();
7332
-    disable_e1();
7333
-    disable_e2();
7334
-    disable_e3();
7475
+    disable_e_steppers();
7335 7476
     delay(100);
7336 7477
 
7337
-    millis_t nozzle_timeout = millis() + FILAMENT_CHANGE_NOZZLE_TIMEOUT * 1000L;
7478
+    millis_t nozzle_timeout = millis() + (millis_t)(FILAMENT_CHANGE_NOZZLE_TIMEOUT) * 1000L;
7338 7479
     bool nozzle_timed_out = false;
7339 7480
     float temps[4];
7340 7481
 
7341 7482
     // Wait for filament insert by user and press button
7342 7483
     lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INSERT);
7343 7484
 
7485
+    #if HAS_BUZZER
7486
+      filament_change_beep(true);
7487
+    #endif
7488
+
7344 7489
     idle();
7345 7490
 
7346
-    wait_for_user = true;    // LCD click or M108 will clear this
7347
-    next_buzz = 0;
7348
-    runout_beep = 0;
7349 7491
     HOTEND_LOOP() temps[e] = thermalManager.target_temperature[e]; // Save nozzle temps
7350 7492
 
7493
+    wait_for_user = true;    // LCD click or M108 will clear this
7351 7494
     while (wait_for_user) {
7352 7495
       millis_t current_ms = millis();
7353 7496
       if (nozzle_timed_out)
@@ -7389,9 +7532,11 @@ inline void gcode_M503() {
7389 7532
     if (nozzle_timed_out)
7390 7533
       lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INSERT);
7391 7534
 
7535
+    #if HAS_BUZZER
7536
+      filament_change_beep(true);
7537
+    #endif
7538
+
7392 7539
     wait_for_user = true;    // LCD click or M108 will clear this
7393
-    next_buzz = 0;
7394
-    runout_beep = 0;
7395 7540
     while (wait_for_user && nozzle_timed_out) {
7396 7541
       #if HAS_BUZZER
7397 7542
         filament_change_beep();
@@ -7583,7 +7728,7 @@ inline void gcode_M503() {
7583 7728
    * Report driver currents when no axis specified
7584 7729
    */
7585 7730
   inline void gcode_M906() {
7586
-    uint16_t values[NUM_AXIS];
7731
+    uint16_t values[XYZE];
7587 7732
     LOOP_XYZE(i)
7588 7733
       values[i] = code_seen(axis_codes[i]) ? code_value_int() : 0;
7589 7734
 
@@ -8557,6 +8702,11 @@ void process_next_command() {
8557 8702
           break;
8558 8703
       #endif // FAN_COUNT > 0
8559 8704
 
8705
+      #if ENABLED(PARK_HEAD_ON_PAUSE)
8706
+        case 125: // M125: Store current position and move to filament change position
8707
+          gcode_M125(); break;
8708
+      #endif
8709
+
8560 8710
       #if ENABLED(BARICUDA)
8561 8711
         // PWM for HEATER_1_PIN
8562 8712
         #if HAS_HEATER_1
@@ -9501,7 +9651,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
9501 9651
    * This calls planner.buffer_line several times, adding
9502 9652
    * small incremental moves for DELTA or SCARA.
9503 9653
    */
9504
-  inline bool prepare_kinematic_move_to(float ltarget[NUM_AXIS]) {
9654
+  inline bool prepare_kinematic_move_to(float ltarget[XYZE]) {
9505 9655
 
9506 9656
     // Get the top feedrate of the move in the XY plane
9507 9657
     float _feedrate_mm_s = MMS_SCALED(feedrate_mm_s);
@@ -9513,7 +9663,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
9513 9663
     }
9514 9664
 
9515 9665
     // Get the cartesian distances moved in XYZE
9516
-    float difference[NUM_AXIS];
9666
+    float difference[XYZE];
9517 9667
     LOOP_XYZE(i) difference[i] = ltarget[i] - current_position[i];
9518 9668
 
9519 9669
     // Get the linear distance in XYZ
@@ -9738,7 +9888,7 @@ void prepare_move_to_destination() {
9738 9888
    * options for G2/G3 arc generation. In future these options may be GCode tunable.
9739 9889
    */
9740 9890
   void plan_arc(
9741
-    float logical[NUM_AXIS], // Destination position
9891
+    float logical[XYZE], // Destination position
9742 9892
     float* offset,           // Center of rotation relative to current_position
9743 9893
     uint8_t clockwise        // Clockwise?
9744 9894
   ) {
@@ -10117,16 +10267,20 @@ void enable_all_steppers() {
10117 10267
   enable_e3();
10118 10268
 }
10119 10269
 
10120
-void disable_all_steppers() {
10121
-  disable_x();
10122
-  disable_y();
10123
-  disable_z();
10270
+void disable_e_steppers() {
10124 10271
   disable_e0();
10125 10272
   disable_e1();
10126 10273
   disable_e2();
10127 10274
   disable_e3();
10128 10275
 }
10129 10276
 
10277
+void disable_all_steppers() {
10278
+  disable_x();
10279
+  disable_y();
10280
+  disable_z();
10281
+  disable_e_steppers();
10282
+}
10283
+
10130 10284
 #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
10131 10285
 
10132 10286
   void automatic_current_control(const TMC2130Stepper &st) {
@@ -10234,10 +10388,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
10234 10388
       disable_z();
10235 10389
     #endif
10236 10390
     #if ENABLED(DISABLE_INACTIVE_E)
10237
-      disable_e0();
10238
-      disable_e1();
10239
-      disable_e2();
10240
-      disable_e3();
10391
+      disable_e_steppers();
10241 10392
     #endif
10242 10393
   }
10243 10394
 

+ 2
- 1
Marlin/SanityCheck.h 查看文件

@@ -280,6 +280,8 @@
280 280
     #error "FILAMENT_CHANGE_FEATURE currently requires an LCD controller."
281 281
   #elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
282 282
     #error "EXTRUDER_RUNOUT_PREVENT is incompatible with FILAMENT_CHANGE_FEATURE."
283
+  #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(ULTIPANEL) && DISABLED(EMERGENCY_PARSER)
284
+    #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
283 285
   #endif
284 286
 #endif
285 287
 
@@ -936,7 +938,6 @@ static_assert(1 >= 0
936 938
   #endif
937 939
 #endif
938 940
 
939
-
940 941
 /**
941 942
  * Make sure only one display is enabled
942 943
  *

+ 5
- 4
Marlin/example_configurations/Cartesio/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/Felix/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/Hephestos/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/Hephestos_2/Configuration_adv.h 查看文件

@@ -735,10 +735,11 @@
735 735
                                               // 0 to disable for manual extrusion
736 736
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
737 737
                                               // or until outcoming filament color is not clear for filament color change
738
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
739
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
740
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
741
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
738
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
739
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
740
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
741
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
742
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
742 743
 #endif
743 744
 
744 745
 // @section tmc

+ 5
- 4
Marlin/example_configurations/K8200/Configuration_adv.h 查看文件

@@ -765,10 +765,11 @@
765 765
                                               // 0 to disable for manual extrusion
766 766
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
767 767
                                               // or until outcoming filament color is not clear for filament color change
768
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
769
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
770
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
771
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
768
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
769
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
770
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
771
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
772
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
772 773
 #endif
773 774
 
774 775
 // @section tmc

+ 5
- 4
Marlin/example_configurations/K8400/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/RigidBot/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/SCARA/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/TAZ4/Configuration_adv.h 查看文件

@@ -760,10 +760,11 @@
760 760
                                               // 0 to disable for manual extrusion
761 761
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
762 762
                                               // or until outcoming filament color is not clear for filament color change
763
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
764
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
765
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
766
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
763
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
764
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
765
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
766
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
767
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
767 768
 #endif
768 769
 
769 770
 // @section tmc

+ 5
- 4
Marlin/example_configurations/WITBOX/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h 查看文件

@@ -757,10 +757,11 @@
757 757
                                               // 0 to disable for manual extrusion
758 758
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
759 759
                                               // or until outcoming filament color is not clear for filament color change
760
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
761
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
762
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
763
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
760
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
761
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
762
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
763
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
764
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
764 765
 #endif
765 766
 
766 767
 // @section tmc

+ 5
- 4
Marlin/example_configurations/delta/generic/Configuration_adv.h 查看文件

@@ -754,10 +754,11 @@
754 754
                                               // 0 to disable for manual extrusion
755 755
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
756 756
                                               // or until outcoming filament color is not clear for filament color change
757
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
758
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
759
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
760
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
757
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
758
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
759
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
760
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
761
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
761 762
 #endif
762 763
 
763 764
 // @section tmc

+ 5
- 4
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h 查看文件

@@ -754,10 +754,11 @@
754 754
                                               // 0 to disable for manual extrusion
755 755
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
756 756
                                               // or until outcoming filament color is not clear for filament color change
757
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
758
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
759
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
760
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
757
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
758
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
759
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
760
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
761
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
761 762
 #endif
762 763
 
763 764
 // @section tmc

+ 5
- 4
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h 查看文件

@@ -759,10 +759,11 @@
759 759
                                               // 0 to disable for manual extrusion
760 760
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
761 761
                                               // or until outcoming filament color is not clear for filament color change
762
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
763
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
764
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
765
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
762
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
763
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
764
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
765
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
766
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
766 767
 #endif
767 768
 
768 769
 // @section tmc

+ 5
- 4
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h 查看文件

@@ -754,10 +754,11 @@
754 754
                                               // 0 to disable for manual extrusion
755 755
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
756 756
                                               // or until outcoming filament color is not clear for filament color change
757
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
758
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
759
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
760
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
757
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
758
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
759
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
760
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
761
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
761 762
 #endif
762 763
 
763 764
 // @section tmc

+ 5
- 4
Marlin/example_configurations/makibox/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 5
- 4
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h 查看文件

@@ -752,10 +752,11 @@
752 752
                                               // 0 to disable for manual extrusion
753 753
                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
754 754
                                               // or until outcoming filament color is not clear for filament color change
755
-  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
-  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
757
-  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
758
-                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
755
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45   // Turn off nozzle if user doesn't change filament within this time limit in seconds
756
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
757
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT  // Enable to have stepper motors hold position during filament change
758
+                                              // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
759
+  //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
759 760
 #endif
760 761
 
761 762
 // @section tmc

+ 1
- 6
Marlin/planner.cpp 查看文件

@@ -450,12 +450,7 @@ void Planner::check_axes_activity() {
450 450
     if (!axis_active[Z_AXIS]) disable_z();
451 451
   #endif
452 452
   #if ENABLED(DISABLE_E)
453
-    if (!axis_active[E_AXIS]) {
454
-      disable_e0();
455
-      disable_e1();
456
-      disable_e2();
457
-      disable_e3();
458
-    }
453
+    if (!axis_active[E_AXIS]) disable_e_steppers();
459 454
   #endif
460 455
 
461 456
   #if FAN_COUNT > 0

+ 10
- 3
Marlin/ultralcd.cpp 查看文件

@@ -615,11 +615,18 @@ void kill_screen(const char* lcd_msg) {
615 615
     void lcd_sdcard_pause() {
616 616
       card.pauseSDPrint();
617 617
       print_job_timer.pause();
618
+      #if ENABLED(PARK_HEAD_ON_PAUSE)
619
+        enqueue_and_echo_commands_P(PSTR("M125"))
620
+      #endif
618 621
     }
619 622
 
620 623
     void lcd_sdcard_resume() {
621
-      card.startFileprint();
622
-      print_job_timer.start();
624
+      #if ENABLED(PARK_HEAD_ON_PAUSE)
625
+        enqueue_and_echo_commands_P(PSTR("M24"))
626
+      #else
627
+        card.startFileprint();
628
+        print_job_timer.start();
629
+      #endif
623 630
     }
624 631
 
625 632
     void lcd_sdcard_stop() {
@@ -634,7 +641,7 @@ void kill_screen(const char* lcd_msg) {
634 641
       lcd_setstatus(MSG_PRINT_ABORTED, true);
635 642
     }
636 643
 
637
-  #endif //SDSUPPORT
644
+  #endif // SDSUPPORT
638 645
 
639 646
   #if ENABLED(MENU_ITEM_CASE_LIGHT)
640 647
 

Loading…
取消
儲存