Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Hamlib build #1031

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/AppFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@


#ifdef USE_HAMLIB
#include <hamlib/rig.h>
class PortSelectorDialog;
#endif

Expand Down Expand Up @@ -297,7 +298,7 @@ class AppFrame: public wxFrame {
std::map<int, wxMenuItem *> rigSerialMenuItems;
std::map<int, wxMenuItem *> rigModelMenuItems;
wxMenu *rigModelMenu;
int rigModel;
rig_model_t rigModel;
int rigSerialRate;
long long rigSDRIF;
std::vector<int> rigSerialRates;
Expand Down Expand Up @@ -386,4 +387,4 @@ class AppFrame: public wxFrame {
#define wxID_RIG_FOLLOW_MODEM 11906
#define wxID_RIG_SERIAL_BASE 11950
#define wxID_RIG_MODEL_BASE 12000
#endif
#endif
4 changes: 4 additions & 0 deletions src/rig/RigThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ RigList &RigThread::enumerate() {
return RigThread::rigCaps;
}

#ifdef RIGCAPS_NOT_CONST
int RigThread::add_hamlib_rig(struct rig_caps *rc, void* /* f */)
#else
int RigThread::add_hamlib_rig(const struct rig_caps *rc, void* /* f */)
#endif
{
rigCaps.push_back(rc);
return 1;
Expand Down
4 changes: 4 additions & 0 deletions src/rig/RigThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ class RigThread : public IOThread {
std::string getErrorMessage();

static RigList &enumerate();
#ifdef RIGCAPS_NOT_CONST
static int add_hamlib_rig(struct rig_caps *rc, void* f);
#else
static int add_hamlib_rig(const struct rig_caps *rc, void* f);
#endif

protected:
void setErrorStateFromHamlibCode(int errcode);
Expand Down