From af26981fde583a6662b9310a66c5d5972a284c04 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Sun, 22 Oct 2023 16:23:31 -0700 Subject: [PATCH 1/5] Fix compiler error on some Linux installations. --- src/rig_control/HamlibRigController.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/rig_control/HamlibRigController.cpp b/src/rig_control/HamlibRigController.cpp index 8b7560180..fb7f5ae5e 100644 --- a/src/rig_control/HamlibRigController.cpp +++ b/src/rig_control/HamlibRigController.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "HamlibRigController.h" @@ -64,10 +65,10 @@ HamlibRigController::HamlibRigController(std::string rigName, std::string serial , multipleVfos_(false) , pttSet_(false) , currFreq_(0) - , currMode_(0) + , currMode_(RIG_MODE_NONE) , restoreOnDisconnect_(restoreFreqModeOnDisconnect) , origFreq_(0) - , origMode_(0) + , origMode_(RIG_MODE_NONE) { // Perform initial load of rig list if this is our first time being created. InitializeHamlibLibrary(); @@ -83,9 +84,11 @@ HamlibRigController::HamlibRigController(int rigIndex, std::string serialPort, c , rig_(nullptr) , multipleVfos_(false) , pttSet_(false) + , currFreq_(0) + , currMode_(RIG_MODE_NONE) , restoreOnDisconnect_(restoreFreqModeOnDisconnect) , origFreq_(0) - , origMode_(0) + , origMode_(RIG_MODE_NONE) { // Perform initial load of rig list if this is our first time being created. InitializeHamlibLibrary(); @@ -220,7 +223,7 @@ void HamlibRigController::connectImpl_() /* Initialise, configure and open. */ origFreq_ = 0; - origMode_ = 0; + origMode_ = RIG_MODE_NONE; rig_ = rig_init(RigList_[rigIndex]->rig_model); if (!rig_) @@ -327,7 +330,7 @@ void HamlibRigController::disconnectImpl_() } origFreq_ = 0; - origMode_ = 0; + origMode_ = RIG_MODE_NONE; rig_close(rig_); rig_cleanup(rig_); From 535c14770e217c5daec3d358baab092caa57bea0 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Tue, 24 Oct 2023 21:53:52 -0700 Subject: [PATCH 2/5] Fix compile error in PulseAudio code. --- src/audio/PulseAudioEngine.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/audio/PulseAudioEngine.cpp b/src/audio/PulseAudioEngine.cpp index 43f4ed31c..4c9afe7db 100644 --- a/src/audio/PulseAudioEngine.cpp +++ b/src/audio/PulseAudioEngine.cpp @@ -145,9 +145,8 @@ struct PulseAudioDeviceListTemp std::vector PulseAudioEngine::getAudioDeviceList(AudioDirection direction) { - PulseAudioDeviceListTemp tempObj = { - .thisPtr = this - }; + PulseAudioDeviceListTemp tempObj; + tempObj.thisPtr = this; pa_operation* op = nullptr; @@ -231,9 +230,8 @@ struct PaDefaultAudioDeviceTemp AudioDeviceSpecification PulseAudioEngine::getDefaultAudioDevice(AudioDirection direction) { - PaDefaultAudioDeviceTemp tempData = { - .mainloop = mainloop_ - }; + PaDefaultAudioDeviceTemp tempData; + tempData.mainloop = mainloop_; pa_threaded_mainloop_lock(mainloop_); auto op = pa_context_get_server_info(context_, [](pa_context *c, const pa_server_info *i, void *userdata) { From 9bd661b2d34b6cbe22c82267189274713f975379 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Tue, 24 Oct 2023 21:54:45 -0700 Subject: [PATCH 3/5] Add additional missed header. --- src/rig_control/HamlibRigController.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rig_control/HamlibRigController.cpp b/src/rig_control/HamlibRigController.cpp index fb7f5ae5e..37667c053 100644 --- a/src/rig_control/HamlibRigController.cpp +++ b/src/rig_control/HamlibRigController.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "HamlibRigController.h" @@ -673,4 +674,4 @@ void HamlibRigController::setModeHelper_(vfo_t currVfo, rmode_t mode) currMode_ = mode; requestCurrentFrequencyMode(); } -} \ No newline at end of file +} From 7cb2407fe31814368febda0fccde5290e5243d91 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Tue, 24 Oct 2023 21:56:01 -0700 Subject: [PATCH 4/5] Oops, should be cstring instead. --- src/rig_control/HamlibRigController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rig_control/HamlibRigController.cpp b/src/rig_control/HamlibRigController.cpp index 37667c053..aa1fedb09 100644 --- a/src/rig_control/HamlibRigController.cpp +++ b/src/rig_control/HamlibRigController.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "HamlibRigController.h" From 971b8906cd8aec0457155dafd17e5d2bf8a7028a Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Tue, 24 Oct 2023 22:11:24 -0700 Subject: [PATCH 5/5] Add PR #578 to changelog. --- USER_MANUAL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USER_MANUAL.md b/USER_MANUAL.md index 8408c0e7c..2fde4fe60 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -914,6 +914,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes 1. Bugfixes: * Fix issue causing hanging while testing serial port PTT. (PR #577) * Fix issue causing improper RX Only reporting when hamlib is disabled. (PR #579) + * Fix compiler error on some Linux installations. (PR #578) ## V1.9.3 October 2023