mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 12:40:35 +08:00
FailureDetector: simplify updated/changed check
This commit is contained in:
@@ -2235,12 +2235,8 @@ Commander::run()
|
||||
|
||||
/* Check for failure detector status */
|
||||
if (_failure_detector.update(status)) {
|
||||
const uint8_t failure_status = _failure_detector.getStatus();
|
||||
|
||||
if (failure_status != status.failure_detector_status) {
|
||||
status.failure_detector_status = failure_status;
|
||||
_status_changed = true;
|
||||
}
|
||||
status.failure_detector_status = _failure_detector.getStatus();
|
||||
_status_changed = true;
|
||||
|
||||
if (armed.armed && _failure_detector.isFailure()) {
|
||||
const hrt_abstime time_at_arm = armed.armed_time_ms * 1000;
|
||||
|
||||
Reference in New Issue
Block a user