mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 21:58:37 -05:00
Modem property grid now shows interactive settings
- Not yet applied
This commit is contained in:
parent
5303f329df
commit
c5bccb4211
@ -94,8 +94,9 @@ AppFrame::AppFrame() :
|
|||||||
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);
|
||||||
|
|
||||||
|
modemPropertiesUpdated.store(false);
|
||||||
modemProps = new ModemProperties(demodPanel, wxID_ANY);
|
modemProps = new ModemProperties(demodPanel, wxID_ANY);
|
||||||
demodTray->Add(modemProps, 10, wxEXPAND | wxALL, 0);
|
demodTray->Add(modemProps, 15, wxEXPAND | wxALL, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxGetApp().getDemodSpectrumProcessor()->setup(1024);
|
wxGetApp().getDemodSpectrumProcessor()->setup(1024);
|
||||||
@ -1046,6 +1047,10 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
wproc->setCenterFrequency(waterfallCanvas->getCenterFrequency());
|
wproc->setCenterFrequency(waterfallCanvas->getCenterFrequency());
|
||||||
wxGetApp().getSDRPostThread()->setIQVisualRange(waterfallCanvas->getCenterFrequency(), waterfallCanvas->getBandwidth());
|
wxGetApp().getSDRPostThread()->setIQVisualRange(waterfallCanvas->getCenterFrequency(), waterfallCanvas->getBandwidth());
|
||||||
|
|
||||||
|
if (modemPropertiesUpdated.load()) {
|
||||||
|
modemProps->initProperties(newModemArgs);
|
||||||
|
modemPropertiesUpdated.store(false);
|
||||||
|
}
|
||||||
// waterfallCanvas->processInputQueue();
|
// waterfallCanvas->processInputQueue();
|
||||||
// waterfallCanvas->Refresh();
|
// waterfallCanvas->Refresh();
|
||||||
// demodWaterfallCanvas->processInputQueue();
|
// demodWaterfallCanvas->processInputQueue();
|
||||||
@ -1246,3 +1251,8 @@ FFTVisualDataThread *AppFrame::getWaterfallDataThread() {
|
|||||||
return waterfallDataThread;
|
return waterfallDataThread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppFrame::updateModemProperties(ModemArgInfoList args) {
|
||||||
|
newModemArgs = args;
|
||||||
|
modemPropertiesUpdated.store(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
|
|
||||||
FFTVisualDataThread *getWaterfallDataThread();
|
FFTVisualDataThread *getWaterfallDataThread();
|
||||||
|
|
||||||
|
void updateModemProperties(ModemArgInfoList args);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnMenu(wxCommandEvent& event);
|
void OnMenu(wxCommandEvent& event);
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
@ -123,6 +125,8 @@ private:
|
|||||||
std::atomic_bool deviceChanged;
|
std::atomic_bool deviceChanged;
|
||||||
|
|
||||||
ModemProperties *modemProps;
|
ModemProperties *modemProps;
|
||||||
|
std::atomic_bool modemPropertiesUpdated;
|
||||||
|
ModemArgInfoList newModemArgs;
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,7 @@ ModemProperties::ModemProperties(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
bSizer = new wxBoxSizer( wxVERTICAL );
|
bSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
bSizer->Add(m_propertyGrid, wxEXPAND );
|
bSizer->Add(m_propertyGrid, 1, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
this->SetSizer(bSizer);
|
this->SetSizer(bSizer);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "DemodulatorWorkerThread.h"
|
#include "DemodulatorWorkerThread.h"
|
||||||
#include "CubicSDRDefs.h"
|
#include "CubicSDRDefs.h"
|
||||||
|
#include "CubicSDR.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
DemodulatorWorkerThread::DemodulatorWorkerThread() : IOThread(),
|
DemodulatorWorkerThread::DemodulatorWorkerThread() : IOThread(),
|
||||||
@ -52,6 +53,7 @@ void DemodulatorWorkerThread::run() {
|
|||||||
cModem = Modem::makeModem(demodCommand.demodType);
|
cModem = Modem::makeModem(demodCommand.demodType);
|
||||||
cModemType = demodCommand.demodType;
|
cModemType = demodCommand.demodType;
|
||||||
result.sampleRate = demodCommand.sampleRate;
|
result.sampleRate = demodCommand.sampleRate;
|
||||||
|
wxGetApp().getAppFrame()->updateModemProperties(cModem->getSettings());
|
||||||
}
|
}
|
||||||
result.modem = cModem;
|
result.modem = cModem;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user