Runs but hangs...
This commit is contained in:
@@ -123,7 +123,9 @@ class ecmcDAQChannelItem {
|
||||
if(first) {
|
||||
dataIndexToReturn_ = 0;
|
||||
}
|
||||
|
||||
dataIndexToReturn_++;
|
||||
return 0.0;
|
||||
|
||||
if(dataIndexToReturn_ >= dataElementCount_) {
|
||||
printf("ERROR: Try to read outside data buffer for data item %s\n", name_.c_str());
|
||||
return -1;
|
||||
|
||||
@@ -67,13 +67,13 @@ double ecmcDAQDataChannel::getData(int first){
|
||||
first = false;
|
||||
}
|
||||
|
||||
if(dataItems_[currItemIndex_]->empty()) {
|
||||
if(dataItems_[currItemIndex_]->empty() && currItemIndex_+1<itemCounter_) {
|
||||
// get first index of next dataItem
|
||||
first = true;
|
||||
currItemIndex_++;
|
||||
}
|
||||
|
||||
if(currItemIndex_>=itemCounter_) {
|
||||
if(currItemIndex_ >= itemCounter_) {
|
||||
printf("No more data here!!!\n");
|
||||
return 0;
|
||||
//throw std::runtime_error( "Item index out of range");
|
||||
|
||||
Reference in New Issue
Block a user