mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:33:34 +08:00
navigator: add failure enum
This commit is contained in:
committed by
Mathieu Bresciani
parent
25fcb3c913
commit
4ed3e9e210
@@ -42,6 +42,17 @@ void NavigatorChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
}
|
||||
|
||||
if (context.status().nav_state == status.nav_state) {
|
||||
reporter.failsafeFlags().navigator_failure = status.failure;
|
||||
|
||||
reporter.failsafeFlags().navigator_failure = (status.failure != navigator_status_s::FAILURE_NONE);
|
||||
|
||||
if (status.failure == navigator_status_s::FAILURE_HAGL) {
|
||||
/* EVENT
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All,
|
||||
health_component_t::system,
|
||||
events::ID("check_navigator_failure_hagl"),
|
||||
events::Log::Error,
|
||||
"Waypoint above maximum height");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user