MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / feed

Method feed

Default/GenericInspector/TVProcessorTab.cpp:592–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void
593TVProcessorTab::feed(const SUCOMPLEX *data, unsigned int size)
594{
595 SUFLOAT k = this->ui->invertSyncCheck->isChecked() ? -1 : 1;
596 SUFLOAT dc = static_cast<SUFLOAT>(this->ui->dcSpin->value()) / 100;
597
598 this->floatBuffer.resize(size);
599
600 if (this->decisionMode == Decider::MODULUS) {
601 for (unsigned i = 0; i < size; ++i)
602 this->floatBuffer[i] = k * SU_C_ABS(data[i]) + dc;
603 } else {
604 for (unsigned i = 0; i < size; ++i)
605 this->floatBuffer[i] = k * SU_C_ARG(data[i]) / PI + dc;
606 }
607
608 this->tvWorker->pushData(this->floatBuffer);
609
610 emit tvProcessorData();
611}
612
613
614////////////////////////////////// Slots ///////////////////////////////////////

Callers

nothing calls this directly

Calls 2

valueMethod · 0.80
pushDataMethod · 0.80

Tested by

no test coverage detected