kopia lustrzana https://github.com/Hamlib/Hamlib
rig_set_mode for non-targetable rigs will only set mode on VFOB once per run unless mode is changed
This allows subsequent rig_set_mode to execute quickly without any VFO juggling If user twiddles with VFOB mode they are on their own https://github.com/Hamlib/Hamlib/issues/872Hamlib-4.4
rodzic
3fb9f50003
commit
238e17b736
10
src/rig.c
10
src/rig.c
|
@ -2354,8 +2354,8 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
|
||||
ELAPSED1;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__,
|
||||
rig_strvfo(vfo), rig_strrmode(mode), (int)width);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%dm, curr_vfo=%s\n", __func__,
|
||||
rig_strvfo(vfo), rig_strrmode(mode), (int)width, rig_strvfo(rig->state.current_vfo));
|
||||
|
||||
if (CHECK_RIG_ARG(rig))
|
||||
{
|
||||
|
@ -2392,6 +2392,12 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
int rc2;
|
||||
vfo_t curr_vfo;
|
||||
|
||||
// if not a targetable rig we will only set mode on VFOB if it is changing
|
||||
if (rig->state.cache.modeMainB == mode)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: VFOB mode not changing so ignoring\n", __func__);
|
||||
return(RIG_OK);
|
||||
}
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: not targetable need vfo swap\n", __func__);
|
||||
|
||||
if (!caps->set_vfo)
|
||||
|
|
Ładowanie…
Reference in New Issue