mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Auto Traj - Disable reActivate "reset" function for AutoLineSmoothVel Flight Task
This commit is contained in:
parent
0209fa00bf
commit
2c63388fb7
@ -133,7 +133,7 @@ const char *FlightTasks::errorToString(const int error)
|
||||
void FlightTasks::reActivate()
|
||||
{
|
||||
if (_current_task.task) {
|
||||
_current_task.task->activate();
|
||||
_current_task.task->reActivate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +52,14 @@ bool FlightTaskAutoLineSmoothVel::activate()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void FlightTaskAutoLineSmoothVel::reActivate()
|
||||
{
|
||||
// Don't reset during takeoff TODO: Find a proper solution
|
||||
// The issue here is that with a small increment of velocity setpoint (generated by this flight task), the
|
||||
// land detector doesn't detect takeoff and without takeoff detection, the
|
||||
// flight task is always reset.
|
||||
}
|
||||
|
||||
void FlightTaskAutoLineSmoothVel::_setDefaultConstraints()
|
||||
{
|
||||
FlightTaskAuto::_setDefaultConstraints();
|
||||
|
||||
@ -50,6 +50,7 @@ public:
|
||||
virtual ~FlightTaskAutoLineSmoothVel() = default;
|
||||
|
||||
bool activate() override;
|
||||
void reActivate() override;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@ -38,6 +38,11 @@ bool FlightTask::activate()
|
||||
return true;
|
||||
}
|
||||
|
||||
void FlightTask::reActivate()
|
||||
{
|
||||
activate();
|
||||
}
|
||||
|
||||
bool FlightTask::updateInitialize()
|
||||
{
|
||||
_time_stamp_current = hrt_absolute_time();
|
||||
|
||||
@ -78,6 +78,11 @@ public:
|
||||
*/
|
||||
virtual bool activate();
|
||||
|
||||
/**
|
||||
* Call this to reset an active Flight Task
|
||||
*/
|
||||
virtual void reActivate();
|
||||
|
||||
/**
|
||||
* To be called to adopt parameters from an arrived vehicle command
|
||||
* @return true if accepted, false if declined
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user