kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
ba703787d9
|
@ -7105,6 +7105,7 @@ static int set_vfo_curr(RIG *rig, vfo_t vfo, vfo_t curr_vfo)
|
||||||
// only need to set vfo if it's changed
|
// only need to set vfo if it's changed
|
||||||
else if (priv->curr_vfo != vfo)
|
else if (priv->curr_vfo != vfo)
|
||||||
{
|
{
|
||||||
|
if (!(VFO_HAS_MAIN_SUB_A_B_ONLY && !priv->split_on && !priv->satmode && vfo == RIG_VFO_SUB && priv->curr_vfo == RIG_VFO_B)) {
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: setting new vfo=%s\n", __func__,
|
rig_debug(RIG_DEBUG_TRACE, "%s: setting new vfo=%s\n", __func__,
|
||||||
rig_strvfo(vfo));
|
rig_strvfo(vfo));
|
||||||
retval = rig_set_vfo(rig, vfo);
|
retval = rig_set_vfo(rig, vfo);
|
||||||
|
@ -7116,6 +7117,7 @@ static int set_vfo_curr(RIG *rig, vfo_t vfo, vfo_t curr_vfo)
|
||||||
|
|
||||||
priv->curr_vfo = vfo;
|
priv->curr_vfo = vfo;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: curr_vfo now=%s\n", __func__,
|
rig_debug(RIG_DEBUG_TRACE, "%s: curr_vfo now=%s\n", __func__,
|
||||||
rig_strvfo(priv->curr_vfo));
|
rig_strvfo(priv->curr_vfo));
|
||||||
|
|
|
@ -1254,7 +1254,7 @@ void HAMLIB_API rig_no_restore_ai()
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @cond Doxygen_Suppress
|
//! @cond Doxygen_Suppress
|
||||||
int HAMLIB_API elapsed_ms(struct timespec *start, int option)
|
double HAMLIB_API elapsed_ms(struct timespec *start, int option)
|
||||||
{
|
{
|
||||||
// If option then we are starting the timing, else we get elapsed
|
// If option then we are starting the timing, else we get elapsed
|
||||||
struct timespec stop;
|
struct timespec stop;
|
||||||
|
@ -1289,8 +1289,8 @@ int HAMLIB_API elapsed_ms(struct timespec *start, int option)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ELAPSED_INVALIDATE:
|
case ELAPSED_INVALIDATE:
|
||||||
start->tv_sec -= 3600 * 24 *
|
clock_gettime(CLOCK_REALTIME, start);
|
||||||
365; // let's back off 1 year -- should expire most elapsed measurements
|
start->tv_sec -= 3600;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ extern HAMLIB_EXPORT(setting_t) rig_idx2setting(int i);
|
||||||
|
|
||||||
extern HAMLIB_EXPORT(int) hl_usleep(useconds_t usec);
|
extern HAMLIB_EXPORT(int) hl_usleep(useconds_t usec);
|
||||||
|
|
||||||
extern HAMLIB_EXPORT(int) elapsed_ms(struct timespec *start, int start_flag);
|
extern HAMLIB_EXPORT(double) elapsed_ms(struct timespec *start, int start_flag);
|
||||||
|
|
||||||
#ifdef PRId64
|
#ifdef PRId64
|
||||||
/** \brief printf(3) format to be used for long long (64bits) type */
|
/** \brief printf(3) format to be used for long long (64bits) type */
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ int HAMLIB_API rig_get_twiddle(RIG *rig, int *seconds)
|
||||||
// detect if somebody is twiddling the VFO
|
// detect if somebody is twiddling the VFO
|
||||||
// indicator is last set freq doesn't match current freq
|
// indicator is last set freq doesn't match current freq
|
||||||
// so we have to query freq every time we set freq or vfo to handle this
|
// so we have to query freq every time we set freq or vfo to handle this
|
||||||
static int twiddling(RIG *rig)
|
int twiddling(RIG *rig)
|
||||||
{
|
{
|
||||||
const struct rig_caps *caps;
|
const struct rig_caps *caps;
|
||||||
|
|
||||||
|
@ -1832,10 +1832,12 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
// we only get the freq if we set the vfo OK
|
// we only get the freq if we set the vfo OK
|
||||||
if (retcode == RIG_OK && caps->get_freq)
|
if (retcode == RIG_OK && caps->get_freq)
|
||||||
{
|
{
|
||||||
retcode = rig_get_freq(rig, vfo, &curr_freq);
|
if (caps->get_freq) {
|
||||||
|
retcode = caps->get_freq(rig, vfo, &curr_freq);
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: retcode from rig_get_freq = %s\n", __func__,
|
rig_debug(RIG_DEBUG_TRACE, "%s: retcode from rig_get_freq = %s\n", __func__,
|
||||||
rigerror(retcode));
|
rigerror(retcode));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// expire several cached items when we switch VFOs
|
// expire several cached items when we switch VFOs
|
||||||
|
|
Ładowanie…
Reference in New Issue