mc_pos_control_main: fix comment and remove line that is not used

This commit is contained in:
Dennis Mannhart 2018-08-24 16:01:15 +02:00 committed by ChristophTobler
parent a24fdb93c3
commit e2e8d6d135

View File

@ -160,7 +160,7 @@ private:
static constexpr uint64_t TRAJECTORY_STREAM_TIMEOUT_US = 500000;
/**< number of tries before switching to a failsafe flight task */
static constexpr int NUM_FAILURE_TRIES = 10;
/**< If Flighttask fails, keep 1s the current setpoint before going into failsafe land */
/**< If Flighttask fails, keep 0.2 seconds the current setpoint before going into failsafe land */
static constexpr uint64_t LOITER_TIME_BEFORE_DESCEND = 200000;
@ -885,15 +885,12 @@ MulticopterPositionControl::start_flight_task()
// for some reason no flighttask was able to start.
// go into failsafe flighttask
int error = _flight_tasks.switchTask(FlightTaskIndex::Failsafe);
task_failure = false;
if (error != 0) {
// No task was activated.
_flight_tasks.switchTask(FlightTaskIndex::None);
}
}
}
void