Merge pull request #17089 from garfieldG/pr-safety_switch_status

send safety switch status to ground
This commit is contained in:
garfieldG
2021-03-17 06:23:31 +02:00
committed by GitHub
parent 5ad8ed6994
commit e9725a5fa7
+3
View File
@@ -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) {