Modem instance setting read/write
This commit is contained in:
parent
c5bccb4211
commit
abdb5d32d9
|
@ -856,6 +856,8 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
||||||
demodModeSelectorAdv->setSelection(dType);
|
demodModeSelectorAdv->setSelection(dType);
|
||||||
#endif
|
#endif
|
||||||
demodMuteButton->setSelection(demod->isMuted()?1:-1);
|
demodMuteButton->setSelection(demod->isMuted()?1:-1);
|
||||||
|
newModemArgs = demod->getModemArgs();
|
||||||
|
modemPropertiesUpdated.store(true);
|
||||||
}
|
}
|
||||||
if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) {
|
if (demodWaterfallCanvas->getDragState() == WaterfallCanvas::WF_DRAG_NONE) {
|
||||||
long long centerFreq = demod->getFrequency();
|
long long centerFreq = demod->getFrequency();
|
||||||
|
|
|
@ -330,3 +330,30 @@ void DemodulatorInstance::setMuted(bool muted) {
|
||||||
DemodulatorThreadInputQueue *DemodulatorInstance::getIQInputDataPipe() {
|
DemodulatorThreadInputQueue *DemodulatorInstance::getIQInputDataPipe() {
|
||||||
return pipeIQInputData;
|
return pipeIQInputData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModemArgInfoList DemodulatorInstance::getModemArgs() {
|
||||||
|
Modem *m = demodulatorPreThread->getModem();
|
||||||
|
|
||||||
|
ModemArgInfoList args;
|
||||||
|
if (m != nullptr) {
|
||||||
|
args = m->getSettings();
|
||||||
|
}
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DemodulatorInstance::readModemSetting(std::string setting) {
|
||||||
|
Modem *m = demodulatorPreThread->getModem();
|
||||||
|
|
||||||
|
if (m) {
|
||||||
|
return m->readSetting(setting);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
void DemodulatorInstance::writeModemSetting(std::string setting, std::string value) {
|
||||||
|
Modem *m = demodulatorPreThread->getModem();
|
||||||
|
|
||||||
|
if (m) {
|
||||||
|
m->writeSetting(setting, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -82,6 +82,10 @@ public:
|
||||||
|
|
||||||
DemodulatorThreadInputQueue *getIQInputDataPipe();
|
DemodulatorThreadInputQueue *getIQInputDataPipe();
|
||||||
|
|
||||||
|
ModemArgInfoList getModemArgs();
|
||||||
|
std::string readModemSetting(std::string setting);
|
||||||
|
void writeModemSetting(std::string setting, std::string value);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DemodulatorThreadInputQueue* pipeIQInputData;
|
DemodulatorThreadInputQueue* pipeIQInputData;
|
||||||
DemodulatorThreadPostInputQueue* pipeIQDemodData;
|
DemodulatorThreadPostInputQueue* pipeIQDemodData;
|
||||||
|
|
Loading…
Reference in New Issue