Commit ffa4a2c6 authored by Don Gagne's avatar Don Gagne

Update to new input/output data rate apis

parent cf9df59c
......@@ -184,9 +184,7 @@ void XbeeLink::writeBytes(const char *bytes, qint64 length) // TO DO: delete th
}
if(!xbee_nsenddata(this->m_xbeeCon,data,length)) // return value of 0 is successful written
{
// Log the amount and time written out for future data rate calculations.
QMutexLocker dataRateLocker(&dataRateMutex);
logDataRateToBuffer(outDataWriteAmounts, outDataWriteTimes, &outDataIndex, length, QDateTime::currentMSecsSinceEpoch());
_logOutputDataRate(length, QDateTime::currentMSecsSinceEpoch());
}
else
{
......@@ -207,11 +205,8 @@ void XbeeLink::readBytes()
data.push_back(xbeePkt->data[i]);
}
emit bytesReceived(this, data);
// Log the amount and time received for future data rate calculations.
QMutexLocker dataRateLocker(&dataRateMutex);
logDataRateToBuffer(inDataWriteAmounts, inDataWriteTimes, &inDataIndex, data.length(), QDateTime::currentMSecsSinceEpoch());
_logInputDataRate(data.length(), QDateTime::currentMSecsSinceEpoch());
emit bytesReceived(this, data);
}
}
......
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