mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-08-13 11:02:25 -04:00
made OnMessage a bit cleaner, problably shoudl move to /visual
This commit is contained in:
parent
daeb2d5a18
commit
06da0a913c
@ -82,11 +82,12 @@ bool CubicSDR::OnInit() {
|
|||||||
}
|
}
|
||||||
choices.Add(devName);
|
choices.Add(devName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int devId = wxGetSingleChoiceIndex(wxT("Devices"), wxT("Choose Input Device"), choices);
|
int devId = wxGetSingleChoiceIndex(wxT("Devices"), wxT("Choose Input Device"), choices);
|
||||||
|
|
||||||
std::cout << "Chosen: " << devId << std::endl;
|
std::cout << "Chosen: " << devId << std::endl;
|
||||||
sdrThread->setDeviceId(devId);
|
sdrThread->setDeviceId(devId);
|
||||||
|
} else {
|
||||||
|
OnMessage("no devices found!", "warning");
|
||||||
}
|
}
|
||||||
|
|
||||||
t_PostSDR = new std::thread(&SDRPostThread::threadMain, sdrPostThread);
|
t_PostSDR = new std::thread(&SDRPostThread::threadMain, sdrPostThread);
|
||||||
@ -94,12 +95,6 @@ bool CubicSDR::OnInit() {
|
|||||||
|
|
||||||
appframe = new AppFrame();
|
appframe = new AppFrame();
|
||||||
|
|
||||||
if(devs.size() == 0) {
|
|
||||||
// appframe->OnMessage("no devices found!", "warning");
|
|
||||||
wxMessageDialog *message = new wxMessageDialog(NULL, wxT("no devices found"), wxT("warning"), wxOK | wxICON_ERROR );
|
|
||||||
message->ShowModal();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
int main_policy;
|
int main_policy;
|
||||||
struct sched_param main_param;
|
struct sched_param main_param;
|
||||||
@ -293,3 +288,8 @@ void CubicSDR::setFrequencySnap(int snap) {
|
|||||||
int CubicSDR::getFrequencySnap() {
|
int CubicSDR::getFrequencySnap() {
|
||||||
return snap;
|
return snap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CubicSDR::OnMessage(std::string text, std::string title) {
|
||||||
|
wxMessageDialog *message = new wxMessageDialog(NULL, wxString::Format(text.c_str()), wxString::Format(title.c_str()), wxOK | wxICON_ERROR );
|
||||||
|
message->ShowModal();
|
||||||
|
}
|
@ -62,6 +62,8 @@ public:
|
|||||||
|
|
||||||
void showFrequencyInput();
|
void showFrequencyInput();
|
||||||
|
|
||||||
|
void OnMessage(std::string message, std::string title);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AppFrame *appframe;
|
AppFrame *appframe;
|
||||||
AppConfig config;
|
AppConfig config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user