mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 00:37:34 +08:00
FailureDetector: remove obsolete bit switch checks
This commit is contained in:
@@ -177,16 +177,13 @@ void FailureDetector::updateEscsStatus(const vehicle_status_s &vehicle_status)
|
||||
_esc_failure_hysteresis.set_hysteresis_time_from(false, 300_ms);
|
||||
_esc_failure_hysteresis.set_state_and_update(all_escs_armed != esc_status.esc_armed_flags, time_now);
|
||||
|
||||
if (_esc_failure_hysteresis.get_state() && !(_status & FAILURE_ARM_ESCS)) {
|
||||
if (_esc_failure_hysteresis.get_state()) {
|
||||
_status |= FAILURE_ARM_ESCS;
|
||||
}
|
||||
|
||||
} else {
|
||||
// reset ESC bitfield
|
||||
_esc_failure_hysteresis.set_state_and_update(false, time_now);
|
||||
|
||||
if (_status & FAILURE_ARM_ESCS) {
|
||||
_status &= ~FAILURE_ARM_ESCS;
|
||||
}
|
||||
_status &= ~FAILURE_ARM_ESCS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user