浏览代码

Comment `return false` in motion functions

Scott Lahteine 7 年前
父节点
当前提交
705ea98fd3
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 2
    0
      Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
  2. 4
    4
      Marlin/src/module/motion.cpp

+ 2
- 0
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp 查看文件

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

+ 4
- 4
Marlin/src/module/motion.cpp 查看文件

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

正在加载...
取消
保存