mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 13:00:36 +08:00
FlightTasks: replace setpoint setters with members
I realized that instead of using the setpoint setters inline in real world tasks everyone started to have its own setpoint member variable and only call the setter in the end for all the privatly generate setpoints. This makes the setter useless and therefore I switched to member setpoints in the architecture. They bring more felxibility which is obviously needed but also less structure which is the price to pay.
This commit is contained in:
@@ -15,7 +15,7 @@ bool FlightTasks::update()
|
||||
return false;
|
||||
}
|
||||
|
||||
const vehicle_local_position_setpoint_s &FlightTasks::getPositionSetpoint()
|
||||
const vehicle_local_position_setpoint_s FlightTasks::getPositionSetpoint()
|
||||
{
|
||||
if (isAnyTaskActive()) {
|
||||
return _current_task->getPositionSetpoint();
|
||||
|
||||
Reference in New Issue
Block a user