Important BUGfix: effectively there was no sleep period in the thread handling the data from the UlDAQ
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
617eded04e
commit
ec2a933e20
@ -420,12 +420,18 @@ void StreamMgr::addInDataHandler(InDataHandler &handler) {
|
|||||||
"is called more than once on a handler object");
|
"is called more than once on a handler object");
|
||||||
}
|
}
|
||||||
_inDataHandlers.push_back(&handler);
|
_inDataHandlers.push_back(&handler);
|
||||||
|
DEBUGTRACE_PRINT(_inDataHandlers.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamMgr::removeInDataHandler(InDataHandler &handler) {
|
void StreamMgr::removeInDataHandler(InDataHandler &handler) {
|
||||||
DEBUGTRACE_ENTER;
|
DEBUGTRACE_ENTER;
|
||||||
checkRightThread();
|
checkRightThread();
|
||||||
std::scoped_lock<std::mutex> lck(_inDataHandler_mtx);
|
std::scoped_lock<std::mutex> lck(_inDataHandler_mtx);
|
||||||
_inDataHandlers.remove(&handler);
|
_inDataHandlers.remove(&handler);
|
||||||
|
|
||||||
|
DEBUGTRACE_PRINT(_inDataHandlers.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Daq::StreamStatus StreamMgr::getStreamStatus(const StreamType type) const {
|
Daq::StreamStatus StreamMgr::getStreamStatus(const StreamType type) const {
|
||||||
|
@ -252,6 +252,7 @@ InBufHandler::InBufHandler(DT9837A &daq, InDaqCallback cb)
|
|||||||
}
|
}
|
||||||
void InBufHandler::start() {
|
void InBufHandler::start() {
|
||||||
|
|
||||||
|
DEBUGTRACE_ENTER;
|
||||||
ScanStatus status;
|
ScanStatus status;
|
||||||
TransferStatus transferStatus;
|
TransferStatus transferStatus;
|
||||||
UlError err = ulDaqInScanStatus(daq.getHandle(), &status, &transferStatus);
|
UlError err = ulDaqInScanStatus(daq.getHandle(), &status, &transferStatus);
|
||||||
@ -455,9 +456,9 @@ void DT9837A::threadFcn(InDaqCallback inCallback, OutDaqCallback outCallback) {
|
|||||||
_stopThread = true;
|
_stopThread = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(sleeptime_us));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::this_thread::sleep_for(std::chrono::microseconds(sleeptime_us));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update stream status that we are not running anymore
|
/// Update stream status that we are not running anymore
|
||||||
|
@ -22,7 +22,6 @@ bool PPMHandler::inCallback_threaded(const DaqData &d) {
|
|||||||
|
|
||||||
dmat data = d.toFloat();
|
dmat data = d.toFloat();
|
||||||
|
|
||||||
|
|
||||||
const us nchannels = d.nchannels;
|
const us nchannels = d.nchannels;
|
||||||
assert(data.n_cols == nchannels);
|
assert(data.n_cols == nchannels);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user