mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 02:11:35 +08:00
FlightTaskManualAlt/Position/Sport: replace limits with constraint member structure
This commit is contained in:
committed by
Lorenz Meier
parent
6f704bd1e4
commit
9e740f1aff
@@ -52,12 +52,13 @@ public:
|
||||
|
||||
virtual ~FlightTaskSport() = default;
|
||||
|
||||
protected:
|
||||
void _updateSetpointLimits() override
|
||||
bool activate() override
|
||||
{
|
||||
FlightTaskManualPosition::_updateSetpointLimits();
|
||||
bool ret = FlightTaskManualPosition::activate();
|
||||
|
||||
// for sport mode we just increase horizontal speed to maximum speed
|
||||
_limits.speed_NE_max = MPC_XY_VEL_MAX.get();
|
||||
// default constraints already are the maximum allowed limits
|
||||
_setDefaultConstraints();
|
||||
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user