forked from Archive/PX4-Autopilot
commander/safety: set early safety_button_available
This commit is contained in:
parent
f6bdc42977
commit
cdfa65d792
|
@ -56,10 +56,13 @@ void Safety::safetyButtonHandler()
|
|||
|
||||
} else {
|
||||
|
||||
if (!_safety.safety_switch_available && _safety_button_sub.advertised()) {
|
||||
_safety.safety_switch_available = true;
|
||||
}
|
||||
|
||||
button_event_s button_event;
|
||||
|
||||
while (_safety_button_sub.update(&button_event)) {
|
||||
_safety.safety_switch_available = true;
|
||||
_safety.safety_off |= button_event.triggered; // triggered safety button activates safety off
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue