Mavlink: wait for boot complete before sending or receiving anything

This commit is contained in:
Daniel Agar
2019-09-18 09:07:55 -04:00
committed by GitHub
parent be61d93d64
commit 494f35d5f4
3 changed files with 17 additions and 19 deletions
+1 -6
View File
@@ -415,7 +415,7 @@ MavlinkParametersManager::send_uavcan()
bool
MavlinkParametersManager::send_one()
{
if (_send_all_index >= 0 && _mavlink->boot_complete()) {
if (_send_all_index >= 0) {
/* send all parameters if requested, but only after the system has booted */
/* The first thing we send is a hash of all values for the ground
@@ -461,11 +461,6 @@ MavlinkParametersManager::send_one()
} else {
return true;
}
} else if (_send_all_index == PARAM_HASH && hrt_absolute_time() > 20 * 1000 * 1000) {
/* the boot did not seem to ever complete, warn user and set boot complete */
_mavlink->send_statustext_critical("WARNING: SYSTEM BOOT INCOMPLETE. CHECK CONFIG.");
_mavlink->set_boot_complete();
}
return false;