diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index ff118f3..c641864 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -207,7 +207,7 @@ AppFrame::AppFrame() : devName.append(" (In Use?)"); } - menu->Append(wxID_DEVICE_ID+p, devName); + menu->AppendRadioItem(wxID_DEVICE_ID+p, devName)->Check(wxGetApp().getDevice() == p); p++; } diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp index 50b265a..e84bcda 100644 --- a/src/CubicSDR.cpp +++ b/src/CubicSDR.cpp @@ -200,3 +200,7 @@ void CubicSDR::setDevice(int deviceId) { command.llong_value = deviceId; threadCmdQueueSDR->push(command); } + +int CubicSDR::getDevice() { + return sdrThread->getDeviceId(); +} diff --git a/src/CubicSDR.h b/src/CubicSDR.h index 8ac9d8d..f2a24b8 100644 --- a/src/CubicSDR.h +++ b/src/CubicSDR.h @@ -40,6 +40,7 @@ public: std::vector *getDevices(); void setDevice(int deviceId); + int getDevice(); DemodulatorThreadOutputQueue* getAudioVisualQueue(); DemodulatorThreadInputQueue* getIQVisualQueue();