Skip to content
Snippets Groups Projects
Commit 43fb84a6 authored by Matthias Grob's avatar Matthias Grob Committed by Dennis Mannhart
Browse files

mc_pos_control: make sure task gets started after idle delay

parent dc5f18bd
No related branches found
No related tags found
No related merge requests found
......@@ -649,18 +649,17 @@ MulticopterPositionControl::run()
_wv_controller->update(matrix::Quatf(_att_sp.q_d), _states.yaw);
}
if (_control_mode.flag_armed) {
// arm hysteresis prevents vehicle to takeoff
// before propeller reached idle speed.
_arm_hysteresis.set_state_and_update(_control_mode.flag_armed);
if (_arm_hysteresis.get_state()) {
// as soon vehicle is armed check for flighttask
start_flight_task();
// arm hysteresis prevents vehicle to takeoff
// before propeller reached idle speed.
_arm_hysteresis.set_state_and_update(true);
} else {
// disable flighttask
_flight_tasks.switchTask(FlightTaskIndex::None);
// reset arm hysteresis
_arm_hysteresis.set_state_and_update(false);
}
// check if any task is active
......
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