Browse Source

Fix Z raise with DXC_AUTO_PARK_MODE

Scott Lahteine 8 years ago
parent
commit
d6c36f5bb9
1 changed files with 10 additions and 7 deletions
  1. 10
    7
      Marlin/Marlin_main.cpp

+ 10
- 7
Marlin/Marlin_main.cpp View File

@@ -7305,6 +7305,16 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
7305 7305
               current_position[X_AXIS] = LOGICAL_X_POSITION(inactive_extruder_x_pos);
7306 7306
               inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
7307 7307
               break;
7308
+            case DXC_AUTO_PARK_MODE:
7309
+              // record raised toolhead position for use by unpark
7310
+              memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
7311
+              raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
7312
+              #if ENABLED(max_software_endstops)
7313
+                NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]);
7314
+              #endif
7315
+              active_extruder_parked = true;
7316
+              delayed_move_time = 0;
7317
+              break;
7308 7318
             case DXC_DUPLICATION_MODE:
7309 7319
               active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
7310 7320
               if (active_extruder_parked)
@@ -7314,13 +7324,6 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
7314 7324
               inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]);
7315 7325
               extruder_duplication_enabled = false;
7316 7326
               break;
7317
-            default:
7318
-              // record raised toolhead position for use by unpark
7319
-              memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
7320
-              raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
7321
-              active_extruder_parked = true;
7322
-              delayed_move_time = 0;
7323
-              break;
7324 7327
           }
7325 7328
 
7326 7329
           #if ENABLED(DEBUG_LEVELING_FEATURE)

Loading…
Cancel
Save