kopia lustrzana https://github.com/Hamlib/Hamlib
Add 0x1c 0x03 command to get tx freq in icom_get_split_freq
rodzic
1e658578ec
commit
d61719ef3b
|
@ -3815,19 +3815,41 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
|
|
||||||
if (satmode == 0) // only worth trying if not in satmode
|
if (satmode == 0) // only worth trying if not in satmode
|
||||||
{
|
{
|
||||||
cmd = C_SEND_SEL_FREQ;
|
if (priv->x25cmdfails == 0)
|
||||||
subcmd = 0x01; // get the unselected vfo
|
|
||||||
rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf,
|
|
||||||
&ack_len);
|
|
||||||
|
|
||||||
if (rc == RIG_OK) // then we're done!!
|
|
||||||
{
|
{
|
||||||
*tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2);
|
cmd = C_SEND_SEL_FREQ;
|
||||||
return rc;
|
subcmd = 0x01; // get the unselected vfo
|
||||||
|
rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf,
|
||||||
|
&ack_len);
|
||||||
|
|
||||||
|
if (rc == RIG_OK) // then we're done!!
|
||||||
|
{
|
||||||
|
*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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->x25cmdfails = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
save_vfo = priv->curr_vfo; // so we can restore it later
|
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_cn = C_CTL_FUNC;
|
||||||
fct_sc = S_MEM_SATMODE;
|
fct_sc = S_MEM_SATMODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->x25cmdfails = 0; // we reset this to try it again
|
priv->x25cmdfails = 0; // we reset this to try it again
|
||||||
|
priv->x1cx03cmdfails = 0; // we reset this to try it again
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue