♻️ Refactor Linear / Logical / Distinct Axes (#21953)

* More patches supporting EXTRUDERS 0
* Extend types in prep for more axes
This commit is contained in:
Scott Lahteine
2021-05-24 16:38:57 -05:00
committed by Scott Lahteine
parent f5f999d7bf
commit 4194cdda5b
43 changed files with 1142 additions and 788 deletions

View File

@ -68,7 +68,7 @@ void GcodeSuite::G61(void) {
SYNC_E(stored_position[slot].e);
}
else {
if (parser.seen("XYZ")) {
if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z"))) {
DEBUG_ECHOPAIR(STR_RESTORING_POS " S", slot);
LOOP_LINEAR_AXES(i) {
destination[i] = parser.seen(AXIS_CHAR(i))
@ -81,10 +81,12 @@ void GcodeSuite::G61(void) {
// Move to the saved position
prepare_line_to_destination();
}
if (parser.seen_test('E')) {
DEBUG_ECHOLNPAIR(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
SYNC_E(stored_position[slot].e);
}
#if HAS_EXTRUDERS
if (parser.seen_test('E')) {
DEBUG_ECHOLNPAIR(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
SYNC_E(stored_position[slot].e);
}
#endif
}
feedrate_mm_s = saved_feedrate;

View File

@ -49,13 +49,21 @@ void GcodeSuite::M122() {
tmc_set_report_interval(interval);
#endif
if (parser.seen_test('V'))
tmc_get_registers(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
else
tmc_report_all(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
if (parser.seen_test('V')) {
tmc_get_registers(
LOGICAL_AXIS_LIST(print_axis.e, print_axis.x, print_axis.y, print_axis.z)
);
}
else {
tmc_report_all(
LOGICAL_AXIS_LIST(print_axis.e, print_axis.x, print_axis.y, print_axis.z)
);
}
#endif
test_tmc_connection(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
test_tmc_connection(
LOGICAL_AXIS_LIST(print_axis.e, print_axis.x, print_axis.y, print_axis.z)
);
}
#endif // HAS_TRINAMIC_CONFIG