mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_Arming: remove intermediate method check_severity
this was using an undeclared dependency on GCS_MAVLINK.h
This commit is contained in:
parent
1b13dd053b
commit
a4186f6884
@ -202,14 +202,6 @@ bool AP_Arming::check_enabled(const enum AP_Arming::ArmingChecks check) const
|
||||
return (checks_to_perform & check);
|
||||
}
|
||||
|
||||
MAV_SEVERITY AP_Arming::check_severity(const enum AP_Arming::ArmingChecks check) const
|
||||
{
|
||||
if (check_enabled(check)) {
|
||||
return MAV_SEVERITY_CRITICAL;
|
||||
}
|
||||
return MAV_SEVERITY_DEBUG; // technically should be NOTICE, but will annoy users at that level
|
||||
}
|
||||
|
||||
void AP_Arming::check_failed(const enum AP_Arming::ArmingChecks check, bool report, const char *fmt, ...) const
|
||||
{
|
||||
if (!report) {
|
||||
@ -226,7 +218,11 @@ void AP_Arming::check_failed(const enum AP_Arming::ArmingChecks check, bool repo
|
||||
}
|
||||
hal.util->snprintf(taggedfmt, sizeof(taggedfmt), metafmt, fmt);
|
||||
|
||||
MAV_SEVERITY severity = check_severity(check);
|
||||
MAV_SEVERITY severity = MAV_SEVERITY_CRITICAL;
|
||||
if (!check_enabled(check)) {
|
||||
// technically should be NOTICE, but will annoy users at that level:
|
||||
severity = MAV_SEVERITY_DEBUG;
|
||||
}
|
||||
va_list arg_list;
|
||||
va_start(arg_list, fmt);
|
||||
gcs().send_textv(severity, taggedfmt, arg_list);
|
||||
|
@ -221,8 +221,6 @@ protected:
|
||||
|
||||
// returns true if a particular check is enabled
|
||||
bool check_enabled(const enum AP_Arming::ArmingChecks check) const;
|
||||
// returns a mavlink severity which should be used if a specific check fails
|
||||
MAV_SEVERITY check_severity(const enum AP_Arming::ArmingChecks check) const;
|
||||
// handle the case where a check fails
|
||||
void check_failed(const enum AP_Arming::ArmingChecks check, bool report, const char *fmt, ...) const FMT_PRINTF(4, 5);
|
||||
void check_failed(bool report, const char *fmt, ...) const FMT_PRINTF(3, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user