remove normalization
This commit is contained in:
@ -352,6 +352,7 @@ void ChartViewer::add_data(int step, double data)
|
||||
last_step = step;
|
||||
|
||||
series->append(step, data);
|
||||
|
||||
if (last_update.msecsTo(QTime::currentTime()) > updchart) {
|
||||
last_update = QTime::currentTime();
|
||||
reset_zoom();
|
||||
@ -365,19 +366,6 @@ void ChartViewer::reset_zoom()
|
||||
{
|
||||
auto points = series->points();
|
||||
|
||||
// normalize outlier data from data corruption when polling thermo data
|
||||
for (int i = 1; i < points.size() - 1; ++i) {
|
||||
double avg = (points[i - 1].y() + points[i + 1].y()) / 2.0;
|
||||
double val = points[i].y();
|
||||
|
||||
if (fabs(avg) > 0.0) {
|
||||
if (val == 0.0)
|
||||
series->replace(i, points[i].x(), avg);
|
||||
else if (((val - avg) / avg) > 100.0)
|
||||
series->replace(i, points[i].x(), val);
|
||||
}
|
||||
}
|
||||
|
||||
qreal xmin = 1.0e100;
|
||||
qreal xmax = -1.0e100;
|
||||
qreal ymin = 1.0e100;
|
||||
|
||||
Reference in New Issue
Block a user