diff --git a/library/stm32f072xb/motor/servo/servo.hpp b/library/stm32f072xb/motor/servo/servo.hpp index 750a0b7dd9fbcb07e77083056ee247a4d609a999..9e9b55cbac7e9e64216a687860a328f162bf3843 100644 --- a/library/stm32f072xb/motor/servo/servo.hpp +++ b/library/stm32f072xb/motor/servo/servo.hpp @@ -71,9 +71,7 @@ class Servo { _maxAngle(maxAngle), _scaler((float)(_zeroDegreeDutyCycle - pulseWidthMIN) / (float)amplitude), _timer(servoInit.timer, servoInit.OCC, PWM_RESOLUTION, PWM_FREQUENCY, _zeroDegreeDutyCycle), - _pwmOutputPin({servoInit.pwmPin, Pupdr::NONE, servoInit.alternateFunction}) { - setAngle((maxAngle + minAngle) / 2); - } + _pwmOutputPin({servoInit.pwmPin, Pupdr::NONE, servoInit.alternateFunction}) {} int16_t getAngle() const { return _currentAngle; }