kopia lustrzana https://github.com/Hamlib/Hamlib
When vfo twiddling is being done set_freq calls will be skipped
https://github.com/Hamlib/Hamlib/issues/664pull/668/head
rodzic
9cb7c7dcdf
commit
7d79b59bd7
|
@ -2090,6 +2090,11 @@ typedef enum {
|
||||||
HAMLIB_CACHE_WIDTH
|
HAMLIB_CACHE_WIDTH
|
||||||
} hamlib_cache_t;
|
} hamlib_cache_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
TWIDDLE_OFF,
|
||||||
|
TWIDDLE_ON
|
||||||
|
} twiddle_state_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Rig cache data
|
* \brief Rig cache data
|
||||||
*
|
*
|
||||||
|
@ -2254,6 +2259,7 @@ struct rig_state {
|
||||||
int power_max; /*!< Maximum RF power level in rig units */
|
int power_max; /*!< Maximum RF power level in rig units */
|
||||||
unsigned char disable_yaesu_bandselect; /*!< Disables Yaeus band select logic */
|
unsigned char disable_yaesu_bandselect; /*!< Disables Yaeus band select logic */
|
||||||
int twiddle_rit; /*!< Suppresses VFOB reading (cached value used) so RIT control can be used */
|
int twiddle_rit; /*!< Suppresses VFOB reading (cached value used) so RIT control can be used */
|
||||||
|
int twiddle_state; /*!< keeps track of twiddle status */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! @cond Doxygen_Suppress
|
//! @cond Doxygen_Suppress
|
||||||
|
|
|
@ -844,6 +844,7 @@ static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
priv->curr->tx_freq = tx_freq;
|
priv->curr->tx_freq = tx_freq;
|
||||||
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->curr->tx_freq = %.0f\n", __func__, priv->curr->tx_freq);
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
}
|
}
|
||||||
|
@ -856,6 +857,7 @@ static int dummy_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
|
|
||||||
*tx_freq = priv->curr->tx_freq;
|
*tx_freq = priv->curr->tx_freq;
|
||||||
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->curr->tx_freq = %.0f\n", __func__, priv->curr->tx_freq);
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
}
|
}
|
||||||
|
|
12
src/rig.c
12
src/rig.c
|
@ -1661,8 +1661,9 @@ int twiddling(RIG *rig)
|
||||||
|
|
||||||
if (elapsed < rig->state.twiddle_timeout)
|
if (elapsed < rig->state.twiddle_timeout)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: Twiddle elapsed < 3, elapsed=%d\n", __func__,
|
rig_debug(RIG_DEBUG_TRACE, "%s: Twiddle elapsed < %d, elapsed=%d\n", __func__,
|
||||||
elapsed);
|
rig->state.twiddle_timeout, elapsed);
|
||||||
|
rig->state.twiddle_state = TWIDDLE_ON; // gets turned off in rig_set_freq;
|
||||||
RETURNFUNC(1); // would be better as error but other software won't handle it
|
RETURNFUNC(1); // would be better as error but other software won't handle it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1698,6 +1699,13 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
RETURNFUNC(-RIG_EIO);
|
RETURNFUNC(-RIG_EIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rig->state.twiddle_state == TWIDDLE_ON)
|
||||||
|
{
|
||||||
|
// we keep skipping set_freq while the vfo knob is in motion
|
||||||
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: Twiddle on so skipping this set_freq request one time\n", __func__);
|
||||||
|
rig->state.twiddle_state = TWIDDLE_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
caps = rig->caps;
|
caps = rig->caps;
|
||||||
|
|
||||||
vfo = vfo_fixup(rig, vfo);
|
vfo = vfo_fixup(rig, vfo);
|
||||||
|
|
Ładowanie…
Reference in New Issue