mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-04 14:17:51 -04:00
deModulators selections
This commit is contained in:
parent
e5bdcb1fc9
commit
0a0e7db242
@ -72,6 +72,7 @@ AppFrame::AppFrame() :
|
|||||||
demodModeSelectoradv->addChoice(DEMOD_TYPE_SQAM, "SQAM");
|
demodModeSelectoradv->addChoice(DEMOD_TYPE_SQAM, "SQAM");
|
||||||
demodModeSelectoradv->addChoice(DEMOD_TYPE_QAM, "QAM");
|
demodModeSelectoradv->addChoice(DEMOD_TYPE_QAM, "QAM");
|
||||||
demodModeSelectoradv->addChoice(DEMOD_TYPE_QPSK, "QPSK");
|
demodModeSelectoradv->addChoice(DEMOD_TYPE_QPSK, "QPSK");
|
||||||
|
demodModeSelectoradv->setSelection(DEMOD_TYPE_ASK);
|
||||||
demodModeSelectoradv->setHelpTip("Choose advanced modulation types.");
|
demodModeSelectoradv->setHelpTip("Choose advanced modulation types.");
|
||||||
demodTray->Add(demodModeSelectoradv, 3, wxEXPAND | wxALL, 0);
|
demodTray->Add(demodModeSelectoradv, 3, wxEXPAND | wxALL, 0);
|
||||||
|
|
||||||
@ -491,6 +492,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
outputDeviceMenuItems[outputDevice]->Check(true);
|
outputDeviceMenuItems[outputDevice]->Check(true);
|
||||||
int dType = demod->getDemodulatorType();
|
int dType = demod->getDemodulatorType();
|
||||||
demodModeSelector->setSelection(dType);
|
demodModeSelector->setSelection(dType);
|
||||||
|
demodModeSelectoradv->setSelection(dType);
|
||||||
}
|
}
|
||||||
if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) {
|
if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) {
|
||||||
long long centerFreq = demod->getFrequency();
|
long long centerFreq = demod->getFrequency();
|
||||||
@ -518,8 +520,14 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
demodSpectrumCanvas->setCenterFrequency(centerFreq);
|
demodSpectrumCanvas->setCenterFrequency(centerFreq);
|
||||||
}
|
}
|
||||||
int dSelection = demodModeSelector->getSelection();
|
int dSelection = demodModeSelector->getSelection();
|
||||||
|
int dSelectionadv = demodModeSelectoradv->getSelection();
|
||||||
if (dSelection != -1 && dSelection != demod->getDemodulatorType()) {
|
if (dSelection != -1 && dSelection != demod->getDemodulatorType()) {
|
||||||
demod->setDemodulatorType(dSelection);
|
demod->setDemodulatorType(dSelection);
|
||||||
|
demodModeSelectoradv->setSelection(-1);
|
||||||
|
}
|
||||||
|
else if(dSelectionadv != -1 && dSelectionadv != demod->getDemodulatorType()) {
|
||||||
|
demod->setDemodulatorType(dSelectionadv);
|
||||||
|
demodModeSelector->setSelection(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
demodWaterfallCanvas->setBandwidth(demodBw);
|
demodWaterfallCanvas->setBandwidth(demodBw);
|
||||||
@ -538,7 +546,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
} else {
|
} else {
|
||||||
DemodulatorMgr *mgr = &wxGetApp().getDemodMgr();
|
DemodulatorMgr *mgr = &wxGetApp().getDemodMgr();
|
||||||
|
|
||||||
int dSelection = demodModeSelector->getSelection();
|
int dSelection = demodModeSelectoradv->getSelection();
|
||||||
if (dSelection != -1 && dSelection != mgr->getLastDemodulatorType()) {
|
if (dSelection != -1 && dSelection != mgr->getLastDemodulatorType()) {
|
||||||
mgr->setLastDemodulatorType(dSelection);
|
mgr->setLastDemodulatorType(dSelection);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@ private:
|
|||||||
WaterfallCanvas *waterfallCanvas;
|
WaterfallCanvas *waterfallCanvas;
|
||||||
ModeSelectorCanvas *demodModeSelector;
|
ModeSelectorCanvas *demodModeSelector;
|
||||||
ModeSelectorCanvas *demodModeSelectoradv;
|
ModeSelectorCanvas *demodModeSelectoradv;
|
||||||
ModeSelectorCanvas *demodModeSelectoradv2;
|
|
||||||
SpectrumCanvas *demodSpectrumCanvas;
|
SpectrumCanvas *demodSpectrumCanvas;
|
||||||
WaterfallCanvas *demodWaterfallCanvas;
|
WaterfallCanvas *demodWaterfallCanvas;
|
||||||
MeterCanvas *demodSignalMeter;
|
MeterCanvas *demodSignalMeter;
|
||||||
|
@ -24,6 +24,18 @@ DemodulatorThread::DemodulatorThread(DemodulatorThreadPostInputQueue* iqInputQue
|
|||||||
demodAM_DSB = ampmodem_create(0.5, 0.0, LIQUID_AMPMODEM_DSB, 1);
|
demodAM_DSB = ampmodem_create(0.5, 0.0, LIQUID_AMPMODEM_DSB, 1);
|
||||||
demodAM_DSB_CSP = ampmodem_create(0.5, 0.0, LIQUID_AMPMODEM_DSB, 0);
|
demodAM_DSB_CSP = ampmodem_create(0.5, 0.0, LIQUID_AMPMODEM_DSB, 0);
|
||||||
demodAM = demodAM_DSB_CSP;
|
demodAM = demodAM_DSB_CSP;
|
||||||
|
|
||||||
|
// advanced demodulators
|
||||||
|
demodASK = modem_create(LIQUID_MODEM_ASK2);
|
||||||
|
demodAPSK = modem_create(LIQUID_MODEM_APSK4);
|
||||||
|
demodBPSK = modem_create(LIQUID_MODEM_BPSK);
|
||||||
|
demodDPSK = modem_create(LIQUID_MODEM_DPSK4);
|
||||||
|
demodPSK = modem_create(LIQUID_MODEM_PSK2);
|
||||||
|
demodOOK = modem_create(LIQUID_MODEM_OOK);
|
||||||
|
demodSQAM = modem_create(LIQUID_MODEM_SQAM32);
|
||||||
|
demodST = modem_create(LIQUID_MODEM_V29);
|
||||||
|
demodQAM = modem_create(LIQUID_MODEM_QAM4);
|
||||||
|
demodQPSK = modem_create(LIQUID_MODEM_QPSK);
|
||||||
|
|
||||||
}
|
}
|
||||||
DemodulatorThread::~DemodulatorThread() {
|
DemodulatorThread::~DemodulatorThread() {
|
||||||
|
@ -65,6 +65,16 @@ protected:
|
|||||||
ampmodem demodAM_DSB;
|
ampmodem demodAM_DSB;
|
||||||
ampmodem demodAM_LSB;
|
ampmodem demodAM_LSB;
|
||||||
ampmodem demodAM_USB;
|
ampmodem demodAM_USB;
|
||||||
|
modem demodASK;
|
||||||
|
modem demodAPSK;
|
||||||
|
modem demodBPSK;
|
||||||
|
modem demodDPSK;
|
||||||
|
modem demodPSK;
|
||||||
|
modem demodOOK;
|
||||||
|
modem demodSQAM;
|
||||||
|
modem demodST;
|
||||||
|
modem demodQAM;
|
||||||
|
modem demodQPSK;
|
||||||
|
|
||||||
agc_crcf iqAutoGain;
|
agc_crcf iqAutoGain;
|
||||||
|
|
||||||
|
@ -263,6 +263,47 @@ void PrimaryGLContext::DrawDemod(DemodulatorInstance *demod, RGBColor color, lon
|
|||||||
demodAlign = GLFont::GLFONT_ALIGN_LEFT;
|
demodAlign = GLFont::GLFONT_ALIGN_LEFT;
|
||||||
uxPos += xOfs;
|
uxPos += xOfs;
|
||||||
break;
|
break;
|
||||||
|
// advanced demodulators start here
|
||||||
|
case DEMOD_TYPE_ASK:
|
||||||
|
demodStr = "ASK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_APSK:
|
||||||
|
demodStr = "APSK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_BPSK:
|
||||||
|
demodStr = "BPSK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_DPSK:
|
||||||
|
demodStr = "DPSK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_PSK:
|
||||||
|
demodStr = "PSK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_OOK:
|
||||||
|
demodStr = "OOK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_SQAM:
|
||||||
|
demodStr = "SQAM";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_ST:
|
||||||
|
demodStr = "ST";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_QAM:
|
||||||
|
demodStr = "QAM";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
|
case DEMOD_TYPE_QPSK:
|
||||||
|
demodStr = "QPSK";
|
||||||
|
demodAlign = GLFont::GLFONT_ALIGN_CENTER;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
glColor3f(0, 0, 0);
|
glColor3f(0, 0, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user