mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Commander: indicate failsafe reasons more clearly
This commit is contained in:
parent
10ebac2026
commit
08cf97c687
@ -3018,10 +3018,10 @@ int commander_thread_main(int argc, char *argv[])
|
||||
status_changed = true;
|
||||
|
||||
if (status.failsafe) {
|
||||
mavlink_log_critical(&mavlink_log_pub, "failsafe mode on");
|
||||
mavlink_log_info(&mavlink_log_pub, "Failsafe mode enabled");
|
||||
|
||||
} else {
|
||||
mavlink_log_critical(&mavlink_log_pub, "failsafe mode off");
|
||||
mavlink_log_info(&mavlink_log_pub, "Failsafe mode disabled");
|
||||
}
|
||||
|
||||
failsafe_old = status.failsafe;
|
||||
|
||||
@ -526,7 +526,7 @@ void enable_failsafe(struct vehicle_status_s *status, bool old_failsafe, orb_adv
|
||||
const char *reason)
|
||||
{
|
||||
if (!old_failsafe) {
|
||||
mavlink_and_console_log_info(mavlink_log_pub, reason);
|
||||
mavlink_log_critical(mavlink_log_pub, "Failsafe enabled: %s", reason);
|
||||
}
|
||||
|
||||
status->failsafe = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user