Commit 36b32fb3 authored by Claes's avatar Claes Committed by Esteban Blanc

Trends, bugfix in read of DsTrend buffer

parent 135bdb0e
......@@ -640,12 +640,8 @@ void XttTrend::trend_scan(void* data)
idx = write_buffer * trend_buff_size / 2
+ int(trend->trend_p[i]->NextWriteIndex[write_buffer])
- (values - 1 - k);
if (idx == 0 || idx == trend_buff_size / 2)
idx = trend->trend_p[i]->NoOfSample - 1
+ (!write_buffer) * trend_buff_size / 2;
else
idx--;
if (idx < 0)
idx += trend_buff_size;
trend->gcd->y_data[i][0] = trend->trend_p[i]->DataBuffer[idx];
}
trend->curve->points_added(&size);
......
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