mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 18:34:07 +08:00
Failsafe - cosmetic changes
This commit is contained in:
parent
776b1a28de
commit
96da46d1aa
@ -1024,8 +1024,7 @@ PX4IO::task_main()
|
||||
}
|
||||
|
||||
/* Check if the IO safety circuit breaker has been updated */
|
||||
bool circuit_breaker_io_safety_enabled;
|
||||
circuit_breaker_io_safety_enabled = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);
|
||||
bool circuit_breaker_io_safety_enabled = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);
|
||||
/* Bypass IO safety switch logic by setting FORCE_SAFETY_OFF */
|
||||
(void)io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_OFF, circuit_breaker_io_safety_enabled);
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ PARAM_DEFINE_INT32(CBRK_AIRSPD_CHK, 0);
|
||||
*
|
||||
* Setting this parameter to 121212 will disable the flight termination action if triggered
|
||||
* by the FailureDetector logic or if FMU is lost.
|
||||
* WARNING: ENABLING THIS CIRCUIT BREAKER IS AT OWN RISK
|
||||
* This circuit breaker does not affect the RC loss, data link loss and geofence safety logic.
|
||||
*
|
||||
* @reboot_required true
|
||||
* @min 0
|
||||
|
||||
@ -690,15 +690,15 @@ static bool failureDetectorCheck(orb_advert_t *mavlink_log_pub, const vehicle_st
|
||||
|
||||
if (report_fail) {
|
||||
if (status.failure_detector_status & vehicle_status_s::FAILURE_ROLL) {
|
||||
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: Roll failure detected");
|
||||
mavlink_log_critical(mavlink_log_pub, "Preflight Fail: Roll failure detected");
|
||||
}
|
||||
|
||||
if (status.failure_detector_status & vehicle_status_s::FAILURE_PITCH) {
|
||||
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: Pitch failure detected");
|
||||
mavlink_log_critical(mavlink_log_pub, "Preflight Fail: Pitch failure detected");
|
||||
}
|
||||
|
||||
if (status.failure_detector_status & vehicle_status_s::FAILURE_ALT) {
|
||||
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: Altitude failure detected");
|
||||
mavlink_log_critical(mavlink_log_pub, "Preflight Fail: Altitude failure detected");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public:
|
||||
bool update();
|
||||
|
||||
uint8_t getStatus() const { return _status; }
|
||||
bool isFailure() const { return (_status == FAILURE_NONE) ? false : true; }
|
||||
bool isFailure() const { return _status != FAILURE_NONE; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user