kopia lustrzana https://github.com/Hamlib/Hamlib
Update vfo_fixup to change VFO_A to Main and VFO_B to Sub as appropriate
https://github.com/Hamlib/Hamlib/issues/654pull/668/head
rodzic
2f2322068e
commit
fa582b17c1
15
src/misc.c
15
src/misc.c
|
@ -1629,7 +1629,9 @@ int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection,
|
||||||
return RIG_OK;
|
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)
|
vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(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
|
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;
|
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_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;
|
int retval;
|
||||||
split_t split = 0;
|
split_t split = 0;
|
||||||
|
@ -1877,7 +1879,7 @@ const char *HAMLIB_API rot_strstatus(rot_status_t status)
|
||||||
* \param RIG* and rig_function_e
|
* \param RIG* and rig_function_e
|
||||||
* \return the corresponding function pointer
|
* \return the corresponding function pointer
|
||||||
*/
|
*/
|
||||||
void * HAMLIB_API rig_get_function_ptr(rig_model_t rig_model,
|
void *HAMLIB_API rig_get_function_ptr(rig_model_t rig_model,
|
||||||
enum rig_function_e rig_function)
|
enum rig_function_e rig_function)
|
||||||
{
|
{
|
||||||
const struct rig_caps *caps = rig_get_caps(rig_model);
|
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
|
* \param RIG* and rig_caps_int_e
|
||||||
* \return the corresponding long value -- -RIG_EINVAL is the only error possible
|
* \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);
|
const struct rig_caps *caps = rig_get_caps(rig_model);
|
||||||
|
|
||||||
|
@ -2177,7 +2180,7 @@ 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,
|
const char *HAMLIB_API rig_get_caps_cptr(rig_model_t rig_model,
|
||||||
enum rig_caps_cptr_e rig_caps)
|
enum rig_caps_cptr_e rig_caps)
|
||||||
{
|
{
|
||||||
const struct rig_caps *caps = rig_get_caps(rig_model);
|
const struct rig_caps *caps = rig_get_caps(rig_model);
|
||||||
|
|
Ładowanie…
Reference in New Issue