SwitchingNozzleProbeRetract

This commit is contained in:
InsanityAutomation
2025-04-18 12:04:26 -04:00
parent 7b083be5c5
commit 98f636ef1d
4 changed files with 14 additions and 0 deletions
+1
View File
@@ -260,6 +260,7 @@
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // A pair of angles for { E0, E1 }.
// For Dual Servo use two pairs: { { lower, raise }, { lower, raise } }
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
#define SWITCHING_NOZZLE_PARK_TO_PROBE // Retract active tool head while probing to avoid nozzle interference
#endif
// Switch nozzles by bumping the toolhead. Requires EVENT_GCODE_TOOLCHANGE_#.
+2
View File
@@ -726,6 +726,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
#elif !defined(SWITCHING_NOZZLE_SERVO_NR)
#error "SWITCHING_NOZZLE requires SWITCHING_NOZZLE_SERVO_NR."
#elif ALL(SWITCHING_NOZZLE_PARK_TO_PROBE, NOZZLE_AS_PROBE)
#error " SWITCHING_NOZZLE_PARK_TO_PROBE cannot be used with NOZZLE_AS_PROBE,"
#elif SWITCHING_NOZZLE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
#error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
#elif SWITCHING_NOZZLE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
+4
View File
@@ -406,6 +406,10 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
#endif // PAUSE_BEFORE_DEPLOY_STOW
#if ENABLED(SWITCHING_NOZZLE, SWITCHING_NOZZLE_PARK_TO_PROBE) && DISABLED(NOZZLE_AS_PROBE)
servo[SWITCHING_NOZZLE_SERVO_NR].move(servo_angles[SWITCHING_NOZZLE_SERVO_NR][deploy ? 1 : 0]);
#endif
#if ENABLED(SOLENOID_PROBE)
#if HAS_SOLENOID_1
+7
View File
@@ -1415,6 +1415,13 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
#endif
} // (new_tool != old_tool)
else
{
// For switching nozzle with servos, you may have manually edited servo angles
// or other functions which may affect angles. Ensure a T# command restores
// active tool position even when recalling the same tool
TERN_(SWITCHING_NOZZLE_TWO_SERVOS, lower_nozzle(new_tool));
}
planner.synchronize();