From 77423d43d409d68928d58631085e56b8c16f76e4 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sun, 22 Oct 2023 15:41:29 -0700 Subject: [PATCH 1/6] Fix issue causing a hang when testing serial port PTT. --- src/dlg_ptt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dlg_ptt.cpp b/src/dlg_ptt.cpp index 804417721..40cb312b5 100644 --- a/src/dlg_ptt.cpp +++ b/src/dlg_ptt.cpp @@ -675,6 +675,8 @@ void ComPortsDlg::OnTest(wxCommandEvent& event) { cv.notify_one(); }; + serialPort->connect(); + std::unique_lock lk(mtx); cv.wait(lk); From 67ef1fbc0c836cc4c159e444f33caa400ffd75e1 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sun, 22 Oct 2023 15:57:56 -0700 Subject: [PATCH 2/6] Add PR #577 to changelog and increment version number. --- CMakeLists.txt | 4 ++-- USER_MANUAL.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13887d30e..1794080ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ endif() set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version") set(PROJECT_NAME FreeDV) -set(PROJECT_VERSION 1.9.3) +set(PROJECT_VERSION 1.9.4) set(PROJECT_DESCRIPTION "HF Digital Voice for Radio Amateurs") set(PROJECT_HOMEPAGE_URL "https://freedv.org") @@ -46,7 +46,7 @@ endif(APPLE) # Adds a tag to the end of the version string. Leave empty # for official release builds. -set(FREEDV_VERSION_TAG "") +set(FREEDV_VERSION_TAG "devel") # Prevent in-source builds to protect automake/autoconf config. # If an in-source build is attempted, you will still need to clean up a few diff --git a/USER_MANUAL.md b/USER_MANUAL.md index fdab05f80..93a675268 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -909,6 +909,11 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes # Release Notes +## V1.9.4 TBD 2023 + +1. Bugfixes: + * Fix issue causing hanging while testing serial port PTT. (PR #577) + ## V1.9.3 October 2023 1. Bugfixes: From afe91252a5aed617a2e1128ba9c4c054ac4ac46d Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sun, 22 Oct 2023 15:59:47 -0700 Subject: [PATCH 3/6] Need to trigger connect on Easy Setup as well. --- src/dlg_easy_setup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dlg_easy_setup.cpp b/src/dlg_easy_setup.cpp index 89a824027..4d869bbe3 100644 --- a/src/dlg_easy_setup.cpp +++ b/src/dlg_easy_setup.cpp @@ -853,7 +853,8 @@ void EasySetupDialog::OnTest(wxCommandEvent& event) }; serialPortTestObject_->onRigConnected += [&](IRigController*) { serialPortTestObject_->ptt(true); - }; + }; + serialPortTestObject_->connect(); } // Start playing a sine wave through the radio's device From 5eb50c50996664d5bb6b803ef13a204ef79dc717 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Mon, 23 Oct 2023 10:29:26 -0700 Subject: [PATCH 4/6] Hamlib is hanging as well. --- src/dlg_ptt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dlg_ptt.cpp b/src/dlg_ptt.cpp index 40cb312b5..975c5a1e1 100644 --- a/src/dlg_ptt.cpp +++ b/src/dlg_ptt.cpp @@ -632,6 +632,8 @@ void ComPortsDlg::OnTest(wxCommandEvent& event) { } }; + hamlib->connect(); + std::unique_lock lk(mtx); cv.wait(lk); From 37a7937fcf92c8f7bce7742831394314ebeaab2a Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Mon, 23 Oct 2023 17:42:17 -0700 Subject: [PATCH 5/6] Remove 'Serial Params' row that's no longer filled in. --- src/dlg_ptt.cpp | 7 +------ src/dlg_ptt.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dlg_ptt.cpp b/src/dlg_ptt.cpp index 975c5a1e1..4dcac6bb0 100644 --- a/src/dlg_ptt.cpp +++ b/src/dlg_ptt.cpp @@ -62,7 +62,7 @@ ComPortsDlg::ComPortsDlg(wxWindow* parent, wxWindowID id, const wxString& title, wxStaticBox* hamlibBox = new wxStaticBox(panel, wxID_ANY, _("Hamlib Settings")); wxStaticBoxSizer* staticBoxSizer18 = new wxStaticBoxSizer( hamlibBox, wxHORIZONTAL); - wxGridSizer* gridSizerhl = new wxGridSizer(8, 2, 0, 0); + wxGridSizer* gridSizerhl = new wxGridSizer(7, 2, 0, 0); staticBoxSizer18->Add(gridSizerhl, 1, wxEXPAND|wxALIGN_LEFT, 5); /* Use Hamlib for PTT checkbox. */ @@ -131,11 +131,6 @@ ComPortsDlg::ComPortsDlg(wxWindow* parent, wxWindowID id, const wxString& title, m_cbPttMethod->Append(wxT("DTR")); m_cbPttMethod->Append(wxT("None (RX Only)")); - gridSizerhl->Add(new wxStaticText(hamlibBox, wxID_ANY, _("Serial Params:"), wxDefaultPosition, wxDefaultSize, 0), - 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT, 20); - m_cbSerialParams = new wxStaticText(hamlibBox, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0); - gridSizerhl->Add(m_cbSerialParams, 0, wxALIGN_CENTER_VERTICAL, 0); - mainSizer->Add(staticBoxSizer18, 0, wxEXPAND, 5); //---------------------------------------------------------------------- diff --git a/src/dlg_ptt.h b/src/dlg_ptt.h index a377b1246..2c9b61af5 100644 --- a/src/dlg_ptt.h +++ b/src/dlg_ptt.h @@ -59,7 +59,6 @@ class ComPortsDlg : public wxDialog wxComboBox *m_cbSerialPort; wxComboBox *m_cbPttSerialPort; wxComboBox *m_cbSerialRate; - wxStaticText *m_cbSerialParams; wxStaticText *m_stIcomCIVHex; wxTextCtrl *m_tcIcomCIVHex; wxComboBox *m_cbPttMethod; From 565251260eb0ac2293f916f917d07ca499e69a2e Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Tue, 24 Oct 2023 08:58:41 -0700 Subject: [PATCH 6/6] Fix crash in Easy Setup when stopping test. --- src/dlg_easy_setup.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dlg_easy_setup.cpp b/src/dlg_easy_setup.cpp index 4d869bbe3..fe518e089 100644 --- a/src/dlg_easy_setup.cpp +++ b/src/dlg_easy_setup.cpp @@ -731,12 +731,12 @@ void EasySetupDialog::OnTest(wxCommandEvent& event) txTestAudioDevice_ = nullptr; } - if (hamlibTestObject_->isConnected()) + if (hamlibTestObject_ != nullptr && hamlibTestObject_->isConnected()) { hamlibTestObject_->ptt(false); hamlibTestObject_->disconnect(); } - else if (serialPortTestObject_->isConnected()) + else if (serialPortTestObject_ != nullptr && serialPortTestObject_->isConnected()) { serialPortTestObject_->ptt(false); serialPortTestObject_->disconnect(); @@ -825,10 +825,15 @@ void EasySetupDialog::OnTest(wxCommandEvent& event) } else if (m_ckUseSerialPTT->GetValue()) { - wxString serialPort = m_cbSerialPort->GetValue(); + wxString serialPort = m_cbCtlDevicePath->GetValue(); if (!wxGetApp().CanAccessSerialPort((const char*)serialPort.ToUTF8())) { + CallAfter([&]() { + wxMessageBox( + "Couldn't connect to Radio. Make sure the serial Device and Params match your radio", + wxT("Error"), wxOK | wxICON_ERROR, this); + }); return; }