Fix icom.c logic to not reject good answers

https://github.com/Hamlib/Hamlib/issues/596
pull/608/head
Michael Black W9MDB 2021-03-10 11:49:47 -06:00
rodzic 7b58661d12
commit 803a8d9e5e
3 zmienionych plików z 6 dodań i 9 usunięć

Wyświetl plik

@ -279,6 +279,8 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
if (NAK == buf[frm_len - 2]) { RETURNFUNC(-RIG_ERJCTED); }
if (ACK != buf[frm_len - 2]) { RETURNFUNC(-RIG_BUSBUSY); }
*data_len = frm_len - (ACKFRMLEN - 1);
rig_debug(RIG_DEBUG_TRACE, "%s: data_len=%d, frm_len=%d\n", __func__, *data_len,
frm_len);

Wyświetl plik

@ -3081,14 +3081,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
lvl_len--;
}
if (lvl_len >= 1 && lvlbuf[0] != ACK && lvlbuf[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 (lvlbuf[0] != ACK && lvlbuf[0] != lvl_cn)
if (lvlbuf[0] != lvl_cn)
{
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n", __func__,
lvlbuf[0], lvl_len);
@ -3211,11 +3204,13 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
val->f =
rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal);
rig_debug(RIG_DEBUG_TRACE, "%s: using rig table to convert %d to %.01f\n", __func__, icom_val, val->f);
}
else
{
val->f =
rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal);
rig_debug(RIG_DEBUG_TRACE, "%s: using default icom table to convert %d to %.01f\n", __func__, icom_val, val->f);
}
break;

Wyświetl plik

@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20210306"
#define BACKEND_VER "20210310"
/*
* defines used by comp_cal_str in rig.c