diff --git a/src/AppFrame.h b/src/AppFrame.h index 481e6c94..71d37b00 100644 --- a/src/AppFrame.h +++ b/src/AppFrame.h @@ -33,6 +33,7 @@ #ifdef USE_HAMLIB +#include class PortSelectorDialog; #endif @@ -297,7 +298,7 @@ class AppFrame: public wxFrame { std::map rigSerialMenuItems; std::map rigModelMenuItems; wxMenu *rigModelMenu; - int rigModel; + rig_model_t rigModel; int rigSerialRate; long long rigSDRIF; std::vector rigSerialRates; @@ -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 \ No newline at end of file +#endif diff --git a/src/rig/RigThread.cpp b/src/rig/RigThread.cpp index f266cdd4..ecb0da96 100644 --- a/src/rig/RigThread.cpp +++ b/src/rig/RigThread.cpp @@ -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; diff --git a/src/rig/RigThread.h b/src/rig/RigThread.h index af65fb92..0ae0f91e 100644 --- a/src/rig/RigThread.h +++ b/src/rig/RigThread.h @@ -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);