Allow float XY probe offsets
Responding to #12383 XY probe offsets should be integers because adding decimal points makes the code larger. But if decimals are very much wanted, this commit removes the old restriction.
This commit is contained in:
parent
43ecdb606f
commit
7ee5894360
|
@ -296,30 +296,32 @@ void safe_delay(millis_t ms) {
|
|||
#if HAS_BED_PROBE
|
||||
SERIAL_ECHOPGM("Probe Offset X:" STRINGIFY(X_PROBE_OFFSET_FROM_EXTRUDER) " Y:" STRINGIFY(Y_PROBE_OFFSET_FROM_EXTRUDER));
|
||||
SERIAL_ECHOPAIR(" Z:", zprobe_zoffset);
|
||||
#if X_PROBE_OFFSET_FROM_EXTRUDER > 0
|
||||
if ((X_PROBE_OFFSET_FROM_EXTRUDER) > 0)
|
||||
SERIAL_ECHOPGM(" (Right");
|
||||
#elif X_PROBE_OFFSET_FROM_EXTRUDER < 0
|
||||
else if ((X_PROBE_OFFSET_FROM_EXTRUDER) < 0)
|
||||
SERIAL_ECHOPGM(" (Left");
|
||||
#elif Y_PROBE_OFFSET_FROM_EXTRUDER != 0
|
||||
else if ((Y_PROBE_OFFSET_FROM_EXTRUDER) != 0)
|
||||
SERIAL_ECHOPGM(" (Middle");
|
||||
#else
|
||||
else
|
||||
SERIAL_ECHOPGM(" (Aligned With");
|
||||
#endif
|
||||
#if Y_PROBE_OFFSET_FROM_EXTRUDER > 0
|
||||
|
||||
if ((Y_PROBE_OFFSET_FROM_EXTRUDER) > 0) {
|
||||
#if IS_SCARA
|
||||
SERIAL_ECHOPGM("-Distal");
|
||||
#else
|
||||
SERIAL_ECHOPGM("-Back");
|
||||
#endif
|
||||
#elif Y_PROBE_OFFSET_FROM_EXTRUDER < 0
|
||||
}
|
||||
else if ((Y_PROBE_OFFSET_FROM_EXTRUDER) < 0) {
|
||||
#if IS_SCARA
|
||||
SERIAL_ECHOPGM("-Proximal");
|
||||
#else
|
||||
SERIAL_ECHOPGM("-Front");
|
||||
#endif
|
||||
#elif X_PROBE_OFFSET_FROM_EXTRUDER != 0
|
||||
}
|
||||
else if ((X_PROBE_OFFSET_FROM_EXTRUDER) != 0)
|
||||
SERIAL_ECHOPGM("-Center");
|
||||
#endif
|
||||
|
||||
if (zprobe_zoffset < 0)
|
||||
SERIAL_ECHOPGM(" & Below");
|
||||
else if (zprobe_zoffset > 0)
|
||||
|
|
|
@ -1009,9 +1009,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
|||
#error "Z_PROBE_LOW_POINT must be less than or equal to 0."
|
||||
#endif
|
||||
|
||||
static_assert(int(X_PROBE_OFFSET_FROM_EXTRUDER) == (X_PROBE_OFFSET_FROM_EXTRUDER), "X_PROBE_OFFSET_FROM_EXTRUDER must be an integer value.");
|
||||
static_assert(int(Y_PROBE_OFFSET_FROM_EXTRUDER) == (Y_PROBE_OFFSET_FROM_EXTRUDER), "Y_PROBE_OFFSET_FROM_EXTRUDER must be an integer value.");
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue