|
|
|
@ -308,9 +308,11 @@ int Servo::readMicroseconds() {
|
|
|
|
|
bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
|
|
|
|
|
|
|
|
|
|
void Servo::move(int value) {
|
|
|
|
|
constexpr uint16_t servo_delay[] = SERVO_DELAY;
|
|
|
|
|
static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
|
|
|
|
|
if (this->attach(0) >= 0) {
|
|
|
|
|
this->write(value);
|
|
|
|
|
delay(SERVO_DELAY);
|
|
|
|
|
delay(servo_delay[this->servoIndex]);
|
|
|
|
|
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
|
|
|
|
|
this->detach();
|
|
|
|
|
#endif
|
|
|
|
|