Combine more tool-change variables (#12137)
This commit is contained in:
committed by
Scott Lahteine
parent
147e270208
commit
6471a75a22
@ -37,13 +37,13 @@ void M217_report(const bool eeprom=false) {
|
||||
const int16_t port = command_queue_port[cmd_queue_index_r];
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
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)
|
||||
#if ENABLED(TOOLCHANGE_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
|
||||
@ -60,8 +60,8 @@ void M217_report(const bool eeprom=false) {
|
||||
* S[linear] Swap length
|
||||
* P[linear/m] Prime speed
|
||||
* R[linear/m] Retract speed
|
||||
* X[linear] Park X (Requires SINGLENOZZLE_SWAP_PARK)
|
||||
* Y[linear] Park Y (Requires SINGLENOZZLE_SWAP_PARK)
|
||||
* X[linear] Park X (Requires TOOLCHANGE_PARK)
|
||||
* Y[linear] Park Y (Requires TOOLCHANGE_PARK)
|
||||
* Z[linear] Z Raise
|
||||
*/
|
||||
void GcodeSuite::M217() {
|
||||
@ -69,7 +69,7 @@ void GcodeSuite::M217() {
|
||||
#define SPR_PARAM
|
||||
#define XY_PARAM
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
|
||||
#undef SPR_PARAM
|
||||
#define SPR_PARAM "SPR"
|
||||
@ -77,20 +77,16 @@ void GcodeSuite::M217() {
|
||||
if (parser.seenval('S')) { const float v = parser.value_linear_units(); toolchange_settings.swap_length = constrain(v, 0, 500); }
|
||||
if (parser.seenval('P')) { const int16_t v = parser.value_linear_units(); toolchange_settings.prime_speed = constrain(v, 10, 5400); }
|
||||
if (parser.seenval('R')) { const int16_t v = parser.value_linear_units(); toolchange_settings.retract_speed = constrain(v, 10, 5400); }
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
||||
#undef XY_PARAM
|
||||
#define XY_PARAM "XY"
|
||||
if (parser.seenval('X')) { toolchange_settings.change_point.x = parser.value_linear_units(); }
|
||||
if (parser.seenval('Y')) { toolchange_settings.change_point.y = parser.value_linear_units(); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_PARK)
|
||||
#undef XY_PARAM
|
||||
#define XY_PARAM "XY"
|
||||
if (parser.seenval('X')) { toolchange_settings.change_point.x = parser.value_linear_units(); }
|
||||
if (parser.seenval('Y')) { toolchange_settings.change_point.y = parser.value_linear_units(); }
|
||||
#endif
|
||||
if (parser.seenval('Z')) { toolchange_settings.z_raise = parser.value_linear_units(); }
|
||||
|
||||
if (!parser.seen(SPR_PARAM XY_PARAM "Z")) M217_report();
|
||||
|
||||
}
|
||||
|
||||
#endif // EXTRUDERS > 1
|
||||
|
Reference in New Issue
Block a user