mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-29 15:18:38 -05:00
Remove public access to demod internal state vars and clean-up improper use
This commit is contained in:
parent
48399ccc68
commit
b4e4f3017f
@ -360,7 +360,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
demodModeSelector->setSelection(dType);
|
demodModeSelector->setSelection(dType);
|
||||||
}
|
}
|
||||||
if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) {
|
if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) {
|
||||||
if (demod->getParams().frequency != demodWaterfallCanvas->getCenterFrequency()) {
|
if (demod->getFrequency() != demodWaterfallCanvas->getCenterFrequency()) {
|
||||||
demodWaterfallCanvas->setCenterFrequency(demod->getFrequency());
|
demodWaterfallCanvas->setCenterFrequency(demod->getFrequency());
|
||||||
demodSpectrumCanvas->setCenterFrequency(demod->getFrequency());
|
demodSpectrumCanvas->setCenterFrequency(demod->getFrequency());
|
||||||
}
|
}
|
||||||
|
@ -91,10 +91,6 @@ DemodulatorThreadCommandQueue *DemodulatorInstance::getCommandQueue() {
|
|||||||
return threadQueueCommand;
|
return threadQueueCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorThreadParameters &DemodulatorInstance::getParams() {
|
|
||||||
return demodulatorPreThread->getParams();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DemodulatorInstance::terminate() {
|
void DemodulatorInstance::terminate() {
|
||||||
std::cout << "Terminating demodulator audio thread.." << std::endl;
|
std::cout << "Terminating demodulator audio thread.." << std::endl;
|
||||||
audioThread->terminate();
|
audioThread->terminate();
|
||||||
|
@ -36,7 +36,6 @@ public:
|
|||||||
void setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue);
|
void setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue);
|
||||||
|
|
||||||
DemodulatorThreadCommandQueue *getCommandQueue();
|
DemodulatorThreadCommandQueue *getCommandQueue();
|
||||||
DemodulatorThreadParameters &getParams();
|
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
void terminate();
|
void terminate();
|
||||||
|
@ -70,8 +70,8 @@ std::vector<DemodulatorInstance *> *DemodulatorMgr::getDemodulatorsAt(long long
|
|||||||
for (int i = 0, iMax = demods.size(); i < iMax; i++) {
|
for (int i = 0, iMax = demods.size(); i < iMax; i++) {
|
||||||
DemodulatorInstance *testDemod = demods[i];
|
DemodulatorInstance *testDemod = demods[i];
|
||||||
|
|
||||||
long long freqTest = testDemod->getParams().frequency;
|
long long freqTest = testDemod->getFrequency();
|
||||||
long long bandwidthTest = testDemod->getParams().bandwidth;
|
long long bandwidthTest = testDemod->getBandwidth();
|
||||||
long long halfBandwidthTest = bandwidthTest / 2;
|
long long halfBandwidthTest = bandwidthTest / 2;
|
||||||
|
|
||||||
long long halfBuffer = bandwidth / 2;
|
long long halfBuffer = bandwidth / 2;
|
||||||
|
@ -765,10 +765,10 @@ void WaterfallCanvas::OnMouseReleased(wxMouseEvent& event) {
|
|||||||
} else {
|
} else {
|
||||||
isNew = true;
|
isNew = true;
|
||||||
demod = wxGetApp().getDemodMgr().newThread();
|
demod = wxGetApp().getDemodMgr().newThread();
|
||||||
demod->getParams().frequency = freq;
|
demod->setFrequency(freq);
|
||||||
|
|
||||||
if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) {
|
if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) {
|
||||||
demod->getParams().bandwidth = last->getBandwidth();
|
demod->setBandwidth(last->getBandwidth());
|
||||||
demod->setDemodulatorType(last->getDemodulatorType());
|
demod->setDemodulatorType(last->getDemodulatorType());
|
||||||
demod->setSquelchLevel(last->getSquelchLevel());
|
demod->setSquelchLevel(last->getSquelchLevel());
|
||||||
demod->setSquelchEnabled(last->isSquelchEnabled());
|
demod->setSquelchEnabled(last->isSquelchEnabled());
|
||||||
@ -826,8 +826,8 @@ void WaterfallCanvas::OnMouseReleased(wxMouseEvent& event) {
|
|||||||
demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||||
} else {
|
} else {
|
||||||
demod = wxGetApp().getDemodMgr().newThread();
|
demod = wxGetApp().getDemodMgr().newThread();
|
||||||
demod->getParams().frequency = freq;
|
demod->setFrequency(freq);
|
||||||
demod->getParams().bandwidth = bw;
|
demod->setBandwidth(bw);
|
||||||
if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) {
|
if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) {
|
||||||
demod->setDemodulatorType(last->getDemodulatorType());
|
demod->setDemodulatorType(last->getDemodulatorType());
|
||||||
demod->setSquelchLevel(last->getSquelchLevel());
|
demod->setSquelchLevel(last->getSquelchLevel());
|
||||||
|
Loading…
Reference in New Issue
Block a user