mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 02:10:34 +08:00
OFFBOARD mode architecture overhaul (#16739)
- handle SET_POSITION_TARGET_LOCAL_NED and SET_POSITION_TARGET_GLOBAL_INT with ORB_ID(trajectory_setpoint) - FlightTaskOffboard not needed at all - bypass position_setpoint_triplet entirely (start removing extraneous fields) - simplify offboard_control_mode to map to supported control modes
This commit is contained in:
@@ -212,9 +212,9 @@ MulticopterRateControl::Run()
|
||||
vehicle_rates_setpoint_s v_rates_sp;
|
||||
|
||||
if (_v_rates_sp_sub.update(&v_rates_sp)) {
|
||||
_rates_sp(0) = v_rates_sp.roll;
|
||||
_rates_sp(1) = v_rates_sp.pitch;
|
||||
_rates_sp(2) = v_rates_sp.yaw;
|
||||
_rates_sp(0) = PX4_ISFINITE(v_rates_sp.roll) ? v_rates_sp.roll : rates(0);
|
||||
_rates_sp(1) = PX4_ISFINITE(v_rates_sp.pitch) ? v_rates_sp.pitch : rates(1);
|
||||
_rates_sp(2) = PX4_ISFINITE(v_rates_sp.yaw) ? v_rates_sp.yaw : rates(2);
|
||||
_thrust_sp = -v_rates_sp.thrust_body[2];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user