♻️ Refactor axis counts and loops

This commit is contained in:
Scott Lahteine
2021-05-18 22:51:19 -05:00
committed by Scott Lahteine
parent abbe3f0dc7
commit a6e5492b08
45 changed files with 178 additions and 165 deletions

View File

@@ -32,12 +32,12 @@
* M122: Debug TMC drivers
*/
void GcodeSuite::M122() {
xyze_bool_t print_axis = ARRAY_N_1(XYZE, false);
xyze_bool_t print_axis = ARRAY_N_1(LOGICAL_AXES, false);
bool print_all = true;
LOOP_XYZE(i) if (parser.seen(axis_codes[i])) { print_axis[i] = true; print_all = false; }
LOOP_LOGICAL_AXES(i) if (parser.seen(axis_codes[i])) { print_axis[i] = true; print_all = false; }
if (print_all) LOOP_XYZE(i) print_axis[i] = true;
if (print_all) LOOP_LOGICAL_AXES(i) print_axis[i] = true;
if (parser.boolval('I')) restore_stepper_drivers();