[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 59dcb2e9b6f3f38c0749c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-03-09 06:01:52
|
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 59dcb2e9b6f3f38c0749c425a36a58db07413268 (commit) from 3b7760e4d20712315ed65789f80ab73fb8262256 (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 59dcb2e9b6f3f38c0749c425a36a58db07413268 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Mar 9 00:01:05 2021 -0600 Remove RIG_TARGETABLE_PURE as it was not referenced in any rig https://github.com/Hamlib/Hamlib/issues/414 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 17173886..969f77b7 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -468,7 +468,6 @@ typedef unsigned int vfo_t; /* * targetable bitfields, for internal use. - * RIG_TARGETABLE_PURE means a pure targetable radio on every command * In rig.c lack of a flag will case a VFO change if needed * So setting this flag will mean the backend handles any VFO needs * For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping @@ -477,7 +476,7 @@ typedef unsigned int vfo_t; #define RIG_TARGETABLE_NONE 0 #define RIG_TARGETABLE_FREQ (1<<0) #define RIG_TARGETABLE_MODE (1<<1) -#define RIG_TARGETABLE_PURE (1<<2) +//#define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it #define RIG_TARGETABLE_TONE (1<<3) #define RIG_TARGETABLE_FUNC (1<<4) #define RIG_TARGETABLE_LEVEL (1<<5) diff --git a/src/rig.c b/src/rig.c index e0c9d57d..245fec3d 100644 --- a/src/rig.c +++ b/src/rig.c @@ -3007,9 +3007,8 @@ int HAMLIB_API rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) RETURNFUNC(-RIG_ENIMPL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->get_dcd(rig, vfo, dcd)); } @@ -3109,9 +3108,8 @@ int HAMLIB_API rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->set_rptr_shift(rig, vfo, rptr_shift)); } @@ -3177,9 +3175,8 @@ int HAMLIB_API rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->get_rptr_shift(rig, vfo, rptr_shift)); } @@ -3245,9 +3242,8 @@ int HAMLIB_API rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->set_rptr_offs(rig, vfo, rptr_offs)); } @@ -3313,9 +3309,8 @@ int HAMLIB_API rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->get_rptr_offs(rig, vfo, rptr_offs)); } @@ -3378,8 +3373,7 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) caps = rig->caps; if (caps->set_split_freq - && ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR + && (vfo == RIG_VFO_CURR || vfo == RIG_VFO_TX || vfo == rig->state.current_vfo)) { @@ -3508,8 +3502,7 @@ int HAMLIB_API rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) caps = rig->caps; if (caps->get_split_freq - && ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR + && (vfo == RIG_VFO_CURR || vfo == RIG_VFO_TX || vfo == rig->state.current_vfo)) { @@ -3637,8 +3630,7 @@ int HAMLIB_API rig_set_split_mode(RIG *rig, caps = rig->caps; if (caps->set_split_mode - && ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR + && (vfo == RIG_VFO_CURR || vfo == RIG_VFO_TX || vfo == rig->state.current_vfo)) { @@ -3747,8 +3739,7 @@ int HAMLIB_API rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, caps = rig->caps; if (caps->get_split_mode - && ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR + && (vfo == RIG_VFO_CURR || vfo == RIG_VFO_TX || vfo == rig->state.current_vfo)) { @@ -4006,9 +3997,8 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig, vfo = vfo_fixup(rig, vfo); - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { retcode = caps->set_split_vfo(rig, vfo, split, tx_vfo); @@ -4122,9 +4112,8 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig, /* overridden by backend at will */ *tx_vfo = rig->state.tx_vfo; - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { retcode = caps->get_split_vfo(rig, vfo, split, tx_vfo); rig->state.cache.split = *split; @@ -4479,9 +4468,8 @@ int HAMLIB_API rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->set_ts(rig, vfo, ts)); } @@ -4547,9 +4535,8 @@ int HAMLIB_API rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->get_ts(rig, vfo, ts)); } @@ -5117,9 +5104,8 @@ int HAMLIB_API rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->vfo_op(rig, vfo, op)); } @@ -5217,9 +5203,8 @@ int HAMLIB_API rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->scan(rig, vfo, scan, ch)); } @@ -5285,9 +5270,8 @@ int HAMLIB_API rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->send_dtmf(rig, vfo, digits)); } @@ -5354,9 +5338,8 @@ int HAMLIB_API rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->recv_dtmf(rig, vfo, digits, length)); } @@ -5422,9 +5405,8 @@ int HAMLIB_API rig_send_morse(RIG *rig, vfo_t vfo, const char *msg) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->send_morse(rig, vfo, msg)); } @@ -5481,9 +5463,8 @@ int HAMLIB_API rig_stop_morse(RIG *rig, vfo_t vfo) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->stop_morse(rig, vfo)); } @@ -5572,9 +5553,8 @@ int HAMLIB_API rig_wait_morse(RIG *rig, vfo_t vfo) ENTERFUNC; caps = rig->caps; - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(wait_morse_ptt(rig, vfo)); } @@ -5640,9 +5620,8 @@ int HAMLIB_API rig_send_voice_mem(RIG *rig, vfo_t vfo, int ch) RETURNFUNC(-RIG_ENAVAIL); } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) - || vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo) + if (vfo == RIG_VFO_CURR + || vfo == rig->state.current_vfo) { RETURNFUNC(caps->send_voice_mem(rig, vfo, ch)); } ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 3 +- src/rig.c | 97 ++++++++++++++++++++-------------------------------- 2 files changed, 39 insertions(+), 61 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |