Single Z raise value for all tool-changing / parking (#12090)

* Universal tool-change Z lift
* Add TOOLCHANGE_ZRAISE to example configs
* Park/unpark changes to example configs
* Implement DEBUG_DXC_MODE
This commit is contained in:
InsanityAutomation
2018-10-17 12:11:41 -04:00
committed by Scott Lahteine
parent 6bdbe3299e
commit 3ec3872730
144 changed files with 395 additions and 580 deletions

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfigPre.h"
#if ENABLED(SINGLENOZZLE)
#if EXTRUDERS > 1
#include "../gcode.h"
#include "../../module/tool_change.h"
@ -32,18 +32,25 @@
#endif
void M217_report(const bool eeprom=false) {
#if NUM_SERIAL > 1
const int16_t port = command_queue_port[cmd_queue_index_r];
#endif
serialprintPGM_P(port, eeprom ? PSTR(" M217") : PSTR("Singlenozzle:"));
SERIAL_ECHOPAIR_P(port, " S", LINEAR_UNIT(sn_settings.swap_length));
SERIAL_ECHOPAIR_P(port, " P", LINEAR_UNIT(sn_settings.prime_speed));
SERIAL_ECHOPAIR_P(port, " R", LINEAR_UNIT(sn_settings.retract_speed));
#if ENABLED(SINGLENOZZLE_SWAP_PARK)
SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(sn_settings.change_point.x));
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(sn_settings.change_point.y));
#if ENABLED(SINGLENOZZLE)
serialprintPGM_P(port, eeprom ? PSTR(" M217") : PSTR("Singlenozzle:"));
SERIAL_ECHOPAIR_P(port, " S", LINEAR_UNIT(toolchange_settings.swap_length));
SERIAL_ECHOPAIR_P(port, " P", LINEAR_UNIT(toolchange_settings.prime_speed));
SERIAL_ECHOPAIR_P(port, " R", LINEAR_UNIT(toolchange_settings.retract_speed));
#if ENABLED(SINGLENOZZLE_SWAP_PARK)
SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(toolchange_settings.change_point.x));
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(toolchange_settings.change_point.y));
#endif
#endif
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(sn_settings.z_raise));
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(toolchange_settings.z_raise));
SERIAL_EOL();
}
@ -61,19 +68,23 @@ void GcodeSuite::M217() {
bool report = true;
if (parser.seenval('S')) { report = false; const float v = parser.value_linear_units(); sn_settings.swap_length = constrain(v, 0, 500); }
if (parser.seenval('P')) { report = false; const int16_t v = parser.value_linear_units(); sn_settings.prime_speed = constrain(v, 10, 5400); }
if (parser.seenval('R')) { report = false; const int16_t v = parser.value_linear_units(); sn_settings.retract_speed = constrain(v, 10, 5400); }
#if ENABLED(SINGLENOZZLE)
if (parser.seenval('S')) { report = false; const float v = parser.value_linear_units(); toolchange_settings.swap_length = constrain(v, 0, 500); }
if (parser.seenval('P')) { report = false; const int16_t v = parser.value_linear_units(); toolchange_settings.prime_speed = constrain(v, 10, 5400); }
if (parser.seenval('R')) { report = false; const int16_t v = parser.value_linear_units(); toolchange_settings.retract_speed = constrain(v, 10, 5400); }
#if ENABLED(SINGLENOZZLE_SWAP_PARK)
if (parser.seenval('X')) { report = false; toolchange_settings.change_point.x = parser.value_linear_units(); }
if (parser.seenval('Y')) { report = false; toolchange_settings.change_point.y = parser.value_linear_units(); }
#endif
#if ENABLED(SINGLENOZZLE_SWAP_PARK)
if (parser.seenval('X')) { report = false; sn_settings.change_point.x = parser.value_linear_units(); }
if (parser.seenval('Y')) { report = false; sn_settings.change_point.y = parser.value_linear_units(); }
#endif
if (parser.seenval('Z')) { report = false; sn_settings.z_raise = parser.value_linear_units(); }
if (parser.seenval('Z')) { report = false; toolchange_settings.z_raise = parser.value_linear_units(); }
if (report) M217_report();
}
#endif // SINGLENOZZLE
#endif // EXTRUDERS > 1