Commit dec4ee1f authored by Gus Grubba's avatar Gus Grubba

Postpone parameter updates for a bit.

parent d9baef94
......@@ -984,9 +984,24 @@ QGCCameraControl::_updateRanges(Fact* pFact)
//-- Parameter update requests
if(_requestUpdates.contains(pFact->name())) {
foreach(QString param, _requestUpdates[pFact->name()]) {
_paramIO[param]->paramRequest();
if(!_updatesToRequest.contains(param)) {
_updatesToRequest << param;
}
}
}
if(_updatesToRequest.size()) {
QTimer::singleShot(500, this, &QGCCameraControl::_requestParamUpdates);
}
}
//-----------------------------------------------------------------------------
void
QGCCameraControl::_requestParamUpdates()
{
foreach(QString param, _updatesToRequest) {
_paramIO[param]->paramRequest();
}
_updatesToRequest.clear();
}
//-----------------------------------------------------------------------------
......
......@@ -166,6 +166,7 @@ private slots:
void _initWhenReady ();
void _requestCameraSettings ();
void _requestAllParameters ();
void _requestParamUpdates ();
void _requestCaptureStatus ();
void _requestStorageInfo ();
void _downloadFinished ();
......@@ -219,4 +220,5 @@ protected:
int _captureInfoRetries;
//-- Parameters that require a full update
QMap<QString, QStringList> _requestUpdates;
QStringList _updatesToRequest;
};
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