mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 07:17:35 +08:00
ekf2checks: split GPS checks from AHRS checks - minor cleanup
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
committed by
Beat Küng
parent
78dff6adcb
commit
c2154df2f6
@@ -230,7 +230,7 @@ int Commander::custom_command(int argc, char *argv[])
|
||||
vehicle_status_flags_sub.copy(&vehicle_status_flags);
|
||||
|
||||
bool preflight_check_res = PreFlightCheck::preflightCheck(nullptr, vehicle_status, vehicle_status_flags, true, true,
|
||||
true, 30_s);
|
||||
30_s);
|
||||
PX4_INFO("Preflight check: %s", preflight_check_res ? "OK" : "FAILED");
|
||||
|
||||
bool prearm_check_res = PreFlightCheck::preArmCheck(nullptr, vehicle_status_flags, safety_s{},
|
||||
@@ -1522,7 +1522,7 @@ Commander::run()
|
||||
arm_auth_init(&_mavlink_log_pub, &_status.system_id);
|
||||
|
||||
// run preflight immediately to find all relevant parameters, but don't report
|
||||
PreFlightCheck::preflightCheck(&_mavlink_log_pub, _status, _status_flags, _arm_requirements.global_position, false,
|
||||
PreFlightCheck::preflightCheck(&_mavlink_log_pub, _status, _status_flags, false,
|
||||
true,
|
||||
hrt_elapsed_time(&_boot_timestamp));
|
||||
|
||||
@@ -2615,7 +2615,7 @@ Commander::run()
|
||||
|
||||
// Evaluate current prearm status
|
||||
if (!_armed.armed && !_status_flags.condition_calibration_enabled) {
|
||||
bool preflight_check_res = PreFlightCheck::preflightCheck(nullptr, _status, _status_flags, true, false, true, 30_s);
|
||||
bool preflight_check_res = PreFlightCheck::preflightCheck(nullptr, _status, _status_flags, false, true, 30_s);
|
||||
|
||||
// skip arm authorization check until actual arming attempt
|
||||
PreFlightCheck::arm_requirements_t arm_req = _arm_requirements;
|
||||
@@ -3711,8 +3711,8 @@ void Commander::data_link_check()
|
||||
|
||||
if (!_armed.armed && !_status_flags.condition_calibration_enabled) {
|
||||
// make sure to report preflight check failures to a connecting GCS
|
||||
PreFlightCheck::preflightCheck(&_mavlink_log_pub, _status, _status_flags,
|
||||
_arm_requirements.global_position, true, true, hrt_elapsed_time(&_boot_timestamp));
|
||||
PreFlightCheck::preflightCheck(&_mavlink_log_pub, _status, _status_flags, true, true,
|
||||
hrt_elapsed_time(&_boot_timestamp));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user