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:
@@ -10,7 +10,7 @@ const ekf_reset_counters_s FlightTask::zero_reset_counters = {};
|
||||
const vehicle_constraints_s FlightTask::empty_constraints = {0, NAN, NAN, NAN, NAN, NAN, NAN, NAN, false, {}};
|
||||
const landing_gear_s FlightTask::empty_landing_gear_default_keep = {0, landing_gear_s::GEAR_KEEP, {}};
|
||||
|
||||
bool FlightTask::activate(vehicle_local_position_setpoint_s last_setpoint)
|
||||
bool FlightTask::activate(const vehicle_local_position_setpoint_s &last_setpoint)
|
||||
{
|
||||
_resetSetpoints();
|
||||
_setDefaultConstraints();
|
||||
|
||||
Reference in New Issue
Block a user