mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-09 10:31:35 +08:00
mavlink: fix boot complete without lockstep
Without lockstep the actual monotonic clock of the host computer is used. Therefore, this time is likely much more than 20 seconds and the check if the boot complete happened in time will fail immediately. Therefore, it probably makes more sense to count the time from the first mavlink creation.
This commit is contained in:
@@ -2529,7 +2529,7 @@ MavlinkReceiver::Run()
|
||||
|
||||
// make sure mavlink app has booted before we start processing anything (parameter sync, etc)
|
||||
while (!_mavlink->boot_complete()) {
|
||||
if (hrt_absolute_time() > 20_s) {
|
||||
if (hrt_elapsed_time(&_mavlink->get_first_start_time()) > 20_s) {
|
||||
PX4_ERR("system boot did not complete in 20 seconds");
|
||||
_mavlink->set_boot_complete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user