Skip to content

Commit 009f3b9

Browse files
fix map from microseconds to angle in Servo::read
1 parent 8297c32 commit 009f3b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renesas/Servo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ int Servo::read()
245245
{
246246
if (servoIndex != SERVO_INVALID_INDEX) {
247247
ra_servo_t *servo = &ra_servos[servoIndex];
248-
return map(servo->period_us, servo->period_min, servo->period_max, 0, 180);
248+
return map(servo->period_us + 1, servo->period_min, servo->period_max, 0, 180);
249249
}
250250
return 0;
251251
}

0 commit comments

Comments
 (0)