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

@ -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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -2165,7 +2168,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -2190,7 +2194,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -2217,7 +2222,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -2245,7 +2251,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -2278,7 +2285,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -4158,7 +4171,8 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -4378,7 +4392,8 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -4497,7 +4512,8 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -4606,7 +4622,8 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -4729,7 +4746,8 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -4874,7 +4892,8 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -6514,7 +6539,8 @@ int icom_get_powerstat(RIG *rig, powerstat_t *status)
} }
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }
@ -7358,7 +7392,8 @@ int icom_get_raw_buf(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
ack_len -= cmdhead; ack_len -= cmdhead;
if (ack_len >= 1 && ackbuf[0] != ACK && ackbuf[1] != NAK) 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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); 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 (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 // so we'll call it a timeout for retry purposes
RETURNFUNC(-RIG_ETIMEOUT); RETURNFUNC(-RIG_ETIMEOUT);
} }