Kaynağa Gözat

Comment `return false` in motion functions

Scott Lahteine 7 yıl önce
ebeveyn
işleme
705ea98fd3

+ 2
- 0
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp Dosyayı Görüntüle

@@ -621,6 +621,8 @@
621 621
 
622 622
       } // segment loop
623 623
     } // cell loop
624
+
625
+    return false; // caller will update current_position
624 626
   }
625 627
 
626 628
 #endif // UBL_SEGMENTED

+ 4
- 4
Marlin/src/module/motion.cpp Dosyayı Görüntüle

@@ -540,7 +540,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
540 540
     // If the move is only in Z/E don't split up the move
541 541
     if (!xdiff && !ydiff) {
542 542
       planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder);
543
-      return false;
543
+      return false; // caller will update current_position
544 544
     }
545 545
 
546 546
     // Fail if attempting move outside printable radius
@@ -638,7 +638,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
638 638
       planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder);
639 639
     #endif
640 640
 
641
-    return false;
641
+    return false; // caller will update current_position
642 642
   }
643 643
 
644 644
 #else // !IS_KINEMATIC
@@ -730,7 +730,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
730 730
           return true;                                                                    // all moves, including Z-only moves.
731 731
         #elif ENABLED(SEGMENT_LEVELED_MOVES)
732 732
           segmented_line_to_destination(MMS_SCALED(feedrate_mm_s));
733
-          return false;
733
+          return false; // caller will update current_position
734 734
         #else
735 735
           /**
736 736
            * For MBL and ABL-BILINEAR only segment moves when X or Y are involved.
@@ -749,7 +749,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
749 749
     #endif // HAS_MESH
750 750
 
751 751
     buffer_line_to_destination(MMS_SCALED(feedrate_mm_s));
752
-    return false;
752
+    return false; // caller will update current_position
753 753
   }
754 754
 
755 755
 #endif // !IS_KINEMATIC

Loading…
İptal
Kaydet