[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. fa582b17c11119a6864e8
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-04-13 13:20:48
|
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 fa582b17c11119a6864e8a10ab140e29374ed273 (commit) from 2f2322068e308ce704e8359571047cc2afe80b93 (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 fa582b17c11119a6864e8a10ab140e29374ed273 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 13 08:19:48 2021 -0500 Update vfo_fixup to change VFO_A to Main and VFO_B to Sub as appropriate https://github.com/Hamlib/Hamlib/issues/654 diff --git a/src/misc.c b/src/misc.c index bf841e3a..1bf9b475 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1629,7 +1629,9 @@ int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, return RIG_OK; } - +// we're mappping our VFO here to work with either VFO A/B rigs or Main/Sub +// Hamlib uses VFO_A and VFO_B as TX/RX as of 2021-04-13 +// So we map these to Main/Sub as required vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo) { rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); @@ -1640,7 +1642,7 @@ vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo) return vfo; // don't modify vfo for RIG_VFO_CURR } - if (vfo == RIG_VFO_RX) + if (vfo == RIG_VFO_RX || vfo == RIG_VFO_A) { vfo = RIG_VFO_A; @@ -1649,7 +1651,7 @@ vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo) if (VFO_HAS_MAIN_SUB_A_B_ONLY) { vfo = RIG_VFO_MAIN; } } - if (vfo == RIG_VFO_TX) + else if (vfo == RIG_VFO_TX || RIG_VFO_B) { int retval; split_t split = 0; @@ -1877,8 +1879,8 @@ const char *HAMLIB_API rot_strstatus(rot_status_t status) * \param RIG* and rig_function_e * \return the corresponding function pointer */ -void * HAMLIB_API rig_get_function_ptr(rig_model_t rig_model, - enum rig_function_e rig_function) +void *HAMLIB_API rig_get_function_ptr(rig_model_t rig_model, + enum rig_function_e rig_function) { const struct rig_caps *caps = rig_get_caps(rig_model); @@ -2150,7 +2152,8 @@ void * HAMLIB_API rig_get_function_ptr(rig_model_t rig_model, * \param RIG* and rig_caps_int_e * \return the corresponding long value -- -RIG_EINVAL is the only error possible */ -long long HAMLIB_API rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps) +long long HAMLIB_API rig_get_caps_int(rig_model_t rig_model, + enum rig_caps_int_e rig_caps) { const struct rig_caps *caps = rig_get_caps(rig_model); @@ -2177,8 +2180,8 @@ long long HAMLIB_API rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e } } -const char * HAMLIB_API rig_get_caps_cptr(rig_model_t rig_model, - enum rig_caps_cptr_e rig_caps) +const char *HAMLIB_API rig_get_caps_cptr(rig_model_t rig_model, + enum rig_caps_cptr_e rig_caps) { const struct rig_caps *caps = rig_get_caps(rig_model); ----------------------------------------------------------------------- Summary of changes: src/misc.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |