Commit a3920b00 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4687 from DonLakeFlyer/ArduPilotWierdness

Handle ArduPilot param behavior
parents 5949ff7a d2861027
......@@ -75,7 +75,7 @@ ParameterManager::ParameterManager(Vehicle* vehicle)
connect(&_initialRequestTimeoutTimer, &QTimer::timeout, this, &ParameterManager::_initialRequestTimeout);
_waitingParamTimeoutTimer.setSingleShot(true);
_waitingParamTimeoutTimer.setInterval(3000);
_waitingParamTimeoutTimer.setInterval(30000);
connect(&_waitingParamTimeoutTimer, &QTimer::timeout, this, &ParameterManager::_waitingParamTimeout);
connect(_vehicle->uas(), &UASInterface::parameterUpdate, this, &ParameterManager::_parameterUpdate);
......@@ -107,6 +107,13 @@ void ParameterManager::_parameterUpdate(int vehicleId, int componentId, QString
"value:" << value <<
")";
// ArduPilot has this strange behavior of streaming parameters that we didn't ask for. This even happens before it responds to the
// PARAM_REQUEST_LIST. We disregard any of this until the initial request is responded to.
if (parameterId == 65535 && _initialRequestTimeoutTimer.isActive()) {
qCDebug(ParameterManagerVerbose1Log) << "Disregarding unrequested param prior to intial list response" << parameterName;
return;
}
_initialRequestTimeoutTimer.stop();
#if 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment