gimbal: output RC fix actuator_controls_2 -> gimbal_controls regression (#21460)

- small typo introduced in https://github.com/PX4/PX4-Autopilot/pull/20837
This commit is contained in:
Daniel Agar 2023-04-11 16:03:42 -04:00 committed by GitHub
parent 958c202137
commit 1234aae3df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -67,11 +67,11 @@ void OutputRC::update(const ControlData &control_data, bool new_setpoints)
(_angle_outputs[0] + math::radians(_parameters.mnt_off_roll)) *
(1.0f / (math::radians(_parameters.mnt_range_roll / 2.0f))),
-1.f, 1.f);
gimbal_controls.control[gimbal_controls_s::INDEX_ROLL] = constrain(
gimbal_controls.control[gimbal_controls_s::INDEX_PITCH] = constrain(
(_angle_outputs[1] + math::radians(_parameters.mnt_off_pitch)) *
(1.0f / (math::radians(_parameters.mnt_range_pitch / 2.0f))),
-1.f, 1.f);
gimbal_controls.control[gimbal_controls_s::INDEX_ROLL] = constrain(
gimbal_controls.control[gimbal_controls_s::INDEX_YAW] = constrain(
(_angle_outputs[2] + math::radians(_parameters.mnt_off_yaw)) *
(1.0f / (math::radians(_parameters.mnt_range_yaw / 2.0f))),
-1.f, 1.f);