We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81a0014 commit ac94a65Copy full SHA for ac94a65
libraries/Servo/src/nrf52/Servo.cpp
@@ -129,7 +129,7 @@ void Servo::write(int value)
129
130
void Servo::writeMicroseconds(int value)
131
{
132
- if (this->pwm) { // pwm is only set when this->servoIndex != INVALID_SERVO
+ if (this->pwm) {
133
uint8_t pin = servos[this->servoIndex].Pin.nbr;
134
this->pwm->writePin(pin, value/DUTY_CYCLE_RESOLUTION);
135
}
@@ -142,7 +142,7 @@ int Servo::read() // return the value as degrees
142
143
int Servo::readMicroseconds()
144
145
146
147
return this->pwm->readPin(pin)*DUTY_CYCLE_RESOLUTION;
148
0 commit comments