kopia lustrzana https://github.com/Hamlib/Hamlib
Add 0x1c 0x03 command to get tx freq in icom_get_split_freq
rodzic
1e658578ec
commit
d61719ef3b
|
@ -3814,6 +3814,8 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode);
|
||||
|
||||
if (satmode == 0) // only worth trying if not in satmode
|
||||
{
|
||||
if (priv->x25cmdfails == 0)
|
||||
{
|
||||
cmd = C_SEND_SEL_FREQ;
|
||||
subcmd = 0x01; // get the unselected vfo
|
||||
|
@ -3825,10 +3827,30 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
|||
*tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
priv->x25cmdfails = 1;
|
||||
}
|
||||
}
|
||||
else // we're in satmode so we try another command
|
||||
{
|
||||
if (priv->x1cx03cmdfails == 0)
|
||||
{
|
||||
cmd = 0x1c;
|
||||
subcmd = 0x03;
|
||||
rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf,
|
||||
&ack_len);
|
||||
|
||||
if (rc == RIG_OK) // then we're done!!
|
||||
{
|
||||
*tx_freq = from_bcd(ackbuf, (priv->civ_731_mode ? 4 : 5) * 2);
|
||||
return rc;
|
||||
}
|
||||
|
||||
priv->x1cx03cmdfails = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
save_vfo = priv->curr_vfo; // so we can restore it later
|
||||
|
||||
|
@ -4952,7 +4974,9 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
fct_cn = C_CTL_FUNC;
|
||||
fct_sc = S_MEM_SATMODE;
|
||||
}
|
||||
|
||||
priv->x25cmdfails = 0; // we reset this to try it again
|
||||
priv->x1cx03cmdfails = 0; // we reset this to try it again
|
||||
|
||||
break;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue