mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 07:31:35 +08:00
FlightTasks: remove updateFinalize() concept because it got obsolete
This commit is contained in:
committed by
Daniel Agar
parent
9eac0edbc0
commit
35d4986ea7
@@ -456,7 +456,7 @@ void FlightModeManager::generateTrajectorySetpoint(const float dt,
|
|||||||
vehicle_local_position_setpoint_s setpoint = FlightTask::empty_setpoint;
|
vehicle_local_position_setpoint_s setpoint = FlightTask::empty_setpoint;
|
||||||
vehicle_constraints_s constraints = FlightTask::empty_constraints;
|
vehicle_constraints_s constraints = FlightTask::empty_constraints;
|
||||||
|
|
||||||
if (_current_task.task->updateInitialize() && _current_task.task->update() && _current_task.task->updateFinalize()) {
|
if (_current_task.task->updateInitialize() && _current_task.task->update()) {
|
||||||
// setpoints and constraints for the position controller from flighttask
|
// setpoints and constraints for the position controller from flighttask
|
||||||
setpoint = _current_task.task->getPositionSetpoint();
|
setpoint = _current_task.task->getPositionSetpoint();
|
||||||
constraints = _current_task.task->getConstraints();
|
constraints = _current_task.task->getConstraints();
|
||||||
|
|||||||
@@ -214,17 +214,13 @@ bool FlightTaskAuto::update()
|
|||||||
// update previous type
|
// update previous type
|
||||||
_type_previous = _type;
|
_type_previous = _type;
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FlightTaskAuto::updateFinalize()
|
|
||||||
{
|
|
||||||
// All the auto FlightTasks have to comply with defined maximum yaw rate
|
|
||||||
// If the FlightTask generates a yaw or a yawrate setpoint that exceeds this value
|
// If the FlightTask generates a yaw or a yawrate setpoint that exceeds this value
|
||||||
// it will see its setpoint constrained here
|
// it will see its setpoint constrained here
|
||||||
_limitYawRate();
|
_limitYawRate();
|
||||||
|
|
||||||
_constraints.want_takeoff = _checkTakeoff();
|
_constraints.want_takeoff = _checkTakeoff();
|
||||||
return true;
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlightTaskAuto::_prepareLandSetpoints()
|
void FlightTaskAuto::_prepareLandSetpoints()
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ public:
|
|||||||
void reActivate() override;
|
void reActivate() override;
|
||||||
bool updateInitialize() override;
|
bool updateInitialize() override;
|
||||||
bool update() override;
|
bool update() override;
|
||||||
bool updateFinalize() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an external yaw handler which can be used to implement a different yaw control strategy.
|
* Sets an external yaw handler which can be used to implement a different yaw control strategy.
|
||||||
|
|||||||
@@ -108,14 +108,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool update();
|
virtual bool update();
|
||||||
|
|
||||||
/**
|
|
||||||
* Call after update()
|
|
||||||
* to constrain the generated setpoints in order to comply
|
|
||||||
* with the constraints of the current mode
|
|
||||||
* @return true on success, false on error
|
|
||||||
*/
|
|
||||||
virtual bool updateFinalize() { return true; };
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the output data
|
* Get the output data
|
||||||
* @return task output setpoints that get executed by the positon controller
|
* @return task output setpoints that get executed by the positon controller
|
||||||
|
|||||||
Reference in New Issue
Block a user