Add HAS_HOTEND_OFFSET_Z conditional
This commit is contained in:
parent
a847ea625e
commit
af3a68f81f
@ -403,9 +403,6 @@
|
||||
#undef HOTEND_OFFSET_Y
|
||||
#else // Two hotends
|
||||
#define HOTENDS EXTRUDERS
|
||||
#if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z)
|
||||
#define HOTEND_OFFSET_Z { 0 }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
||||
|
@ -384,6 +384,7 @@
|
||||
/**
|
||||
* Default hotend offsets, if not defined
|
||||
*/
|
||||
#define HAS_HOTEND_OFFSET_Z (HOTENDS > 1 && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)))
|
||||
#if HOTENDS > 1
|
||||
#ifndef HOTEND_OFFSET_X
|
||||
#define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
|
||||
@ -391,7 +392,7 @@
|
||||
#ifndef HOTEND_OFFSET_Y
|
||||
#define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
|
||||
#endif
|
||||
#if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE))
|
||||
#if HAS_HOTEND_OFFSET_Z && !defined(HOTEND_OFFSET_Z)
|
||||
#define HOTEND_OFFSET_Z { 0 }
|
||||
#endif
|
||||
#endif
|
||||
|
@ -9332,7 +9332,7 @@ inline void gcode_M211() {
|
||||
* T<tool>
|
||||
* X<xoffset>
|
||||
* Y<yoffset>
|
||||
* Z<zoffset> - Available with DUAL_X_CARRIAGE and SWITCHING_NOZZLE
|
||||
* Z<zoffset> - Available with DUAL_X_CARRIAGE, SWITCHING_NOZZLE, and PARKING_EXTRUDER
|
||||
*/
|
||||
inline void gcode_M218() {
|
||||
if (get_target_extruder_from_command(218) || target_extruder == 0) return;
|
||||
@ -9347,7 +9347,7 @@ inline void gcode_M211() {
|
||||
report = false;
|
||||
}
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
|
||||
#if HAS_HOTEND_OFFSET_Z
|
||||
if (parser.seenval('Z')) {
|
||||
hotend_offset[Z_AXIS][target_extruder] = parser.value_linear_units();
|
||||
report = false;
|
||||
@ -9362,7 +9362,7 @@ inline void gcode_M211() {
|
||||
SERIAL_ECHO(hotend_offset[X_AXIS][e]);
|
||||
SERIAL_CHAR(',');
|
||||
SERIAL_ECHO(hotend_offset[Y_AXIS][e]);
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
|
||||
#if HAS_HOTEND_OFFSET_Z
|
||||
SERIAL_CHAR(',');
|
||||
SERIAL_ECHO(hotend_offset[Z_AXIS][e]);
|
||||
#endif
|
||||
|
@ -1718,7 +1718,7 @@ void MarlinSettings::reset() {
|
||||
constexpr float tmp4[XYZ][HOTENDS] = {
|
||||
HOTEND_OFFSET_X,
|
||||
HOTEND_OFFSET_Y
|
||||
#ifdef HOTEND_OFFSET_Z
|
||||
#if HAS_HOTEND_OFFSET_Z
|
||||
, HOTEND_OFFSET_Z
|
||||
#else
|
||||
, { 0 }
|
||||
@ -2109,7 +2109,7 @@ void MarlinSettings::reset() {
|
||||
SERIAL_ECHOPAIR(" M218 T", (int)e);
|
||||
SERIAL_ECHOPAIR(" X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
|
||||
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e]));
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) ||ENABLED(PARKING_EXTRUDER)
|
||||
#if HAS_HOTEND_OFFSET_Z
|
||||
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
|
Loading…
Reference in New Issue
Block a user