瀏覽代碼

🎨 Rename all/no axis enums

Scott Lahteine 4 年之前
父節點
當前提交
f4951ed56b

+ 1
- 1
Marlin/src/core/types.h 查看文件

54
   X_HEAD, Y_HEAD, Z_HEAD,
54
   X_HEAD, Y_HEAD, Z_HEAD,
55
   E0_AXIS = E_AXIS,
55
   E0_AXIS = E_AXIS,
56
   E1_AXIS, E2_AXIS, E3_AXIS, E4_AXIS, E5_AXIS, E6_AXIS, E7_AXIS,
56
   E1_AXIS, E2_AXIS, E3_AXIS, E4_AXIS, E5_AXIS, E6_AXIS, E7_AXIS,
57
-  ALL_AXES_MASK = 0xFE, NO_AXIS_MASK = 0xFF
57
+  ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF
58
 };
58
 };
59
 
59
 
60
 //
60
 //

+ 1
- 1
Marlin/src/gcode/calibrate/M852.cpp 查看文件

86
 
86
 
87
   // When skew is changed the current position changes
87
   // When skew is changed the current position changes
88
   if (setval) {
88
   if (setval) {
89
-    set_current_from_steppers_for_axis(ALL_AXES_MASK);
89
+    set_current_from_steppers_for_axis(ALL_AXES_ENUM);
90
     sync_plan_position();
90
     sync_plan_position();
91
     report_current_position();
91
     report_current_position();
92
   }
92
   }

+ 1
- 1
Marlin/src/gcode/probe/G38.cpp 查看文件

38
   planner.synchronize();
38
   planner.synchronize();
39
   G38_move = 0;
39
   G38_move = 0;
40
   endstops.hit_on_purpose();
40
   endstops.hit_on_purpose();
41
-  set_current_from_steppers_for_axis(ALL_AXES_MASK);
41
+  set_current_from_steppers_for_axis(ALL_AXES_ENUM);
42
   sync_plan_position();
42
   sync_plan_position();
43
 }
43
 }
44
 
44
 

+ 6
- 6
Marlin/src/lcd/marlinui.cpp 查看文件

684
   #if ENABLED(MULTI_E_MANUAL)
684
   #if ENABLED(MULTI_E_MANUAL)
685
     int8_t ManualMove::e_index = 0;
685
     int8_t ManualMove::e_index = 0;
686
   #endif
686
   #endif
687
-  AxisEnum ManualMove::axis = NO_AXIS_MASK;
687
+  AxisEnum ManualMove::axis = NO_AXIS_ENUM;
688
 
688
 
689
   /**
689
   /**
690
    * If a manual move has been posted and its time has arrived, and if the planner
690
    * If a manual move has been posted and its time has arrived, and if the planner
695
    *
695
    *
696
    * To post a manual move:
696
    * To post a manual move:
697
    *   - Update current_position to the new place you want to go.
697
    *   - Update current_position to the new place you want to go.
698
-   *   - Set manual_move.axis to an axis like X_AXIS. Use ALL_AXES_MASK for diagonal moves.
698
+   *   - Set manual_move.axis to an axis like X_AXIS. Use ALL_AXES_ENUM for diagonal moves.
699
    *   - Set manual_move.start_time to a point in the future (in ms) when the move should be done.
699
    *   - Set manual_move.start_time to a point in the future (in ms) when the move should be done.
700
    *
700
    *
701
    * For kinematic machines:
701
    * For kinematic machines:
710
     if (processing) return;   // Prevent re-entry from idle() calls
710
     if (processing) return;   // Prevent re-entry from idle() calls
711
 
711
 
712
     // Add a manual move to the queue?
712
     // Add a manual move to the queue?
713
-    if (axis != NO_AXIS_MASK && ELAPSED(millis(), start_time) && !planner.is_full()) {
713
+    if (axis != NO_AXIS_ENUM && ELAPSED(millis(), start_time) && !planner.is_full()) {
714
 
714
 
715
       const feedRate_t fr_mm_s = (axis <= E_AXIS) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S;
715
       const feedRate_t fr_mm_s = (axis <= E_AXIS) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S;
716
 
716
 
722
         #endif
722
         #endif
723
 
723
 
724
         // Apply a linear offset to a single axis
724
         // Apply a linear offset to a single axis
725
-        if (axis == ALL_AXES_MASK)
725
+        if (axis == ALL_AXES_ENUM)
726
           destination = all_axes_destination;
726
           destination = all_axes_destination;
727
         else if (axis <= XYZE) {
727
         else if (axis <= XYZE) {
728
           destination = current_position;
728
           destination = current_position;
731
 
731
 
732
         // Reset for the next move
732
         // Reset for the next move
733
         offset = 0;
733
         offset = 0;
734
-        axis = NO_AXIS_MASK;
734
+        axis = NO_AXIS_ENUM;
735
 
735
 
736
         // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
736
         // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
737
         // move_to_destination. This will cause idle() to be called, which can then call this function while the
737
         // move_to_destination. This will cause idle() to be called, which can then call this function while the
748
 
748
 
749
         //SERIAL_ECHOLNPAIR("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s);
749
         //SERIAL_ECHOLNPAIR("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s);
750
 
750
 
751
-        axis = NO_AXIS_MASK;
751
+        axis = NO_AXIS_ENUM;
752
 
752
 
753
       #endif
753
       #endif
754
     }
754
     }

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_leveling.cpp 查看文件

206
 #if ENABLED(MESH_EDIT_MENU)
206
 #if ENABLED(MESH_EDIT_MENU)
207
 
207
 
208
   inline void refresh_planner() {
208
   inline void refresh_planner() {
209
-    set_current_from_steppers_for_axis(ALL_AXES_MASK);
209
+    set_current_from_steppers_for_axis(ALL_AXES_ENUM);
210
     sync_plan_position();
210
     sync_plan_position();
211
   }
211
   }
212
 
212
 

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp 查看文件

430
 
430
 
431
   // Use the built-in manual move handler to move to the mesh point.
431
   // Use the built-in manual move handler to move to the mesh point.
432
   ui.manual_move.set_destination(xy);
432
   ui.manual_move.set_destination(xy);
433
-  ui.manual_move.soon(ALL_AXES_MASK);
433
+  ui.manual_move.soon(ALL_AXES_ENUM);
434
 }
434
 }
435
 
435
 
436
 inline int32_t grid_index(const uint8_t x, const uint8_t y) {
436
 inline int32_t grid_index(const uint8_t x, const uint8_t y) {

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

282
 void quickstop_stepper() {
282
 void quickstop_stepper() {
283
   planner.quick_stop();
283
   planner.quick_stop();
284
   planner.synchronize();
284
   planner.synchronize();
285
-  set_current_from_steppers_for_axis(ALL_AXES_MASK);
285
+  set_current_from_steppers_for_axis(ALL_AXES_ENUM);
286
   sync_plan_position();
286
   sync_plan_position();
287
 }
287
 }
288
 
288
 
360
     planner.unapply_modifiers(pos, true);
360
     planner.unapply_modifiers(pos, true);
361
   #endif
361
   #endif
362
 
362
 
363
-  if (axis == ALL_AXES_MASK)
363
+  if (axis == ALL_AXES_ENUM)
364
     current_position = pos;
364
     current_position = pos;
365
   else
365
   else
366
     current_position[axis] = pos[axis];
366
     current_position[axis] = pos[axis];

Loading…
取消
儲存