diff --git a/AntennaTracker/servos.pde b/AntennaTracker/servos.pde index d5d8f12f4a..ef77bceec1 100644 --- a/AntennaTracker/servos.pde +++ b/AntennaTracker/servos.pde @@ -52,7 +52,7 @@ static void update_pitch_position_servo(float pitch) // pitch argument is -90 to 90, where 0 is horizontal // servo_out is in 100ths of a degree float ahrs_pitch = ahrs.pitch_sensor*0.01f; - int32_t angle_err = -(ahrs_pitch - pitch) * 100.0; + int32_t angle_err = -(ahrs_pitch - pitch) * 100.0f; int32_t pitch_limit_cd = g.pitch_range*100/2; // Need to configure your servo so that increasing servo_out causes increase in pitch/elevation (ie pointing higher into the sky, // above the horizon. On my antenna tracker this requires the pitch/elevation servo to be reversed