kopia lustrzana https://github.com/Hamlib/Hamlib
Add PTT check in set_freq since rig cannot set freq while transmitting
VOX mode was a problem so this ptt check should fix it. https://github.com/Hamlib/Hamlib/issues/1052pull/1068/head
rodzic
b99e8988e0
commit
d12ca22916
|
@ -248,7 +248,7 @@ const struct rig_caps ft857_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FT857),
|
RIG_MODEL(RIG_MODEL_FT857),
|
||||||
.model_name = "FT-857",
|
.model_name = "FT-857",
|
||||||
.mfg_name = "Yaesu",
|
.mfg_name = "Yaesu",
|
||||||
.version = "20220407.0",
|
.version = "20220603.0",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -936,11 +936,24 @@ int ft857_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
|
||||||
int ft857_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
int ft857_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
{
|
{
|
||||||
unsigned char data[YAESU_CMD_LENGTH - 1];
|
unsigned char data[YAESU_CMD_LENGTH - 1];
|
||||||
|
int retval;
|
||||||
|
int i;
|
||||||
|
ptt_t ptt = RIG_PTT_ON;
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__);
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "ft857: requested freq = %"PRIfreq" Hz\n", freq);
|
rig_debug(RIG_DEBUG_VERBOSE, "ft857: requested freq = %"PRIfreq" Hz\n", freq);
|
||||||
|
|
||||||
|
// cannot set freq while PTT is on
|
||||||
|
for (i = 0; i < 10 && ptt == RIG_PTT_ON; ++i)
|
||||||
|
{
|
||||||
|
retval = rig_get_ptt(rig, vfo, &ptt);
|
||||||
|
|
||||||
|
if (retval != RIG_OK) { return retval; }
|
||||||
|
|
||||||
|
hl_usleep(100 * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
/* fill in the frequency */
|
/* fill in the frequency */
|
||||||
to_bcd_be(data, (freq + 5) / 10, 8);
|
to_bcd_be(data, (freq + 5) / 10, 8);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue