⚒️ Enables bigger range of motion for servo controller
This commit is contained in:
@@ -103,7 +103,7 @@ class ServoController : public StatefulService<ServoSettings> {
|
|||||||
auto &servo = state().servos[i];
|
auto &servo = state().servos[i];
|
||||||
float angle = servo.direction * angles[i] + servo.centerAngle;
|
float angle = servo.direction * angles[i] + servo.centerAngle;
|
||||||
uint16_t pwm = angle * servo.conversion + servo.centerPwm;
|
uint16_t pwm = angle * servo.conversion + servo.centerPwm;
|
||||||
if (pwm < 125 || pwm > 600) {
|
if (pwm < 105 || pwm > 600) {
|
||||||
ESP_LOGE("ServoController", "Servo %d, Invalid PWM value %d", i, pwm);
|
ESP_LOGE("ServoController", "Servo %d, Invalid PWM value %d", i, pwm);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user