Skip to content
Snippets Groups Projects
Commit 879ff034 authored by Giulio Gaio's avatar Giulio Gaio
Browse files

Fixed threshold check

parent 45d90491
No related branches found
No related tags found
No related merge requests found
......@@ -2089,7 +2089,7 @@ void DataVampire::store_data(Tango::DeviceData *cmd_value, int32_t num_samples,
for (int k = roi[0]; k <= roi[2]; k++) {
cache_buffer[cache_idx].databuf[cnt] = data[j * *attr_Width_read + k];
//cache_buffer[cache_idx].databuf[cnt] = k;
if ((data[j * *attr_Width_read + k] >= *attr_MinThreshold_read) ||
if ((data[j * *attr_Width_read + k] >= *attr_MinThreshold_read) &&
(data[j * *attr_Width_read + k] <= *attr_MaxThreshold_read))
cache_buffer[cache_idx].datavalid[cnt] = true;
else
......@@ -2105,7 +2105,7 @@ void DataVampire::store_data(Tango::DeviceData *cmd_value, int32_t num_samples,
for (int k = roi[0]; k <= roi[1]; k++) {
cache_buffer[cache_idx].databuf[cnt] = data[k];
if ((data[k] >= *attr_MinThreshold_read) || (data[k] <= *attr_MaxThreshold_read))
if ((data[k] >= *attr_MinThreshold_read) && (data[k] <= *attr_MaxThreshold_read))
cache_buffer[cache_idx].datavalid[cnt] = true;
else
cache_buffer[cache_idx].datavalid[cnt] = false;
......
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