♻️ Refactor axis counts and loops

This commit is contained in:
Scott Lahteine authored and Scott Lahteine committed 2021-05-22 16:08:08 -05:00
1 parent f7d28ce1d6
commit 26a244325b
45 files changed
+178 -165

No files matched your search

+3 -3
View File
@@ -71,11 +71,11 @@ void GcodeSuite::G61(void) {
else {
if (parser.seen("XYZ")) {
DEBUG_ECHOPAIR(STR_RESTORING_POS " S", slot);
LOOP_XYZ(i) {
destination[i] = parser.seen(XYZ_CHAR(i))
LOOP_LINEAR_AXES(i) {
destination[i] = parser.seen(AXIS_CHAR(i))
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
: current_position[i];
DEBUG_CHAR(' ', XYZ_CHAR(i));
DEBUG_CHAR(' ', AXIS_CHAR(i));
DEBUG_ECHO_F(destination[i]);
}
DEBUG_EOL();