kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
06301679d3
commit
096af1f592
|
@ -2686,7 +2686,7 @@ static int netrigctl_get_trn(RIG *rig, int *trn)
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
return -RIG_EPROTO;
|
RETURNFUNC(-RIG_EPROTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(buf, "OFF")) { *trn = RIG_TRN_OFF; }
|
if (strstr(buf, "OFF")) { *trn = RIG_TRN_OFF; }
|
||||||
|
@ -2718,7 +2718,7 @@ static int netrigctl_mW2power(RIG *rig, float *power, unsigned int mwpower,
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
return -RIG_EPROTO;
|
RETURNFUNC(-RIG_EPROTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
*power = atof(buf);
|
*power = atof(buf);
|
||||||
|
@ -2743,7 +2743,7 @@ static int netrigctl_power2mW(RIG *rig, unsigned int *mwpower, float power,
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
return -RIG_EPROTO;
|
RETURNFUNC(-RIG_EPROTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
*mwpower = atof(buf);
|
*mwpower = atof(buf);
|
||||||
|
|
|
@ -2617,7 +2617,7 @@ static int quisk_get_trn(RIG *rig, int *trn)
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
return -RIG_EPROTO;
|
RETURNFUNC(-RIG_EPROTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(buf, "OFF")) { *trn = RIG_TRN_OFF; }
|
if (strstr(buf, "OFF")) { *trn = RIG_TRN_OFF; }
|
||||||
|
@ -2649,7 +2649,7 @@ static int quisk_mW2power(RIG *rig, float *power, unsigned int mwpower,
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
return -RIG_EPROTO;
|
RETURNFUNC(-RIG_EPROTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
*power = atof(buf);
|
*power = atof(buf);
|
||||||
|
@ -2674,7 +2674,7 @@ static int quisk_power2mW(RIG *rig, unsigned int *mwpower, float power,
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
return -RIG_EPROTO;
|
RETURNFUNC(-RIG_EPROTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
*mwpower = atof(buf);
|
*mwpower = atof(buf);
|
||||||
|
|
|
@ -303,7 +303,7 @@ again2:
|
||||||
if (frm_len <= 0)
|
if (frm_len <= 0)
|
||||||
{
|
{
|
||||||
set_transaction_inactive(rig);
|
set_transaction_inactive(rig);
|
||||||
return frm_len;
|
RETURNFUNC(frm_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frm_len > 4 && memcmp(buf, sendbuf, frm_len) == 0)
|
if (frm_len > 4 && memcmp(buf, sendbuf, frm_len) == 0)
|
||||||
|
|
|
@ -2242,7 +2242,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: Invalid VFO %s in satellite mode\n", __func__, rig_strvfo(vfo));
|
rig_debug(RIG_DEBUG_ERR, "%s: Invalid VFO %s in satellite mode\n", __func__, rig_strvfo(vfo));
|
||||||
return -RIG_EINVAL;
|
RETURNFUNC(-RIG_EINVAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2257,7 +2257,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n",
|
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n",
|
||||||
__func__);
|
__func__);
|
||||||
// we return RIG_OK anyways as this should just be a bad request
|
// we return RIG_OK anyways as this should just be a bad request
|
||||||
return RIG_OK;
|
RETURNFUNC(RIG_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = icom_transaction(rig, C_SET_VFO, S_VFOB, NULL, 0, ackbuf, &ack_len);
|
retval = icom_transaction(rig, C_SET_VFO, S_VFOB, NULL, 0, ackbuf, &ack_len);
|
||||||
|
@ -2269,14 +2269,14 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
||||||
return retval;
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cachep->satmode && vfo == RIG_VFO_MAIN_B)
|
if (cachep->satmode && vfo == RIG_VFO_MAIN_B)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n", __func__);
|
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n", __func__);
|
||||||
// we return RIG_OK anyways as this should just be a bad request
|
// we return RIG_OK anyways as this should just be a bad request
|
||||||
return RIG_OK;
|
RETURNFUNC(RIG_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vfo == RIG_VFO_MAIN_A || vfo == RIG_VFO_MAIN_B)
|
if (vfo == RIG_VFO_MAIN_A || vfo == RIG_VFO_MAIN_B)
|
||||||
|
@ -2292,14 +2292,14 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
||||||
return retval;
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cachep->satmode && vfo == RIG_VFO_SUB_B)
|
if (cachep->satmode && vfo == RIG_VFO_SUB_B)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n", __func__);
|
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n", __func__);
|
||||||
// we return RIG_OK anyways as this should just be a bad request
|
// we return RIG_OK anyways as this should just be a bad request
|
||||||
return RIG_OK;
|
RETURNFUNC(RIG_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vfo == RIG_VFO_SUB_A || vfo == RIG_VFO_SUB_B)
|
if (vfo == RIG_VFO_SUB_A || vfo == RIG_VFO_SUB_B)
|
||||||
|
@ -2311,7 +2311,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
}
|
}
|
||||||
else if (vfo == RIG_VFO_MEM)
|
else if (vfo == RIG_VFO_MEM)
|
||||||
{
|
{
|
||||||
return icom_set_vfo(rig, vfo);
|
RETURNFUNC(icom_set_vfo(rig, vfo));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2322,7 +2322,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
||||||
return retval;
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(retval);
|
RETURNFUNC(retval);
|
||||||
|
|
|
@ -989,7 +989,7 @@ static vfo_t icom_current_vfo(RIG *rig)
|
||||||
|
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC(rs->current_vfo);
|
return rs->current_vfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1003,7 +1003,7 @@ static vfo_t icom_current_vfo(RIG *rig)
|
||||||
|
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC(rs->current_vfo);
|
return rs->current_vfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1724,7 +1724,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
priv->civ_731_mode = 1;
|
priv->civ_731_mode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(retval);
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix VFO if the TX freq command is not available
|
// Fix VFO if the TX freq command is not available
|
||||||
|
@ -1781,7 +1781,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
priv->civ_731_mode = 1;
|
priv->civ_731_mode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(retval);
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = icom_transaction(rig, C_RD_FREQ, -1, NULL, 0, freqbuf, &freq_len);
|
retval = icom_transaction(rig, C_RD_FREQ, -1, NULL, 0, freqbuf, &freq_len);
|
||||||
|
@ -1802,7 +1802,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
priv->civ_731_mode = 1;
|
priv->civ_731_mode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(retval);
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1819,7 +1819,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
|
|
||||||
if (vfo == RIG_VFO_MEM && civ_731_mode_save) { priv->civ_731_mode = 1; }
|
if (vfo == RIG_VFO_MEM && civ_731_mode_save) { priv->civ_731_mode = 1; }
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (freq_len == 3 && (ICOM_IS_ID5100 || ICOM_IS_ID4100 || ICOM_IS_ID31
|
if (freq_len == 3 && (ICOM_IS_ID5100 || ICOM_IS_ID4100 || ICOM_IS_ID31
|
||||||
|
@ -1843,7 +1843,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
return -RIG_ETRUNC;
|
return -RIG_ETRUNC;
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(-RIG_ENAVAIL);
|
return -RIG_ENAVAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (freq_len != 3 && freq_len != 6 && freq_len != (priv->civ_731_mode ? 4 : 5))
|
if (freq_len != 3 && freq_len != 6 && freq_len != (priv->civ_731_mode ? 4 : 5))
|
||||||
|
@ -3965,7 +3965,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
@ -6028,7 +6028,7 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6135,7 +6135,7 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6379,10 +6379,10 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
|
||||||
|
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC2(icom_get_mode(rig, vfo, tx_mode, tx_width));
|
RETURNFUNC(icom_get_mode(rig, vfo, tx_mode, tx_width));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6428,7 +6428,7 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6766,7 +6766,7 @@ int icom_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
@ -7648,7 +7648,7 @@ int icom_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
@ -8170,7 +8170,7 @@ int icom_get_powerstat(RIG *rig, powerstat_t *status)
|
||||||
// Modify rig_state powerstat directly to reflect power ON/OFF status, but return the result of rig_get_freq,
|
// Modify rig_state powerstat directly to reflect power ON/OFF status, but return the result of rig_get_freq,
|
||||||
// because the error could indicate other connectivity issues too
|
// because the error could indicate other connectivity issues too
|
||||||
STATE(rig)->powerstat = *status;
|
STATE(rig)->powerstat = *status;
|
||||||
return retval;
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -8220,7 +8220,7 @@ int icom_set_mem(RIG *rig, vfo_t vfo, int ch)
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
@ -8749,7 +8749,7 @@ int icom_stop_morse(RIG *rig, vfo_t vfo)
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
@ -9169,7 +9169,7 @@ int icom_set_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
@ -9319,7 +9319,7 @@ int icom_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
|
||||||
|
|
||||||
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
|
|
@ -100,7 +100,7 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
|
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
|
||||||
0)))
|
0)))
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->dual_watch = 0;
|
priv->dual_watch = 0;
|
||||||
|
@ -116,7 +116,7 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
|
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
|
||||||
1)))
|
1)))
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->dual_watch = 1;
|
priv->dual_watch = 1;
|
||||||
|
@ -139,7 +139,7 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
if (RIG_OK != (retval = icom_transaction(rig, C_SET_VFO, myvfo, NULL, 0, ackbuf,
|
if (RIG_OK != (retval = icom_transaction(rig, C_SET_VFO, myvfo, NULL, 0, ackbuf,
|
||||||
&ack_len)))
|
&ack_len)))
|
||||||
{
|
{
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURNFUNC(retval);
|
RETURNFUNC(retval);
|
||||||
|
|
Ładowanie…
Reference in New Issue