Browse Source

Fix Scope rendering when min/max point is non-finite.

tags/v2.0.1
Andrew Belt 3 years ago
parent
commit
5308553897
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Scope.cpp

+ 2
- 2
src/Scope.cpp View File

@@ -245,7 +245,7 @@ struct ScopeDisplay : LedDisplay {
const Scope::Point& point = module->pointBuffer[i]; const Scope::Point& point = module->pointBuffer[i];
float max = (wave == 0) ? point.maxX[channel] : point.maxY[channel]; float max = (wave == 0) ? point.maxX[channel] : point.maxY[channel];
if (!std::isfinite(max)) if (!std::isfinite(max))
continue;
max = 0.f;


Vec p; Vec p;
p.x = (float) i / (BUFFER_SIZE - 1); p.x = (float) i / (BUFFER_SIZE - 1);
@@ -262,7 +262,7 @@ struct ScopeDisplay : LedDisplay {
const Scope::Point& point = module->pointBuffer[i]; const Scope::Point& point = module->pointBuffer[i];
float min = (wave == 0) ? point.minX[channel] : point.minY[channel]; float min = (wave == 0) ? point.minX[channel] : point.minY[channel];
if (!std::isfinite(min)) if (!std::isfinite(min))
continue;
min = 0.f;


Vec p; Vec p;
p.x = (float) i / (BUFFER_SIZE - 1); p.x = (float) i / (BUFFER_SIZE - 1);


Loading…
Cancel
Save