|
|
@ -126,7 +126,7 @@ typedef struct SettingsDataStruct { |
|
|
|
|
|
|
|
float home_offset[XYZ]; // M206 XYZ
|
|
|
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
float hotend_offset[XYZ][HOTENDS - 1]; // M218 XYZ
|
|
|
|
#endif |
|
|
|
|
|
|
@ -433,7 +433,7 @@ void MarlinSettings::postprocess() { |
|
|
|
#endif |
|
|
|
EEPROM_WRITE(home_offset); |
|
|
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
// Skip hotend 0 which must be 0
|
|
|
|
for (uint8_t e = 1; e < HOTENDS; e++) |
|
|
|
LOOP_XYZ(i) EEPROM_WRITE(hotend_offset[i][e]); |
|
|
@ -1038,7 +1038,7 @@ void MarlinSettings::postprocess() { |
|
|
|
// Hotend Offsets, if any
|
|
|
|
//
|
|
|
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
// Skip hotend 0 which must be 0
|
|
|
|
for (uint8_t e = 1; e < HOTENDS; e++) |
|
|
|
LOOP_XYZ(i) EEPROM_READ(hotend_offset[i][e]); |
|
|
@ -1749,16 +1749,8 @@ void MarlinSettings::reset(PORTARG_SOLO) { |
|
|
|
ZERO(home_offset); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
constexpr float tmp4[XYZ][HOTENDS] = { |
|
|
|
HOTEND_OFFSET_X, |
|
|
|
HOTEND_OFFSET_Y |
|
|
|
#ifdef HOTEND_OFFSET_Z |
|
|
|
, HOTEND_OFFSET_Z |
|
|
|
#else |
|
|
|
, { 0 } |
|
|
|
#endif |
|
|
|
}; |
|
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
constexpr float tmp4[XYZ][HOTENDS] = { HOTEND_OFFSET_X, HOTEND_OFFSET_Y, HOTEND_OFFSET_Z }; |
|
|
|
static_assert( |
|
|
|
tmp4[X_AXIS][0] == 0 && tmp4[Y_AXIS][0] == 0 && tmp4[Z_AXIS][0] == 0, |
|
|
|
"Offsets for the first hotend must be 0.0." |
|
|
@ -2163,7 +2155,7 @@ void MarlinSettings::reset(PORTARG_SOLO) { |
|
|
|
SERIAL_ECHOLNPAIR_P(port, " Z", LINEAR_UNIT(home_offset[Z_AXIS])); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HOTENDS > 1 |
|
|
|
#if HAS_HOTEND_OFFSET |
|
|
|
if (!forReplay) { |
|
|
|
CONFIG_ECHO_START; |
|
|
|
SERIAL_ECHOLNPGM_P(port, "Hotend offsets:"); |
|
|
@ -2173,9 +2165,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 HAS_HOTEND_OFFSET_Z |
|
|
|
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e])); |
|
|
|
#endif |
|
|
|
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e])); |
|
|
|
SERIAL_EOL_P(port); |
|
|
|
} |
|
|
|
#endif |
|
|
|