kopia lustrzana https://github.com/Hamlib/Hamlib
In rig.c if rig does not set get_split_vfo then return cached values
https://github.com/Hamlib/Hamlib/issues/654 https://github.com/Hamlib/Hamlib/issues/665pull/680/head
rodzic
cfa42f2365
commit
aefe8c44b7
|
@ -1588,6 +1588,8 @@ int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width)
|
|||
unsigned char fw_sub_cmd = RIG_MODEL_IC7200 == rig->caps->rig_model ? 0x02 :
|
||||
S_MEM_FILT_WDTH;
|
||||
|
||||
ENTERFUNC;
|
||||
|
||||
if (RIG_PASSBAND_NOCHANGE == width)
|
||||
{
|
||||
RETURNFUNC(RIG_OK);
|
||||
|
@ -1686,7 +1688,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
|| rig->caps->rig_model == RIG_MODEL_IC9700
|
||||
|| rig->caps->rig_model == RIG_MODEL_IC705;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
ENTERFUNC;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
|
|
11
src/rig.c
11
src/rig.c
|
@ -2490,6 +2490,10 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
|
|||
|
||||
ENTERFUNC;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
|
||||
if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s ********************** called vfo=%s\n", __func__, rig_strvfo(vfo));
|
||||
}
|
||||
|
||||
if (CHECK_RIG_ARG(rig))
|
||||
{
|
||||
|
@ -4343,6 +4347,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig,
|
|||
|
||||
if (!split || !tx_vfo)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: split or tx_vfo is null, split=%p, tx_vfo=%p\n", __func__, split, tx_vfo);
|
||||
RETURNFUNC(-RIG_EINVAL);
|
||||
}
|
||||
|
||||
|
@ -4350,7 +4355,11 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig,
|
|||
|
||||
if (caps->get_split_vfo == NULL)
|
||||
{
|
||||
RETURNFUNC(-RIG_ENAVAIL);
|
||||
// if we can't get the vfo we will return whatever we have cached
|
||||
*split = rig->state.cache.split;
|
||||
*tx_vfo = rig->state.cache.split_vfo;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: no get_split_vfo so returning split=%d, tx_vfo=%s\n", __func__, *split, rig_strvfo(*tx_vfo));
|
||||
RETURNFUNC(RIG_OK);
|
||||
}
|
||||
|
||||
cache_ms = elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_GET);
|
||||
|
|
Ładowanie…
Reference in New Issue