mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
flight_tasks: pass previous setpoint as const reference
- perform setpoint checks in place to simplify and avoid copy
This commit is contained in:
@@ -61,7 +61,7 @@ bool FlightTaskManualAltitude::updateInitialize()
|
||||
return ret && PX4_ISFINITE(_position(2)) && PX4_ISFINITE(_velocity(2)) && PX4_ISFINITE(_yaw);
|
||||
}
|
||||
|
||||
bool FlightTaskManualAltitude::activate(vehicle_local_position_setpoint_s last_setpoint)
|
||||
bool FlightTaskManualAltitude::activate(const vehicle_local_position_setpoint_s &last_setpoint)
|
||||
{
|
||||
bool ret = FlightTask::activate(last_setpoint);
|
||||
_yaw_setpoint = NAN;
|
||||
|
||||
Reference in New Issue
Block a user