mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 16:30:34 +08:00
px4iofirmware: added scale parameters for roll, pitch and yaw
since pure manual control for fixed wings in handled on the io side the scale parameters for roll, pitch and yaw had to be introduced there as well. Signed-off-by: Roman <bapstr@ethz.ch>
This commit is contained in:
@@ -373,15 +373,15 @@ mixer_callback(uintptr_t handle,
|
||||
if (source == MIX_OVERRIDE || source == MIX_OVERRIDE_FMU_OK) {
|
||||
if (control_group == actuator_controls_s::GROUP_INDEX_ATTITUDE &&
|
||||
control_index == actuator_controls_s::INDEX_ROLL) {
|
||||
control += REG_TO_FLOAT(r_setup_trim_roll);
|
||||
control *= REG_TO_FLOAT(r_setup_scale_roll) + REG_TO_FLOAT(r_setup_trim_roll);
|
||||
|
||||
} else if (control_group == actuator_controls_s::GROUP_INDEX_ATTITUDE &&
|
||||
control_index == actuator_controls_s::INDEX_PITCH) {
|
||||
control += REG_TO_FLOAT(r_setup_trim_pitch);
|
||||
control *= REG_TO_FLOAT(r_setup_scale_pitch) + REG_TO_FLOAT(r_setup_trim_pitch);
|
||||
|
||||
} else if (control_group == actuator_controls_s::GROUP_INDEX_ATTITUDE &&
|
||||
control_index == actuator_controls_s::INDEX_YAW) {
|
||||
control += REG_TO_FLOAT(r_setup_trim_yaw);
|
||||
control *= REG_TO_FLOAT(r_setup_scale_yaw) + REG_TO_FLOAT(r_setup_trim_yaw);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user