Browse Source

Tweaks to do_blocking_move

Scott Lahteine 7 years ago
parent
commit
25674da90c
1 changed files with 13 additions and 13 deletions
  1. 13
    13
      Marlin/src/module/motion.cpp

+ 13
- 13
Marlin/src/module/motion.cpp View File

287
     if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, rx, ry, rz);
287
     if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, rx, ry, rz);
288
   #endif
288
   #endif
289
 
289
 
290
+  const float z_feedrate = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
291
+
290
   #if ENABLED(DELTA)
292
   #if ENABLED(DELTA)
291
 
293
 
292
     if (!position_is_reachable(rx, ry)) return;
294
     if (!position_is_reachable(rx, ry)) return;
311
         #endif
313
         #endif
312
         return;
314
         return;
313
       }
315
       }
314
-      else {
315
-        destination[Z_AXIS] = delta_clip_start_height;
316
-        prepare_uninterpolated_move_to_destination(); // set_current_from_destination()
317
-        #if ENABLED(DEBUG_LEVELING_FEATURE)
318
-          if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
319
-        #endif
320
-      }
316
+      destination[Z_AXIS] = delta_clip_start_height;
317
+      prepare_uninterpolated_move_to_destination(); // set_current_from_destination()
318
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
319
+        if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
320
+      #endif
321
     }
321
     }
322
 
322
 
323
     if (rz > current_position[Z_AXIS]) {    // raising?
323
     if (rz > current_position[Z_AXIS]) {    // raising?
324
       destination[Z_AXIS] = rz;
324
       destination[Z_AXIS] = rz;
325
-      prepare_uninterpolated_move_to_destination();   // set_current_from_destination()
325
+      prepare_uninterpolated_move_to_destination(z_feedrate);   // set_current_from_destination()
326
       #if ENABLED(DEBUG_LEVELING_FEATURE)
326
       #if ENABLED(DEBUG_LEVELING_FEATURE)
327
         if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
327
         if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
328
       #endif
328
       #endif
337
 
337
 
338
     if (rz < current_position[Z_AXIS]) {    // lowering?
338
     if (rz < current_position[Z_AXIS]) {    // lowering?
339
       destination[Z_AXIS] = rz;
339
       destination[Z_AXIS] = rz;
340
-      prepare_uninterpolated_move_to_destination();   // set_current_from_destination()
340
+      prepare_uninterpolated_move_to_destination(z_feedrate);   // set_current_from_destination()
341
       #if ENABLED(DEBUG_LEVELING_FEATURE)
341
       #if ENABLED(DEBUG_LEVELING_FEATURE)
342
         if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
342
         if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
343
       #endif
343
       #endif
352
     // If Z needs to raise, do it before moving XY
352
     // If Z needs to raise, do it before moving XY
353
     if (destination[Z_AXIS] < rz) {
353
     if (destination[Z_AXIS] < rz) {
354
       destination[Z_AXIS] = rz;
354
       destination[Z_AXIS] = rz;
355
-      prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS));
355
+      prepare_uninterpolated_move_to_destination(z_feedrate);
356
     }
356
     }
357
 
357
 
358
     destination[X_AXIS] = rx;
358
     destination[X_AXIS] = rx;
362
     // If Z needs to lower, do it after moving XY
362
     // If Z needs to lower, do it after moving XY
363
     if (destination[Z_AXIS] > rz) {
363
     if (destination[Z_AXIS] > rz) {
364
       destination[Z_AXIS] = rz;
364
       destination[Z_AXIS] = rz;
365
-      prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS));
365
+      prepare_uninterpolated_move_to_destination(z_feedrate);
366
     }
366
     }
367
 
367
 
368
   #else
368
   #else
369
 
369
 
370
     // If Z needs to raise, do it before moving XY
370
     // If Z needs to raise, do it before moving XY
371
     if (current_position[Z_AXIS] < rz) {
371
     if (current_position[Z_AXIS] < rz) {
372
-      feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
372
+      feedrate_mm_s = z_feedrate;
373
       current_position[Z_AXIS] = rz;
373
       current_position[Z_AXIS] = rz;
374
       line_to_current_position();
374
       line_to_current_position();
375
     }
375
     }
381
 
381
 
382
     // If Z needs to lower, do it after moving XY
382
     // If Z needs to lower, do it after moving XY
383
     if (current_position[Z_AXIS] > rz) {
383
     if (current_position[Z_AXIS] > rz) {
384
-      feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
384
+      feedrate_mm_s = z_feedrate;
385
       current_position[Z_AXIS] = rz;
385
       current_position[Z_AXIS] = rz;
386
       line_to_current_position();
386
       line_to_current_position();
387
     }
387
     }

Loading…
Cancel
Save