mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 17:40:34 +08:00
FlightTask: introduce method for limits and adjust accordingly for all the tasks
This commit is contained in:
committed by
Lorenz Meier
parent
73b4f452cc
commit
97be84b0e4
@@ -17,6 +17,7 @@ bool FlightTask::initializeSubscriptions(SubscriptionArray &subscription_array)
|
||||
bool FlightTask::activate()
|
||||
{
|
||||
_resetSetpoints();
|
||||
_updateSetpointLimits();
|
||||
_time_stamp_activate = hrt_absolute_time();
|
||||
return true;
|
||||
}
|
||||
@@ -72,3 +73,10 @@ bool FlightTask::_evaluateVehicleLocalPosition()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void FlightTask::_updateSetpointLimits()
|
||||
{
|
||||
_limits.speed_NE_max = MPC_XY_VEL_MAX.get();
|
||||
_limits.speed_up_max = MPC_Z_VEL_MAX_UP.get();
|
||||
_limits.speed_dn_max = MPC_Z_VEL_MAX_DN.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user