mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 09:47:34 +08:00
Merge pull request #17089 from garfieldG/pr-safety_switch_status
send safety switch status to ground
This commit is contained in:
@@ -1746,6 +1746,9 @@ Commander::run()
|
||||
const bool previous_safety_off = _safety.safety_off;
|
||||
|
||||
if (_safety_sub.copy(&_safety)) {
|
||||
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_MOTORCONTROL, _safety.safety_switch_available, _safety.safety_off,
|
||||
_safety.safety_switch_available, _status);
|
||||
|
||||
// disarm if safety is now on and still armed
|
||||
if (_armed.armed && _safety.safety_switch_available && !_safety.safety_off) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user