slow rate updates
This commit is contained in:
@@ -347,7 +347,6 @@ asynStatus asynStreamGeneratorDriver::writeInt32(asynUser *pasynUser,
|
||||
void asynStreamGeneratorDriver::receiveUDP() {
|
||||
|
||||
// TODO fix time overflows
|
||||
// TODO check for lost packets
|
||||
|
||||
const char *functionName = "receiveUDP";
|
||||
asynStatus status = asynSuccess;
|
||||
@@ -630,12 +629,14 @@ void asynStreamGeneratorDriver::processEvents() {
|
||||
|
||||
countDiffsPtr = (countDiffsPtr + 1) % 10;
|
||||
|
||||
lock();
|
||||
for (size_t i = 0; i < num_channels; ++i) {
|
||||
setIntegerParam(P_Rates[i], rates[i]);
|
||||
if (countDiffsPtr % 5 == 0) {
|
||||
lock();
|
||||
for (size_t i = 0; i < num_channels; ++i) {
|
||||
setIntegerParam(P_Rates[i], rates[i]);
|
||||
}
|
||||
callParamCallbacks();
|
||||
unlock();
|
||||
}
|
||||
callParamCallbacks();
|
||||
unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user