mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
manual_control: don't switch gear on first init
This will ignore the first transition from NONE to something. This matches the behaviour that existed before.
This commit is contained in:
committed by
Matthias Grob
parent
60de330f18
commit
cfdb53a4d8
@@ -230,7 +230,8 @@ void ManualControl::Run()
|
||||
}
|
||||
}
|
||||
|
||||
if (switches.gear_switch != _previous_switches.gear_switch) {
|
||||
if (switches.gear_switch != _previous_switches.gear_switch
|
||||
&& _previous_switches.gear_switch != manual_control_switches_s::SWITCH_POS_NONE) {
|
||||
|
||||
if (switches.gear_switch == manual_control_switches_s::SWITCH_POS_ON) {
|
||||
publish_landing_gear(landing_gear_s::GEAR_UP);
|
||||
|
||||
Reference in New Issue
Block a user