Add HAS_HOTEND_OFFSET_Z conditional
This commit is contained in:
parent
3c76bda2d8
commit
83d42f33e1
4 changed files with 5 additions and 7 deletions
|
@ -52,7 +52,7 @@ void GcodeSuite::M218() {
|
|||
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;
|
||||
|
@ -67,7 +67,7 @@ void GcodeSuite::M218() {
|
|||
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
|
||||
|
|
|
@ -413,9 +413,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
|
||||
|
||||
#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
|
||||
|
|
|
@ -434,6 +434,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
|
||||
|
@ -441,7 +442,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
|
||||
|
|
|
@ -2126,7 +2126,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
|||
SERIAL_ECHOPAIR_P(port, " M218 T", (int)e);
|
||||
SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
|
||||
SERIAL_ECHOPAIR_P(port, " 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_P(port, " Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]));
|
||||
#endif
|
||||
SERIAL_EOL_P(port);
|
||||
|
|
Reference in a new issue