Skip to content

Commit

Permalink
Code review required comment removal
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygab committed Jul 29, 2020
1 parent d00de2d commit d7b18ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/Servo/src/nrf52/Servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void Servo::write(int value)

void Servo::writeMicroseconds(int value)
{
if (this->pwm) { // pwm is only set when this->servoIndex != INVALID_SERVO
if (this->pwm) {
uint8_t pin = servos[this->servoIndex].Pin.nbr;
this->pwm->writePin(pin, value/DUTY_CYCLE_RESOLUTION);
}
Expand All @@ -142,7 +142,7 @@ int Servo::read() // return the value as degrees

int Servo::readMicroseconds()
{
if (this->pwm) { // pwm is only set when this->servoIndex != INVALID_SERVO
if (this->pwm) {
uint8_t pin = servos[this->servoIndex].Pin.nbr;
return this->pwm->readPin(pin)*DUTY_CYCLE_RESOLUTION;
}
Expand Down

0 comments on commit d7b18ed

Please sign in to comment.