mirror of https://github.com/ArduPilot/ardupilot
Tracker: only run servo updates when safety is off
Largely removes the sudden jerk that occurs when the user pushes the safety switch
This commit is contained in:
parent
9d4107f1fc
commit
32d8e5c8d4
|
@ -82,6 +82,11 @@ static void update_tracking(void)
|
|||
return;
|
||||
}
|
||||
|
||||
// do not perform updates if safety switch is disarmed (i.e. servos can't be moved)
|
||||
if (hal.util->safety_switch_state() == AP_HAL::Util::SAFETY_DISARMED) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (control_mode) {
|
||||
case AUTO:
|
||||
update_auto();
|
||||
|
|
Loading…
Reference in New Issue