From c0cb7e35afe4a2e94133506d0e7c1d95ddbf80ba Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat, 30 Jul 2022 22:55:32 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Configurable=20Switching=20Nozzle?= =?UTF-8?q?=20dwell=20(#24304)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + Marlin/src/module/tool_change.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 5e452f3c49..986e3c49ab 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -270,6 +270,7 @@ #define SWITCHING_NOZZLE_SERVO_NR 0 //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) + #define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move #endif /** diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 4b292c92f9..dbd95121dc 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -132,7 +132,7 @@ constexpr int16_t sns_angles[2] = SWITCHING_NOZZLE_SERVO_ANGLES; planner.synchronize(); servo[sns_index[e]].move(sns_angles[angle_index]); - safe_delay(500); + safe_delay(SWITCHING_NOZZLE_SERVO_DWELL); } void lower_nozzle(const uint8_t e) { _move_nozzle_servo(e, 0); } @@ -143,7 +143,7 @@ void move_nozzle_servo(const uint8_t angle_index) { planner.synchronize(); servo[SWITCHING_NOZZLE_SERVO_NR].move(servo_angles[SWITCHING_NOZZLE_SERVO_NR][angle_index]); - safe_delay(500); + safe_delay(SWITCHING_NOZZLE_SERVO_DWELL); } #endif