FlightTask: introduce method for limits and adjust accordingly for all the tasks

This commit is contained in:
Dennis Mannhart
2018-04-18 11:20:51 +02:00
committed by Lorenz Meier
parent 73b4f452cc
commit 97be84b0e4
11 changed files with 111 additions and 73 deletions
+8
View File
@@ -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();
}