pull/649/head
Michael Black W9MDB 2021-03-06 09:24:00 -06:00
rodzic ef2e8a4d94
commit 9a44b27775
1 zmienionych plików z 125 dodań i 89 usunięć

Wyświetl plik

@ -766,7 +766,7 @@ icom_rig_open(RIG *rig)
// some rigs like the IC7100 still echo when in standby
// so asking for freq now should timeout if such a rig
freq_t tfreq;
retval = rig_get_freq(rig,RIG_VFO_A,&tfreq);
retval = rig_get_freq(rig, RIG_VFO_A, &tfreq);
}
if (retval != RIG_OK && priv->poweron == 0 && rs->auto_power_on)
@ -1075,13 +1075,15 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -1467,11 +1469,11 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
if (retval != RIG_OK || rfwidth.i >= RTTY_FIL_NB)
{
return(0); /* use default */
return (0); /* use default */
}
else
{
return(rtty_fil[rfwidth.i]);
return (rtty_fil[rfwidth.i]);
}
}
}
@ -1483,7 +1485,7 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
if (priv->no_1a_03_cmd)
{
return(0);
return (0);
}
retval = icom_transaction(rig, C_CTL_MEM, fw_sub_cmd, 0, 0,
@ -1492,14 +1494,14 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
if (-RIG_ERJCTED == retval)
{
priv->no_1a_03_cmd = -1; /* do not keep asking */
return(0);
return (0);
}
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), "
"len=%d\n", __func__, resbuf[0], res_len);
return(0); /* use default */
return (0); /* use default */
}
if (res_len == 3 && resbuf[0] == C_CTL_MEM)
@ -1509,17 +1511,17 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
if (mode & RIG_MODE_AM)
{
return((i + 1) * 200); /* Ic_7800 */
return ((i + 1) * 200); /* Ic_7800 */
}
else if (mode &
(RIG_MODE_CW | RIG_MODE_USB | RIG_MODE_LSB | RIG_MODE_RTTY |
RIG_MODE_RTTYR))
{
return(i < 10 ? (i + 1) * 50 : (i - 4) * 100);
return (i < 10 ? (i + 1) * 50 : (i - 4) * 100);
}
}
return(0);
return (0);
}
int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width)
@ -1787,7 +1789,8 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -2164,11 +2167,12 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -2189,11 +2193,12 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -2216,11 +2221,12 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -2244,11 +2250,12 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -2278,7 +2285,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -2803,7 +2811,8 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -3070,7 +3079,8 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
if (lvl_len >= 1 && lvlbuf[0] != ACK && lvlbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -3637,7 +3647,8 @@ int icom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -3767,7 +3778,8 @@ int icom_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -3874,7 +3886,8 @@ int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -4157,11 +4170,12 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -4377,11 +4391,12 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -4496,11 +4511,12 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -4605,11 +4621,12 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -4728,11 +4745,12 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -4873,11 +4891,12 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -5121,7 +5140,8 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -5313,7 +5333,8 @@ int icom_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -5983,7 +6004,8 @@ int icom_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6090,7 +6112,8 @@ int icom_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6190,7 +6213,8 @@ int icom_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6295,7 +6319,8 @@ int icom_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6513,11 +6538,12 @@ int icom_get_powerstat(RIG *rig, powerstat_t *status)
RETURNFUNC(retval);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
@ -6557,7 +6583,8 @@ int icom_set_mem(RIG *rig, vfo_t vfo, int ch)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6593,7 +6620,8 @@ int icom_set_bank(RIG *rig, vfo_t vfo, int bank)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6728,7 +6756,8 @@ int icom_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -6914,7 +6943,8 @@ int icom_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -7026,7 +7056,8 @@ int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -7070,7 +7101,8 @@ int icom_send_morse(RIG *rig, vfo_t vfo, const char *msg)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -7108,7 +7140,8 @@ int icom_stop_morse(RIG *rig, vfo_t vfo)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -7319,7 +7352,8 @@ int icom_set_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -7358,7 +7392,8 @@ int icom_get_raw_buf(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
ack_len -= cmdhead;
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}
@ -7481,7 +7516,8 @@ int icom_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
}
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK)
{ // if we don't get ACK/NAK some serial corruption occurred
{
// if we don't get ACK/NAK some serial corruption occurred
// so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT);
}