Skip to content
Snippets Groups Projects
Commit 2c63388f authored by bresch's avatar bresch Committed by Roman Bapst
Browse files

Auto Traj - Disable reActivate "reset" function for AutoLineSmoothVel Flight Task

parent 0209fa00
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment