本文整理汇总了C++中UAVObject::requestUpdate方法的典型用法代码示例。如果您正苦于以下问题:C++ UAVObject::requestUpdate方法的具体用法?C++ UAVObject::requestUpdate怎么用?C++ UAVObject::requestUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UAVObject
的用法示例。
在下文中一共展示了UAVObject::requestUpdate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
/**
Callback once calibration is done on the board.
Currently we don't have a way to tell if calibration is finished, so we
have to use a timer.
calibPhase2 is also connected to the AHRSCalibration object update signal.
*/
void ConfigAHRSWidget::calibPhase2()
{
UAVObject *obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSCalibration")));
// UAVObjectField *field = obj->getField(QString("measure_var"));
// This is a bit weird, but it is because we are expecting an update from the
// OP board with the correct calibration values, and those only arrive on the object update
// which comes back from the board, and not the first object update signal which is in fast
// the object update we did ourselves... Clear ?
switch (phaseCounter) {
case 0:
phaseCounter++;
m_ahrs->calibInstructions->setText("Getting results...");
connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(calibPhase2()));
// We need to echo back the results of calibration before changing to set mode
obj->requestUpdate();
break;
case 1: // This is the update with the right values (coming from the board)
disconnect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(calibPhase2()));
// Now update size of all the graphs
drawVariancesGraph();
saveAHRSCalibration();
m_ahrs->calibInstructions->setText(QString("Calibration saved."));
m_ahrs->ahrsCalibStart->setEnabled(true);
break;
}
}
示例2: restoreStabBank
void ConfigStabilizationWidget::restoreStabBank(int bank)
{
UAVObject *stabBankObject = getStabBankObject(bank);
if (stabBankObject) {
ObjectPersistence *objectPersistenceObject = ObjectPersistence::GetInstance(getObjectManager());
QTimer updateTimer(this);
QEventLoop eventLoop(this);
connect(&updateTimer, SIGNAL(timeout()), &eventLoop, SLOT(quit()));
connect(objectPersistenceObject, SIGNAL(objectUpdated(UAVObject *)), &eventLoop, SLOT(quit()));
ObjectPersistence::DataFields data;
data.Operation = ObjectPersistence::OPERATION_LOAD;
data.Selection = ObjectPersistence::SELECTION_SINGLEOBJECT;
data.ObjectID = stabBankObject->getObjID();
data.InstanceID = stabBankObject->getInstID();
objectPersistenceObject->setData(data);
objectPersistenceObject->updated();
updateTimer.start(500);
eventLoop.exec();
if (updateTimer.isActive()) {
stabBankObject->requestUpdate();
}
updateTimer.stop();
}
}
示例3: requestUpdate
void UAVObjectBrowserWidget::requestUpdate()
{
ObjectTreeItem *objItem = findCurrentObjectTreeItem();
Q_ASSERT(objItem);
UAVObject *obj = objItem->object();
Q_ASSERT(obj);
obj->requestUpdate();
}
示例4: recheckTabs
//! Query optional objects to determine which tabs can be configured
void ConfigModuleWidget::recheckTabs()
{
UAVObject * obj;
obj = getObjectManager()->getObject(AirspeedSettings::NAME);
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(objectUpdated(UAVObject*,bool)), Qt::UniqueConnection);
obj->requestUpdate();
obj = getObjectManager()->getObject(FlightBatterySettings::NAME);
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(objectUpdated(UAVObject*,bool)), Qt::UniqueConnection);
obj->requestUpdate();
obj = getObjectManager()->getObject(VibrationAnalysisSettings::NAME);
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(objectUpdated(UAVObject*,bool)), Qt::UniqueConnection);
obj->requestUpdate();
obj = getObjectManager()->getObject(HoTTSettings::NAME);
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(objectUpdated(UAVObject*,bool)), Qt::UniqueConnection);
obj->requestUpdate();
obj = getObjectManager()->getObject(GeoFenceSettings::NAME);
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(objectUpdated(UAVObject*,bool)), Qt::UniqueConnection);
obj->requestUpdate();
obj = getObjectManager()->getObject(PicoCSettings::NAME);
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(objectUpdated(UAVObject*,bool)), Qt::UniqueConnection);
obj->requestUpdate();
}
示例5: retrieveNextObject
/**
* Retrieve the next object in the queue
*/
void LoggingThread::retrieveNextObject()
{
// If queue is empty return
if (queue.isEmpty()) {
qDebug() << "Logging: Object retrieval completed";
return;
}
// Get next object from the queue
UAVObject *obj = queue.dequeue();
// Connect to object
connect(obj, SIGNAL(transactionCompleted(UAVObject *, bool)), this, SLOT(transactionCompleted(UAVObject *, bool)));
// Request update
obj->requestUpdate();
}
示例6: retrieveNextObject
/**
* Retrieve the next object in the queue
*/
void TelemetryMonitor::retrieveNextObject()
{
// If queue is empty return
if ( queue.isEmpty() )
{
qxtLog->debug("Object retrieval completed");
emit connected();
return;
}
// Get next object from the queue
UAVObject* obj = queue.dequeue();
//qxtLog->trace( tr("Retrieving object: %1").arg(obj->getName()) );
// Connect to object
connect(obj, SIGNAL(transactionCompleted(UAVObject*,bool)), this, SLOT(transactionCompleted(UAVObject*,bool)));
// Request update
obj->requestUpdate();
objPending = obj;
}