Browse Source

Servos attach/detach based only on servo config

Assuming #2470 fixed up the main issue.
Scott Lahteine 10 years ago
parent
commit
96ace72ddc
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/servo.cpp

+ 2
- 2
Marlin/servo.cpp View File

@@ -306,14 +306,14 @@ bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
306 306
 
307 307
 int8_t Servo::move(int pin, int value) {
308 308
   int8_t ret;
309
-  #if SERVO_LEVELING
309
+  #if defined(DEACTIVATE_SERVOS_AFTER_MOVE) && (SERVO_DEACTIVATION_DELAY > 0)
310 310
     ret = this->attach(pin);
311 311
   #else
312 312
     ret = this->servoIndex;
313 313
   #endif
314 314
   if (ret >= 0) {
315 315
     this->write(value);
316
-    #if SERVO_LEVELING
316
+    #if defined(DEACTIVATE_SERVOS_AFTER_MOVE) && (SERVO_DEACTIVATION_DELAY > 0)
317 317
       delay(SERVO_DEACTIVATION_DELAY);
318 318
       this->detach();
319 319
     #endif

Loading…
Cancel
Save