diff --git a/ArduPlane/Attitude.cpp b/ArduPlane/Attitude.cpp index a3926cf061e944..a06e25a7036ce8 100644 --- a/ArduPlane/Attitude.cpp +++ b/ArduPlane/Attitude.cpp @@ -209,7 +209,7 @@ float Plane::stabilize_pitch_get_pitch_out() const bool quadplane_in_transition = false; #endif - int32_t demanded_pitch = nav_pitch_cd + uint32_t(aparm.pitch_trim * 100) + SRV_Channels::get_output_scaled(SRV_Channel::k_throttle) * g.kff_throttle_to_pitch; + int32_t demanded_pitch = nav_pitch_cd + int32_t(aparm.pitch_trim * 100.0) + SRV_Channels::get_output_scaled(SRV_Channel::k_throttle) * g.kff_throttle_to_pitch; bool disable_integrator = false; if (control_mode == &mode_stabilize && channel_pitch->get_control_in() != 0) { disable_integrator = true;