Skip to content

Commit

Permalink
Merge pull request #578 from drowe67/ms-hamlib-compile-error
Browse files Browse the repository at this point in the history
Fix compiler error on some Linux installations.
  • Loading branch information
tmiw authored Oct 25, 2023
2 parents 20a0746 + 971b890 commit e32fb9d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 4 additions & 6 deletions src/audio/PulseAudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ struct PulseAudioDeviceListTemp

std::vector<AudioDeviceSpecification> PulseAudioEngine::getAudioDeviceList(AudioDirection direction)
{
PulseAudioDeviceListTemp tempObj = {
.thisPtr = this
};
PulseAudioDeviceListTemp tempObj;
tempObj.thisPtr = this;

pa_operation* op = nullptr;

Expand Down Expand Up @@ -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) {
Expand Down
16 changes: 10 additions & 6 deletions src/rig_control/HamlibRigController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <functional>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <strings.h>

#include "HamlibRigController.h"

Expand Down Expand Up @@ -64,10 +66,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();
Expand All @@ -83,9 +85,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();
Expand Down Expand Up @@ -220,7 +224,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_)
Expand Down Expand Up @@ -327,7 +331,7 @@ void HamlibRigController::disconnectImpl_()
}

origFreq_ = 0;
origMode_ = 0;
origMode_ = RIG_MODE_NONE;

rig_close(rig_);
rig_cleanup(rig_);
Expand Down Expand Up @@ -670,4 +674,4 @@ void HamlibRigController::setModeHelper_(vfo_t currVfo, rmode_t mode)
currMode_ = mode;
requestCurrentFrequencyMode();
}
}
}

0 comments on commit e32fb9d

Please sign in to comment.