diff --git a/lib/hooks/dft.cpp b/lib/hooks/dft.cpp index 9b5ce0c65..6e90fe484 100644 --- a/lib/hooks/dft.cpp +++ b/lib/hooks/dft.cpp @@ -384,6 +384,7 @@ public: maxF = estimate.x; maxA = estimate.y; } + } <<<<<<< HEAD if (dftCalcCnt > 1) { @@ -398,13 +399,21 @@ public: smp->data[i * 4 + 2].f = atan2(dftResults[i][maxPos].imag(), dftResults[i][maxPos].real()); /* Phase */ smp->data[i * 4 + 3].f = 0; /* RoCof */ - if (phasorPhase) - phasorPhase->writeData(1, &(smp->data[i * 4 + 2].f)); - if (phasorAmplitude) - phasorAmplitude->writeData(1, &(smp->data[i * 4 + 1].f)); } } + //the following is a debug output and currently only for channel 0 + if (windowSize < smpMemPos){ + if (phasorFreq) + phasorFreq->writeData(1, &(smp->data[0 * 4 + 0].f)); + + if (phasorPhase) + phasorPhase->writeData(1, &(smp->data[0 * 4 + 2].f)); + + if (phasorAmplitude) + phasorAmplitude->writeData(1, &(smp->data[0 * 4 + 1].f)); + } + smp->length = windowSize < smpMemPos ? signalIndex.size() * 4 : 0; dftCalcCount++;