Add freq_skip for use with rigs that do not have targetable VFO

Hopefully this allows them to work with gpredict.
However...setting frequency on TX/RX transition could take up to 1 second depending on gpredict polling rate.
https://github.com/Hamlib/Hamlib/issues/1493
pull/1523/head
Mike Black W9MDB 2024-03-08 17:09:47 -06:00
rodzic 24135bd7d7
commit 5ab1122139
4 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -1429,6 +1429,13 @@ Can also use 1,2,3,4
.EX
Skips rig initialization -- useful when executing commands with rigctl to speed up things
.
.TP
.BR freq_skip " " 'skip'
.EX
When skip!=0 skips setting freq on TX_VFO when in RX and on RX_VFO when in TX -- for use with gpredict and rigs that do not have TARGETABLE_VFO
.
.SH READLINE
.
.SH READLINE
.
If

Wyświetl plik

@ -2850,6 +2850,7 @@ struct rig_state {
int dual_watch; /*!< Boolean DUAL_WATCH status */
int post_ptt_delay; /*!< delay after PTT to allow for relays and such */
struct timespec freq_event_elapsed;
int freq_skip; /*!< allow frequency skip for gpredict RX/TX freq set */
// New rig_state items go before this line ============================================
};

Wyświetl plik

@ -220,6 +220,11 @@ static const struct confparams frontend_cfg_params[] =
"Multicast data UDP port for sending commands to rig",
"4532", RIG_CONF_NUMERIC, { .n = { 0, 1000000, 1 } }
},
{
TOK_FREQ_SKIP, "freq_skip", "Skip setting freq on non-active VFO",
"True enables skipping setting the TX_VFO when RX_VFO is receiving and skips RX_VFO when TX_VFO is transmitting",
"0", RIG_CONF_CHECKBUTTON, { }
},
{ RIG_CONF_END, NULL, }
};
@ -820,6 +825,15 @@ static int frontend_set_conf(RIG *rig, hamlib_token_t token, const char *val)
rs->multicast_cmd_port = val_i;
break;
case TOK_FREQ_SKIP:
if (1 != sscanf(val, "%ld", &val_i))
{
return -RIG_EINVAL;
}
rs->freq_skip = val_i != 0;
break;
default:
return -RIG_EINVAL;
}

Wyświetl plik

@ -141,6 +141,8 @@
#define TOK_MULTICAST_CMD_ADDR TOKEN_FRONTEND(134)
/** \brief rig: Multicast command server UDP port, default 4532 */
#define TOK_MULTICAST_CMD_PORT TOKEN_FRONTEND(135)
/** \brief rig: Skip setting freq on opposite VFO when in split mode */
#define TOK_FREQ_SKIP TOKEN_FRONTEND(136)
/*
* rotator specific tokens