mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 05:10:36 +08:00
Style refactoring related to safety button
This commit is contained in:
committed by
Igor Mišić
parent
ce70b6f4ac
commit
44c4b8fa85
@@ -2298,12 +2298,11 @@ Commander::run()
|
||||
}
|
||||
|
||||
/* safety button */
|
||||
bool safety_updated = _safety.safetyButtonHandler();
|
||||
const bool safety_changed = _safety.safetyButtonHandler();
|
||||
_vehicle_status.safety_button_available = _safety.isButtonAvailable();
|
||||
_vehicle_status.safety_off = _safety.isSafetyOff();
|
||||
|
||||
if (safety_updated) {
|
||||
|
||||
if (safety_changed) {
|
||||
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_MOTORCONTROL, _safety.isButtonAvailable(), _safety.isSafetyOff(),
|
||||
_safety.isButtonAvailable(), _vehicle_status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user