[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 0f0705d014d4e400761bd
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-03-09 05:30:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 0f0705d014d4e400761bd5d275e7c9ab1b374380 (commit) via 5bebf5ad45cec1a4074d342b7190290066530f8c (commit) from c13624add0f0dcaffa55a99cb55695bcb8ab68fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0f0705d014d4e400761bd5d275e7c9ab1b374380 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Mar 8 23:26:44 2021 -0600 Fix python binding for future deprecation of distutils.sysconfig Hopefully works on MacOS Also hopefully works on python2 https://github.com/Hamlib/Hamlib/issues/477 diff --git a/bindings/Makefile.am b/bindings/Makefile.am index b01407a8..5e4f81f7 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -3,7 +3,7 @@ # more information on swig at http://www.swig.org # -AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/bindings $(PYTHON_CPPFLAGS) \ +AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/bindings \ $(TCL_INCLUDE_SPEC) AM_CFLAGS = -fno-strict-aliasing diff --git a/bindings/ignore.swg b/bindings/ignore.swg index abc48022..37d6c96d 100644 --- a/bindings/ignore.swg +++ b/bindings/ignore.swg @@ -194,6 +194,7 @@ %ignore rig_passband_normal; %ignore rig_passband_narrow; %ignore rig_passband_wide; +%ignore rig_get_vfo_info; %ignore rot_open; %ignore rot_close; diff --git a/bindings/py3test.py b/bindings/py3test.py index 1c8d2789..5a31cd1b 100755 --- a/bindings/py3test.py +++ b/bindings/py3test.py @@ -39,7 +39,7 @@ def StartUp(): print("freq:\t\t\t%s" % my_rig.get_freq()) my_rig.set_freq(Hamlib.RIG_VFO_A, 145550000) - (mode, width) = my_rig.get_mode() + (mode, width) = my_rig.get_mode(Hamlib.RIG_VFO_A) print("mode:\t\t\t%s\nbandwidth:\t\t%s" % (Hamlib.rig_strrmode(mode), width)) @@ -83,6 +83,9 @@ def StartUp(): print("get_channel status:\t%s" % my_rig.error_status) print("VFO:\t\t\t%s, %s" % (Hamlib.rig_strvfo(chan.vfo), chan.freq)) print("Attenuators:\t\t%s" % my_rig.caps.attenuator) + # Can't seem to get get_vfo_info to work + #(freq, width, mode, split) = my_rig.get_vfo_info(Hamlib.RIG_VFO_A,freq,width,mode,split) + #print("Rig vfo_info:\t\tfreq=%s, mode=%s, width=%s, split=%s" % (freq, mode, width, split)) print("\nSending Morse, '73'") my_rig.send_morse(Hamlib.RIG_VFO_A, "73") diff --git a/bindings/rig.swg b/bindings/rig.swg index 19f5be1d..0d1c05fd 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -70,6 +70,10 @@ typedef channel_t * const_channel_t_p; { 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); } +#define METHOD4(f, t1) void f ( vfo_t vfo, t1 _##t1) \ + { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1); } +#define METHOD4_INIT(f, t1, t2, t3, t4, i4) void f (t1 _##t1##_1, t2 _##t2##_2, t3 _##t3##_3, ##t4##_4 = i4 _VFO_DECL) \ + { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2, _##t3##_3 _##t4##_4); } /* * declare wrapper method with one output argument besides RIG* (no target vfo) */ @@ -445,6 +449,7 @@ typedef channel_t * const_channel_t_p; METHOD1VGET(get_xit, shortfreq_t) METHOD1VGET(get_ts, shortfreq_t) 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); + extern void get_vfo_info (split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo = RIG_VFO_CURR); METHOD1VGET(get_mem, int) METHOD1GET(get_powerstat, powerstat_t) METHOD1GET(get_trn, int) @@ -600,6 +605,11 @@ void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value { self->error_status = rig_get_ant(self->rig, vfo, ant, option, ant_curr, ant_tx, ant_rx); } +void Rig_get_vfo_info (Rig *self, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo) +{ + self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split); +} + struct channel *Rig_get_chan_all(Rig *self) { @@ -618,4 +628,5 @@ struct channel *Rig_get_chan_all(Rig *self) return chans; } + %} diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 5a892f73..17173886 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2339,11 +2339,9 @@ extern HAMLIB_EXPORT(int) rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo)); -#if 0 extern HAMLIB_EXPORT(int) rig_get_vfo_info HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split)); -#endif extern HAMLIB_EXPORT(int) rig_get_vfo_list HAMLIB_PARAMS((RIG *rig, char *buf, int buflen)); commit 5bebf5ad45cec1a4074d342b7190290066530f8c Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Mar 8 23:25:37 2021 -0600 Update flrig.h version diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index cb8908e5..78eec490 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210306" +#define BACKEND_VER "20210308" #define EOM "\r" #define TRUE 1 ----------------------------------------------------------------------- Summary of changes: bindings/Makefile.am | 2 +- bindings/ignore.swg | 1 + bindings/py3test.py | 5 ++++- bindings/rig.swg | 11 +++++++++++ include/hamlib/rig.h | 2 -- rigs/dummy/flrig.h | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |