♻️ Refactor Linear / Logical / Distinct Axes (#21953)
* More patches supporting EXTRUDERS 0 * Extend types in prep for more axes
This commit is contained in:
@@ -74,11 +74,11 @@ millis_t GcodeSuite::previous_move_ms = 0,
|
||||
|
||||
// Relative motion mode for each logical axis
|
||||
static constexpr xyze_bool_t ar_init = AXIS_RELATIVE_MODES;
|
||||
uint8_t GcodeSuite::axis_relative = (
|
||||
(ar_init.x ? _BV(REL_X) : 0)
|
||||
| (ar_init.y ? _BV(REL_Y) : 0)
|
||||
| (ar_init.z ? _BV(REL_Z) : 0)
|
||||
| (ar_init.e ? _BV(REL_E) : 0)
|
||||
uint8_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG(
|
||||
| (ar_init.e << REL_E),
|
||||
| (ar_init.x << REL_X),
|
||||
| (ar_init.y << REL_Y),
|
||||
| (ar_init.z << REL_Z)
|
||||
);
|
||||
|
||||
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
||||
@@ -161,13 +161,15 @@ void GcodeSuite::get_destination_from_command() {
|
||||
destination[i] = current_position[i];
|
||||
}
|
||||
|
||||
// Get new E position, whether absolute or relative
|
||||
if ( (seen.e = parser.seenval('E')) ) {
|
||||
const float v = parser.value_axis_units(E_AXIS);
|
||||
destination.e = axis_is_relative(E_AXIS) ? current_position.e + v : v;
|
||||
}
|
||||
else
|
||||
destination.e = current_position.e;
|
||||
#if HAS_EXTRUDERS
|
||||
// Get new E position, whether absolute or relative
|
||||
if ( (seen.e = parser.seenval('E')) ) {
|
||||
const float v = parser.value_axis_units(E_AXIS);
|
||||
destination.e = axis_is_relative(E_AXIS) ? current_position.e + v : v;
|
||||
}
|
||||
else
|
||||
destination.e = current_position.e;
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY) && !PIN_EXISTS(POWER_LOSS)
|
||||
// Only update power loss recovery on moves with E
|
||||
|
||||
Reference in New Issue
Block a user