Code review required comment removal

This commit is contained in:
Henry Gabryjelski committed 2020-07-28 23:05:13 -07:00
1 parent d00de2d783
commit d7b18ed40f
1 file changed
+2 -2
+2 -2
View File
@@ -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);
}
@@ -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;
}