Kaynağa Gözat

🎨 Rename all/no axis enums

Scott Lahteine 4 yıl önce
ebeveyn
işleme
f4951ed56b

+ 1
- 1
Marlin/src/core/types.h Dosyayı Görüntüle

@@ -54,7 +54,7 @@ enum AxisEnum : uint8_t {
54 54
   X_HEAD, Y_HEAD, Z_HEAD,
55 55
   E0_AXIS = E_AXIS,
56 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 Dosyayı Görüntüle

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

+ 1
- 1
Marlin/src/gcode/probe/G38.cpp Dosyayı Görüntüle

@@ -38,7 +38,7 @@ inline void G38_single_probe(const uint8_t move_value) {
38 38
   planner.synchronize();
39 39
   G38_move = 0;
40 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 42
   sync_plan_position();
43 43
 }
44 44
 

+ 6
- 6
Marlin/src/lcd/marlinui.cpp Dosyayı Görüntüle

@@ -684,7 +684,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
684 684
   #if ENABLED(MULTI_E_MANUAL)
685 685
     int8_t ManualMove::e_index = 0;
686 686
   #endif
687
-  AxisEnum ManualMove::axis = NO_AXIS_MASK;
687
+  AxisEnum ManualMove::axis = NO_AXIS_ENUM;
688 688
 
689 689
   /**
690 690
    * If a manual move has been posted and its time has arrived, and if the planner
@@ -695,7 +695,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
695 695
    *
696 696
    * To post a manual move:
697 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 699
    *   - Set manual_move.start_time to a point in the future (in ms) when the move should be done.
700 700
    *
701 701
    * For kinematic machines:
@@ -710,7 +710,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
710 710
     if (processing) return;   // Prevent re-entry from idle() calls
711 711
 
712 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 715
       const feedRate_t fr_mm_s = (axis <= E_AXIS) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S;
716 716
 
@@ -722,7 +722,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
722 722
         #endif
723 723
 
724 724
         // Apply a linear offset to a single axis
725
-        if (axis == ALL_AXES_MASK)
725
+        if (axis == ALL_AXES_ENUM)
726 726
           destination = all_axes_destination;
727 727
         else if (axis <= XYZE) {
728 728
           destination = current_position;
@@ -731,7 +731,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
731 731
 
732 732
         // Reset for the next move
733 733
         offset = 0;
734
-        axis = NO_AXIS_MASK;
734
+        axis = NO_AXIS_ENUM;
735 735
 
736 736
         // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
737 737
         // move_to_destination. This will cause idle() to be called, which can then call this function while the
@@ -748,7 +748,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
748 748
 
749 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 753
       #endif
754 754
     }

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_leveling.cpp Dosyayı Görüntüle

@@ -206,7 +206,7 @@
206 206
 #if ENABLED(MESH_EDIT_MENU)
207 207
 
208 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 210
     sync_plan_position();
211 211
   }
212 212
 

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp Dosyayı Görüntüle

@@ -430,7 +430,7 @@ void ubl_map_move_to_xy() {
430 430
 
431 431
   // Use the built-in manual move handler to move to the mesh point.
432 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 436
 inline int32_t grid_index(const uint8_t x, const uint8_t y) {

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

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

Loading…
İptal
Kaydet