kopia lustrzana https://github.com/Hamlib/Hamlib
Fix icom.c logic to not reject good answers
https://github.com/Hamlib/Hamlib/issues/596pull/608/head
rodzic
7b58661d12
commit
803a8d9e5e
|
@ -279,6 +279,8 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
|
||||||
|
|
||||||
if (NAK == buf[frm_len - 2]) { RETURNFUNC(-RIG_ERJCTED); }
|
if (NAK == buf[frm_len - 2]) { RETURNFUNC(-RIG_ERJCTED); }
|
||||||
|
|
||||||
|
if (ACK != buf[frm_len - 2]) { RETURNFUNC(-RIG_BUSBUSY); }
|
||||||
|
|
||||||
*data_len = frm_len - (ACKFRMLEN - 1);
|
*data_len = frm_len - (ACKFRMLEN - 1);
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: data_len=%d, frm_len=%d\n", __func__, *data_len,
|
rig_debug(RIG_DEBUG_TRACE, "%s: data_len=%d, frm_len=%d\n", __func__, *data_len,
|
||||||
frm_len);
|
frm_len);
|
||||||
|
|
|
@ -3081,14 +3081,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
lvl_len--;
|
lvl_len--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lvl_len >= 1 && lvlbuf[0] != ACK && lvlbuf[1] != NAK)
|
if (lvlbuf[0] != lvl_cn)
|
||||||
{
|
|
||||||
// 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)
|
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n", __func__,
|
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n", __func__,
|
||||||
lvlbuf[0], lvl_len);
|
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 =
|
val->f =
|
||||||
rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal);
|
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
|
else
|
||||||
{
|
{
|
||||||
val->f =
|
val->f =
|
||||||
rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal);
|
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;
|
break;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BACKEND_VER "20210306"
|
#define BACKEND_VER "20210310"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* defines used by comp_cal_str in rig.c
|
* defines used by comp_cal_str in rig.c
|
||||||
|
|
Ładowanie…
Reference in New Issue