Skip to content

Commit

Permalink
add in debug outputs for numBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
shababo committed Apr 14, 2024
1 parent 7ca30af commit beb1770
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/ImpedanceMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ void ImpedanceMeter::runImpedanceMeasurement(Impedances& impedances)
if (numPeriods < 5) numPeriods = 5; // ...but always measure across no fewer than 5 complete periods
double period = board->settings.boardSampleRate / actualImpedanceFreq;
int numBlocks = ceil((numPeriods + 2) * period / float(SAMPLES_PER_DATA_BLOCK(board->evalBoard->isUSB3()))); // + 2 periods to give time to settle initially
LOGD("ImpedanceMeter: Initial numBlocks = ", numBlocks);
if (numBlocks < 2) numBlocks = 2; // need first block for command to switch channels to take effect.
LOGD("ImpedanceMeter: Padded numBlocks = ", numBlocks);

CHECK_EXIT;
board->settings.dsp.cutoffFreq = board->chipRegisters.setDspCutoffFreq(board->settings.dsp.cutoffFreq);
Expand Down

0 comments on commit beb1770

Please sign in to comment.