2.0 IDEX Independent z offset and other fixes (#11862)

* Add Formbot Raptor board

Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>

* Add a second Z probe Z offset

Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>

* Modify method to utilize live adjustment of hotend z offset

Should probably move config option to babystepping and rename as it may now apply to all multiextruder systems

* Move config item and catchup other code to current method
This commit is contained in:
InsanityAutomation
2018-09-24 10:40:48 -04:00
committed by Roxy-3D
parent 217e0efd20
commit 1104054d73
13 changed files with 290 additions and 38 deletions

View File

@ -36,9 +36,23 @@
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
FORCE_INLINE void mod_zprobe_zoffset(const float &offs) {
zprobe_zoffset += offs;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
if (active_extruder == 0)
{
zprobe_zoffset += offs;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
} else {
hotend_offset[Z_AXIS][active_extruder] -= offs;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_IDEX_Z_OFFSET ": ", hotend_offset[Z_AXIS][active_extruder]);
}
#else
zprobe_zoffset += offs;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
#endif
}
#endif

View File

@ -32,7 +32,9 @@ void GcodeSuite::M851() {
if (parser.seenval('Z')) {
const float value = parser.value_linear_units();
if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
{
zprobe_zoffset = value;
}
else {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");