mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-25 21:28:38 -05:00
Fix Hamlib build to work with older and newer hamlib/rig.h by using RIGCAPS_NOT_CONST flag
Change rig_model to standard type from rig.h
This commit is contained in:
parent
033330367c
commit
c29279d59d
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef USE_HAMLIB
|
#ifdef USE_HAMLIB
|
||||||
|
#include <hamlib/rig.h>
|
||||||
class PortSelectorDialog;
|
class PortSelectorDialog;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -297,7 +298,7 @@ private:
|
|||||||
std::map<int, wxMenuItem *> rigSerialMenuItems;
|
std::map<int, wxMenuItem *> rigSerialMenuItems;
|
||||||
std::map<int, wxMenuItem *> rigModelMenuItems;
|
std::map<int, wxMenuItem *> rigModelMenuItems;
|
||||||
wxMenu *rigModelMenu;
|
wxMenu *rigModelMenu;
|
||||||
int rigModel;
|
rig_model_t rigModel;
|
||||||
int rigSerialRate;
|
int rigSerialRate;
|
||||||
long long rigSDRIF;
|
long long rigSDRIF;
|
||||||
std::vector<int> rigSerialRates;
|
std::vector<int> rigSerialRates;
|
||||||
|
@ -32,7 +32,11 @@ RigList &RigThread::enumerate() {
|
|||||||
return RigThread::rigCaps;
|
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 */)
|
int RigThread::add_hamlib_rig(const struct rig_caps *rc, void* /* f */)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
rigCaps.push_back(rc);
|
rigCaps.push_back(rc);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -50,7 +50,11 @@ public:
|
|||||||
std::string getErrorMessage();
|
std::string getErrorMessage();
|
||||||
|
|
||||||
static RigList &enumerate();
|
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);
|
static int add_hamlib_rig(const struct rig_caps *rc, void* f);
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setErrorStateFromHamlibCode(int errcode);
|
void setErrorStateFromHamlibCode(int errcode);
|
||||||
|
Loading…
Reference in New Issue
Block a user