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