Skip to content

Commit cdbd438

Browse files
committed
🎨 Rename all/no axis enums
1 parent 3220c49 commit cdbd438

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

Marlin/src/core/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum AxisEnum : uint8_t {
5454
X_HEAD, Y_HEAD, Z_HEAD,
5555
E0_AXIS = E_AXIS,
5656
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
5858
};
5959

6060
//

Marlin/src/gcode/calibrate/M852.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void GcodeSuite::M852() {
8686

8787
// When skew is changed the current position changes
8888
if (setval) {
89-
set_current_from_steppers_for_axis(ALL_AXES_MASK);
89+
set_current_from_steppers_for_axis(ALL_AXES_ENUM);
9090
sync_plan_position();
9191
report_current_position();
9292
}

Marlin/src/gcode/probe/G38.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ inline void G38_single_probe(const uint8_t move_value) {
3838
planner.synchronize();
3939
G38_move = 0;
4040
endstops.hit_on_purpose();
41-
set_current_from_steppers_for_axis(ALL_AXES_MASK);
41+
set_current_from_steppers_for_axis(ALL_AXES_ENUM);
4242
sync_plan_position();
4343
}
4444

Marlin/src/lcd/marlinui.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
684684
#if ENABLED(MULTI_E_MANUAL)
685685
int8_t ManualMove::e_index = 0;
686686
#endif
687-
AxisEnum ManualMove::axis = NO_AXIS_MASK;
687+
AxisEnum ManualMove::axis = NO_AXIS_ENUM;
688688

689689
/**
690690
* 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*/) {
695695
*
696696
* To post a manual move:
697697
* - 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.
699699
* - Set manual_move.start_time to a point in the future (in ms) when the move should be done.
700700
*
701701
* For kinematic machines:
@@ -710,7 +710,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
710710
if (processing) return; // Prevent re-entry from idle() calls
711711

712712
// 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()) {
714714

715715
const feedRate_t fr_mm_s = (axis <= E_AXIS) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S;
716716

@@ -722,7 +722,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
722722
#endif
723723

724724
// Apply a linear offset to a single axis
725-
if (axis == ALL_AXES_MASK)
725+
if (axis == ALL_AXES_ENUM)
726726
destination = all_axes_destination;
727727
else if (axis <= XYZE) {
728728
destination = current_position;
@@ -731,7 +731,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
731731

732732
// Reset for the next move
733733
offset = 0;
734-
axis = NO_AXIS_MASK;
734+
axis = NO_AXIS_ENUM;
735735

736736
// DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
737737
// 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*/) {
748748

749749
//SERIAL_ECHOLNPAIR("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s);
750750

751-
axis = NO_AXIS_MASK;
751+
axis = NO_AXIS_ENUM;
752752

753753
#endif
754754
}

Marlin/src/lcd/menu/menu_bed_leveling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
#if ENABLED(MESH_EDIT_MENU)
207207

208208
inline void refresh_planner() {
209-
set_current_from_steppers_for_axis(ALL_AXES_MASK);
209+
set_current_from_steppers_for_axis(ALL_AXES_ENUM);
210210
sync_plan_position();
211211
}
212212

Marlin/src/lcd/menu/menu_ubl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ void ubl_map_move_to_xy() {
430430

431431
// Use the built-in manual move handler to move to the mesh point.
432432
ui.manual_move.set_destination(xy);
433-
ui.manual_move.soon(ALL_AXES_MASK);
433+
ui.manual_move.soon(ALL_AXES_ENUM);
434434
}
435435

436436
inline int32_t grid_index(const uint8_t x, const uint8_t y) {

Marlin/src/module/motion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void report_current_position_projected() {
282282
void quickstop_stepper() {
283283
planner.quick_stop();
284284
planner.synchronize();
285-
set_current_from_steppers_for_axis(ALL_AXES_MASK);
285+
set_current_from_steppers_for_axis(ALL_AXES_ENUM);
286286
sync_plan_position();
287287
}
288288

@@ -360,7 +360,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
360360
planner.unapply_modifiers(pos, true);
361361
#endif
362362

363-
if (axis == ALL_AXES_MASK)
363+
if (axis == ALL_AXES_ENUM)
364364
current_position = pos;
365365
else
366366
current_position[axis] = pos[axis];

0 commit comments

Comments
 (0)