kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
4e717d2386
commit
470d3b7c4f
|
@ -928,6 +928,7 @@ icom_rig_open(RIG *rig)
|
||||||
int satmode = 0;
|
int satmode = 0;
|
||||||
struct rig_state *rs = &rig->state;
|
struct rig_state *rs = &rig->state;
|
||||||
struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
|
struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
|
||||||
|
int retry_flag = 1;
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
|
|
||||||
|
@ -935,6 +936,7 @@ icom_rig_open(RIG *rig)
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: %s v%s\n", __func__, rig->caps->model_name,
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: %s v%s\n", __func__, rig->caps->model_name,
|
||||||
rig->caps->version);
|
rig->caps->version);
|
||||||
|
retry_open:
|
||||||
retval = icom_get_usb_echo_off(rig);
|
retval = icom_get_usb_echo_off(rig);
|
||||||
|
|
||||||
if (retval == RIG_OK) // then echo is on so let's try freq now
|
if (retval == RIG_OK) // then echo is on so let's try freq now
|
||||||
|
@ -973,6 +975,18 @@ icom_rig_open(RIG *rig)
|
||||||
RETURNFUNC(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (retval != RIG_OK)
|
||||||
|
{
|
||||||
|
// didnt' ask for power on so let's retry one more time
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: rig error getting frequency retry=%d, err=%s\n", __func__,retry_flag,rigerror(retval));
|
||||||
|
if (retry_flag)
|
||||||
|
{
|
||||||
|
retry_flag = 0;
|
||||||
|
hl_usleep(500*1000); // 500ms pause
|
||||||
|
goto retry_open;
|
||||||
|
}
|
||||||
|
RETURNFUNC(retval);
|
||||||
|
}
|
||||||
|
|
||||||
rig->state.current_vfo = icom_current_vfo(rig);
|
rig->state.current_vfo = icom_current_vfo(rig);
|
||||||
priv->poweron = 1;
|
priv->poweron = 1;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BACKEND_VER "20211107"
|
#define BACKEND_VER "20211114"
|
||||||
|
|
||||||
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
|
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
|
||||||
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)
|
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)
|
||||||
|
|
Ładowanie…
Reference in New Issue