commander: pass in correct time since boot

This fixes the case where the preflight check fail right after the start
and report "sensors unstable".
This commit is contained in:
Julian Oes 2021-03-17 16:36:17 +01:00 committed by Daniel Agar
parent 19533377b3
commit 2f024a9a8a
1 changed files with 2 additions and 1 deletions

View File

@ -2479,7 +2479,8 @@ Commander::run()
// Evaluate current prearm status
if (!_armed.armed && !_status_flags.condition_calibration_enabled) {
bool preflight_check_res = PreFlightCheck::preflightCheck(nullptr, _status, _status_flags, false, true, 30_s);
bool preflight_check_res = PreFlightCheck::preflightCheck(nullptr, _status, _status_flags, false, true,
hrt_elapsed_time(&_boot_timestamp));
// skip arm authorization check until actual arming attempt
PreFlightCheck::arm_requirements_t arm_req = _arm_requirements;