diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 808c385..bacb829 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -360,7 +360,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) { demodModeSelector->setSelection(dType); } if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) { - if (demod->getParams().frequency != demodWaterfallCanvas->getCenterFrequency()) { + if (demod->getFrequency() != demodWaterfallCanvas->getCenterFrequency()) { demodWaterfallCanvas->setCenterFrequency(demod->getFrequency()); demodSpectrumCanvas->setCenterFrequency(demod->getFrequency()); } diff --git a/src/demod/DemodulatorInstance.cpp b/src/demod/DemodulatorInstance.cpp index 62e009a..2c0012c 100644 --- a/src/demod/DemodulatorInstance.cpp +++ b/src/demod/DemodulatorInstance.cpp @@ -91,10 +91,6 @@ DemodulatorThreadCommandQueue *DemodulatorInstance::getCommandQueue() { return threadQueueCommand; } -DemodulatorThreadParameters &DemodulatorInstance::getParams() { - return demodulatorPreThread->getParams(); -} - void DemodulatorInstance::terminate() { std::cout << "Terminating demodulator audio thread.." << std::endl; audioThread->terminate(); diff --git a/src/demod/DemodulatorInstance.h b/src/demod/DemodulatorInstance.h index f4c28ad..ee1eb42 100644 --- a/src/demod/DemodulatorInstance.h +++ b/src/demod/DemodulatorInstance.h @@ -36,7 +36,6 @@ public: void setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue); DemodulatorThreadCommandQueue *getCommandQueue(); - DemodulatorThreadParameters &getParams(); void run(); void terminate(); diff --git a/src/demod/DemodulatorMgr.cpp b/src/demod/DemodulatorMgr.cpp index 078ca1b..8883d0b 100644 --- a/src/demod/DemodulatorMgr.cpp +++ b/src/demod/DemodulatorMgr.cpp @@ -70,8 +70,8 @@ std::vector *DemodulatorMgr::getDemodulatorsAt(long long for (int i = 0, iMax = demods.size(); i < iMax; i++) { DemodulatorInstance *testDemod = demods[i]; - long long freqTest = testDemod->getParams().frequency; - long long bandwidthTest = testDemod->getParams().bandwidth; + long long freqTest = testDemod->getFrequency(); + long long bandwidthTest = testDemod->getBandwidth(); long long halfBandwidthTest = bandwidthTest / 2; long long halfBuffer = bandwidth / 2; diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index 16c9d5c..9987259 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -765,10 +765,10 @@ void WaterfallCanvas::OnMouseReleased(wxMouseEvent& event) { } else { isNew = true; demod = wxGetApp().getDemodMgr().newThread(); - demod->getParams().frequency = freq; + demod->setFrequency(freq); if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) { - demod->getParams().bandwidth = last->getBandwidth(); + demod->setBandwidth(last->getBandwidth()); demod->setDemodulatorType(last->getDemodulatorType()); demod->setSquelchLevel(last->getSquelchLevel()); demod->setSquelchEnabled(last->isSquelchEnabled()); @@ -826,8 +826,8 @@ void WaterfallCanvas::OnMouseReleased(wxMouseEvent& event) { demod = wxGetApp().getDemodMgr().getLastActiveDemodulator(); } else { demod = wxGetApp().getDemodMgr().newThread(); - demod->getParams().frequency = freq; - demod->getParams().bandwidth = bw; + demod->setFrequency(freq); + demod->setBandwidth(bw); if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) { demod->setDemodulatorType(last->getDemodulatorType()); demod->setSquelchLevel(last->getSquelchLevel());