From 40b6edcad70396f2a94b993b85ad3301745fd5d7 Mon Sep 17 00:00:00 2001
From: AnHardt <github@kitelab.de>
Date: Sun, 12 Jul 2015 23:36:17 +0200
Subject: [PATCH] Introduce DEACTIVATE_SERVOS_AFTER_MOVE in Configuration.h

DEACTIVATE_SERVOS_AFTER_MOVE is ought to replace PROBE_SERVO_DEACTIVATION_DELAY.
But it will work on all servo moves, not only the probe servo moves.
---
 Marlin/Configuration.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 85865226a32..b574c479968 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -774,6 +774,17 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
 //
 //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
 
+// If DEACTIVATE_SERVOS_AFTER_MOVE is defined, the servos will be turned on only during movement and then turned off to avoid jitter
+// SERVO_DEACTIVATION_DELAY is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
+// If your servo does not reach the requested position, enlarge the time.
+// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
+//
+#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#ifdef DEACTIVATE_SERVOS_AFTER_MOVE
+  #define SERVO_DEACTIVATION_DELAY 300
+#endif
+
 // Servo Endstops
 //
 // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.