/** * Check if a transaction is pending and if yes complete it. */ void UAVTalk::updateAck(UAVObject* obj) { if (respObj != NULL && respObj->getObjID() == obj->getObjID() && (respObj->getInstID() == obj->getInstID() || respAllInstances)) { respObj = NULL; emit transactionCompleted(obj, true); } }
/** * Check if a transaction is pending and if yes complete it. */ void UAVTalk::updateAck(UAVObject* obj) { quint32 objId = obj->getObjID(); QMap<quint32, Transaction*>::iterator itr = transMap.find(objId); if ( itr != transMap.end() && (itr.value()->obj->getInstID() == obj->getInstID() || itr.value()->allInstances)) { transMap.remove(objId); delete itr.value(); emit transactionCompleted(obj, true); } }
/** * Emit the transactionCompleted event (used by the UAVTalk plugin) */ void UAVObject::emitTransactionCompleted(bool success) { emit transactionCompleted(this, success); }