mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
AudioCATSISO: adapt to newer versions of Hamlib. Fixes #1919
This commit is contained in:
parent
86a1d15eba
commit
bb406ca9a8
@ -17,7 +17,6 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <hamlib/rig.h>
|
|
||||||
#include "audiocatsisohamlib.h"
|
#include "audiocatsisohamlib.h"
|
||||||
|
|
||||||
AudioCATSISOHamlib::AudioCATSISOHamlib()
|
AudioCATSISOHamlib::AudioCATSISOHamlib()
|
||||||
@ -31,7 +30,7 @@ AudioCATSISOHamlib::~AudioCATSISOHamlib()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int AudioCATSISOHamlib::hash_model_list(const struct rig_caps *caps, void *data)
|
int AudioCATSISOHamlib::hash_model_list(HAMLIB_RIG_CAPS *caps, void *data)
|
||||||
{
|
{
|
||||||
AudioCATSISOHamlib *hamlibHandler = (AudioCATSISOHamlib*) data;
|
AudioCATSISOHamlib *hamlibHandler = (AudioCATSISOHamlib*) data;
|
||||||
hamlibHandler->m_rigModels[caps->rig_model] = caps->model_name;
|
hamlibHandler->m_rigModels[caps->rig_model] = caps->model_name;
|
||||||
|
@ -21,8 +21,19 @@
|
|||||||
#define _AUDIOCATSISO_AUDIOCATSISOHAMLIB_H_
|
#define _AUDIOCATSISO_AUDIOCATSISOHAMLIB_H_
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
#include <hamlib/rig.h>
|
||||||
|
|
||||||
struct rig_caps;
|
#ifdef RIGCAPS_NOT_CONST
|
||||||
|
|
||||||
|
/* Since this commit:
|
||||||
|
* https://github.com/Hamlib/Hamlib/commit/ed941939359da9f8734dbdf4a21a9b01622a1a6e
|
||||||
|
* a 'struct rig_caps' is no longer constant (as passed to 'rig_list_foreach()' etc.).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define HAMLIB_RIG_CAPS struct rig_caps
|
||||||
|
#else
|
||||||
|
#define HAMLIB_RIG_CAPS const struct rig_caps
|
||||||
|
#endif
|
||||||
|
|
||||||
class AudioCATSISOHamlib
|
class AudioCATSISOHamlib
|
||||||
{
|
{
|
||||||
@ -36,7 +47,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
QMap<uint32_t, QString> m_rigModels;
|
QMap<uint32_t, QString> m_rigModels;
|
||||||
QMap<QString, uint32_t> m_rigNames;
|
QMap<QString, uint32_t> m_rigNames;
|
||||||
static int hash_model_list(const struct rig_caps *caps, void *data);
|
static int hash_model_list(HAMLIB_RIG_CAPS *caps, void *data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user