kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
c5b4a18cf5
|
@ -141,6 +141,7 @@
|
|||
%ignore rig_mW2power;
|
||||
%ignore rig_get_resolution;
|
||||
%ignore rig_set_level;
|
||||
%ignore rig_set_ext_level;
|
||||
%ignore rig_get_level;
|
||||
%ignore rig_set_parm;
|
||||
%ignore rig_get_parm;
|
||||
|
@ -212,6 +213,7 @@
|
|||
|
||||
#ifdef SWIGLUA
|
||||
%ignore Rig::set_level(setting_t,int,vfo_t);
|
||||
%ignore Rig::set_ext_level(setting_t,value_t,vfo_t);
|
||||
%ignore Rig::set_level(char const *,int,vfo_t);
|
||||
%ignore Rig::set_parm(setting_t,int);
|
||||
%ignore Rig::set_parm(char const *,int);
|
||||
|
|
|
@ -68,6 +68,8 @@ typedef channel_t * const_channel_t_p;
|
|||
{ self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2); }
|
||||
#define METHOD3(f, t1) void f ( vfo_t vfo, t1 _##t1) \
|
||||
{ self->error_status = rig_##f(self->rig _VFO_ARG, _##t1); }
|
||||
#define METHOD3_INIT(f, t1, t2, t3, i3) void f (t1 _##t1##_1, t2 _##t2##_2, t3 _##t3##_3 = i3 _VFO_DECL) \
|
||||
{ self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2, _##t3##_3); }
|
||||
/*
|
||||
* declare wrapper method with one output argument besides RIG* (no target vfo)
|
||||
*/
|
||||
|
@ -340,12 +342,14 @@ typedef channel_t * const_channel_t_p;
|
|||
METHOD1(set_dcs_sql, tone_t)
|
||||
METHOD3(set_split_freq, freq_t)
|
||||
METHOD2_INIT(set_split_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL)
|
||||
METHOD3_INIT(set_split_freq_mode, freq_t, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL)
|
||||
METHOD2(set_split_vfo, split_t, vfo_t)
|
||||
METHOD3(set_rit, shortfreq_t)
|
||||
METHOD3(set_xit, shortfreq_t)
|
||||
METHOD3(set_ts, shortfreq_t)
|
||||
METHOD2(set_ant, ant_t, value_t)
|
||||
METHOD2(set_func, setting_t, int)
|
||||
METHOD2(set_ext_func, token_t, int)
|
||||
METHOD3(set_bank, int)
|
||||
METHOD3(set_mem, int)
|
||||
METHOD3(send_dtmf, const_char_string)
|
||||
|
@ -375,7 +379,7 @@ typedef channel_t * const_channel_t_p;
|
|||
METHOD1(set_vfo, vfo_t) /* particular case */
|
||||
METHOD1(set_powerstat, powerstat_t)
|
||||
METHOD1(set_trn, int)
|
||||
METHOD1(has_set_level, setting_t)
|
||||
METHOD1(has_get_level, setting_t)
|
||||
METHOD1(has_set_parm, setting_t)
|
||||
METHOD1(has_set_func, setting_t)
|
||||
METHOD1(reset, reset_t)
|
||||
|
@ -436,15 +440,11 @@ typedef channel_t * const_channel_t_p;
|
|||
METHOD1VGET(get_rit, shortfreq_t)
|
||||
METHOD1VGET(get_xit, shortfreq_t)
|
||||
METHOD1VGET(get_ts, shortfreq_t)
|
||||
extern void get_ant(value_t * OUTPUT, ant_t * OUTPUT, ant_t ant, vfo_t vfo = RIG_VFO_CURR);
|
||||
extern void get_ant(ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value_t * OUTPUT, ant_t ant, vfo_t vfo = RIG_VFO_CURR);
|
||||
METHOD1VGET(get_mem, int)
|
||||
METHOD1GET(get_powerstat, powerstat_t)
|
||||
METHOD1GET(get_trn, int)
|
||||
|
||||
METHOD1VGET(get_dcd, dcd_t)
|
||||
|
||||
//METHOD2GET(get_ext_parm, token_t, value_t)
|
||||
|
||||
METHOD1VGET(get_dcd, dcd_t)
|
||||
|
||||
int mem_count(void) {
|
||||
return rig_mem_count(self->rig);
|
||||
|
@ -528,7 +528,11 @@ typedef channel_t * const_channel_t_p;
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
int get_ext_func(token_t func, vfo_t vfo = RIG_VFO_CURR) {
|
||||
int status;
|
||||
self->error_status = rig_get_ext_func(self->rig, vfo, func, &status);
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifndef SWIGJAVA
|
||||
/* TODO */
|
||||
|
@ -537,15 +541,33 @@ typedef channel_t * const_channel_t_p;
|
|||
//if (RIG_LEVEL_IS_FLOAT(level))
|
||||
/* TODO: dynamic casting */
|
||||
}
|
||||
|
||||
void get_ext_level(token_t token, vfo_t vfo = RIG_VFO_CURR)
|
||||
{ value_t val; self->error_status = rig_get_level(self->rig, vfo, token, &val);
|
||||
//if (RIG_LEVEL_IS_FLOAT(level))
|
||||
/* TODO: dynamic casting */
|
||||
}
|
||||
|
||||
void get_parm(setting_t parm)
|
||||
{ value_t val; self->error_status = rig_get_parm(self->rig, parm, &val);
|
||||
//if (RIG_LEVEL_IS_FLOAT(parm))
|
||||
/* TODO: dynamic casting */
|
||||
}
|
||||
|
||||
void get_ext_parm(token_t parm)
|
||||
{ value_t val; self->error_status = rig_get_parm(self->rig, parm, &val);
|
||||
//if (RIG_LEVEL_IS_FLOAT(parm))
|
||||
/* TODO: dynamic casting */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* TODO also: get_parm */
|
||||
};
|
||||
|
||||
%{
|
||||
|
||||
/*
|
||||
* these ones returns 2 values, here is a perl example:
|
||||
* these ones return 2 values, here is a perl example:
|
||||
* ($mode, $width) = $rig->get_mode();
|
||||
*/
|
||||
void Rig_get_mode(Rig *self, rmode_t *mode, pbwidth_t *width, vfo_t vfo)
|
||||
|
@ -558,9 +580,21 @@ void Rig_get_split_mode(Rig *self, rmode_t *mode, pbwidth_t *width, vfo_t vfo)
|
|||
self->error_status = rig_get_split_mode(self->rig, vfo, mode, width);
|
||||
}
|
||||
|
||||
void Rig_get_ant(Rig *self, value_t *option, ant_t *ant_curr, ant_t ant, vfo_t vfo)
|
||||
/*
|
||||
* these ones return 3 values
|
||||
*/
|
||||
void Rig_get_split_freq_mode(Rig *self, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width)
|
||||
{
|
||||
self->error_status = rig_get_ant(self->rig, vfo, ant, ant_curr, option);
|
||||
self->error_status = rig_get_split_freq_mode(self->rig, vfo, tx_freq, tx_mode, tx_width);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* these ones return 4 values
|
||||
*/
|
||||
void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value_t *option, ant_t ant, vfo_t vfo)
|
||||
{
|
||||
self->error_status = rig_get_ant(self->rig, vfo, ant, option, ant_curr, ant_tx, ant_rx);
|
||||
}
|
||||
|
||||
struct channel *Rig_get_chan_all(Rig *self)
|
||||
|
|
|
@ -616,7 +616,7 @@ AM_CONDITIONAL([ENABLE_LUA], [test x"${cf_with_lua_binding}" = "xyes"])
|
|||
dnl Only search for Swig if one or more bindings are enabled.
|
||||
AS_IF([test "x${BINDING_ALL}" != "x"],
|
||||
[# macros/ax_pkg_swig.m4
|
||||
AX_PKG_SWIG([1.3.22],
|
||||
AX_PKG_SWIG([3.0.12],
|
||||
[BINDINGS="${BINDINGS} bindings"
|
||||
cf_with_bindings="yes"],
|
||||
[AC_MSG_ERROR([SWIG is required to build bindings...])
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
#serial 11
|
||||
|
||||
AC_DEFUN([AX_PKG_SWIG],[
|
||||
# Ubuntu has swig 2.0 as /usr/bin/swig2.0
|
||||
AC_PATH_PROGS([SWIG],[swig swig2.0])
|
||||
# Ubuntu has swig 3.0 as /usr/bin/swig3.0
|
||||
AC_PATH_PROGS([SWIG],[swig swig3.0])
|
||||
if test -z "$SWIG" ; then
|
||||
m4_ifval([$3],[$3],[:])
|
||||
elif test -n "$1" ; then
|
||||
|
|
|
@ -3344,7 +3344,7 @@ int kenwood_get_trn(RIG *rig, int *trn)
|
|||
*/
|
||||
int kenwood_set_powerstat(RIG *rig, powerstat_t status)
|
||||
{
|
||||
int retval = kenwood_transaction(rig, (status == RIG_POWER_ON) ? "PS1" : "PS0",
|
||||
int retval = kenwood_transaction(rig, (status == RIG_POWER_ON) ? ";;;;PS1;" : "PS0",
|
||||
NULL, 0);
|
||||
int i = 0;
|
||||
int retry = 3 / rig->state.rigport.retry;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
#include "token.h"
|
||||
|
||||
#define BACKEND_VER "1.5"
|
||||
#define BACKEND_VER "1.6"
|
||||
|
||||
#define EOM_KEN ';'
|
||||
#define EOM_TH '\r'
|
||||
|
|
|
@ -479,7 +479,7 @@ const struct rig_caps ts480_caps =
|
|||
RIG_MODEL(RIG_MODEL_TS480),
|
||||
.model_name = "TS-480",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = BACKEND_VER ".5",
|
||||
.version = BACKEND_VER ".6",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -589,6 +589,7 @@ const struct rig_caps ts480_caps =
|
|||
},
|
||||
.priv = (void *)& ts480_priv_caps,
|
||||
.rig_init = kenwood_init,
|
||||
.rig_open = kenwood_open,
|
||||
.rig_cleanup = kenwood_cleanup,
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
|
|
|
@ -365,6 +365,7 @@ static int generic_save_channel(RIG *rig, channel_t *chan)
|
|||
const channel_cap_t *mem_cap = NULL;
|
||||
value_t vdummy;
|
||||
|
||||
vdummy.i = 0;
|
||||
chan_num = chan->channel_num;
|
||||
vfo = chan->vfo;
|
||||
memset(chan, 0, sizeof(channel_t));
|
||||
|
|
Ładowanie…
Reference in New Issue