kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
aff8489591
|
@ -417,7 +417,7 @@ static int read_transaction(RIG *rig, char *xml, int xml_len)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: read_string error=%d\n", __func__, len);
|
rig_debug(RIG_DEBUG_ERR, "%s: read_string error=%d\n", __func__, len);
|
||||||
//return -(100 + RIG_EPROTO);
|
//return -(100 + RIG_EPROTO);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(xml) + strlen(tmp_buf) < xml_len - 1)
|
if (strlen(xml) + strlen(tmp_buf) < xml_len - 1)
|
||||||
|
@ -1467,8 +1467,11 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = read_transaction(rig, xml, sizeof(xml));
|
retval = read_transaction(rig, xml, sizeof(xml));
|
||||||
if (retval < 0) {
|
|
||||||
|
if (retval < 0)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
xml_parse(xml, value, sizeof(value));
|
xml_parse(xml, value, sizeof(value));
|
||||||
retval = modeMapGetHamlib(value);
|
retval = modeMapGetHamlib(value);
|
||||||
|
|
||||||
|
|
|
@ -1016,6 +1016,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
int freq_len, retval;
|
int freq_len, retval;
|
||||||
int cmd, subcmd;
|
int cmd, subcmd;
|
||||||
int ack_len = sizeof(ackbuf);
|
int ack_len = sizeof(ackbuf);
|
||||||
|
int civ_731_mode = 0; // even these rigs have 5-byte channels
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__,
|
rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__,
|
||||||
rig_strvfo(vfo));
|
rig_strvfo(vfo));
|
||||||
|
@ -1034,6 +1035,14 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
cmd = C_RD_FREQ;
|
cmd = C_RD_FREQ;
|
||||||
subcmd = -1;
|
subcmd = -1;
|
||||||
|
|
||||||
|
if (vfo == RIG_VFO_MEM && priv->civ_731_mode)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_TRACE, "%s: VFO=MEM so turning off civ_731\n", __func__);
|
||||||
|
civ_731_mode = 1;
|
||||||
|
priv->civ_731_mode = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Pick the appropriate VFO when VFO_TX is requested
|
// Pick the appropriate VFO when VFO_TX is requested
|
||||||
if (vfo == RIG_VFO_TX)
|
if (vfo == RIG_VFO_TX)
|
||||||
{
|
{
|
||||||
|
@ -1070,6 +1079,8 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
|
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
|
if (vfo == RIG_VFO_MEM && civ_731_mode) { priv->civ_731_mode = 1; }
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1088,6 +1099,8 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
|
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
{
|
{
|
||||||
|
if (vfo == RIG_VFO_MEM && civ_731_mode) { priv->civ_731_mode = 1; }
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1103,6 +1116,8 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
{
|
{
|
||||||
*freq = RIG_FREQ_NONE;
|
*freq = RIG_FREQ_NONE;
|
||||||
|
|
||||||
|
if (vfo == RIG_VFO_MEM && civ_731_mode) { priv->civ_731_mode = 1; }
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1110,6 +1125,9 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: wrong frame len=%d\n",
|
rig_debug(RIG_DEBUG_ERR, "%s: wrong frame len=%d\n",
|
||||||
__func__, freq_len);
|
__func__, freq_len);
|
||||||
|
|
||||||
|
if (vfo == RIG_VFO_MEM && civ_731_mode) { priv->civ_731_mode = 1; }
|
||||||
|
|
||||||
return -RIG_ERJCTED;
|
return -RIG_ERJCTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1124,6 +1142,8 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
*/
|
*/
|
||||||
*freq = from_bcd(freqbuf + 1, freq_len * 2);
|
*freq = from_bcd(freqbuf + 1, freq_len * 2);
|
||||||
|
|
||||||
|
if (vfo == RIG_VFO_MEM && civ_731_mode) { priv->civ_731_mode = 1; }
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BACKEND_VER "20200423"
|
#define BACKEND_VER "20200426"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* defines used by comp_cal_str in rig.c
|
* defines used by comp_cal_str in rig.c
|
||||||
|
|
|
@ -614,7 +614,9 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
|
||||||
char arg3[MAXARGSZ + 1], *p3 = NULL;
|
char arg3[MAXARGSZ + 1], *p3 = NULL;
|
||||||
vfo_t vfo = RIG_VFO_CURR;
|
vfo_t vfo = RIG_VFO_CURR;
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: called, interactive=%d\n", __func__, interactive);
|
rig_debug(RIG_DEBUG_TRACE, "%s: called, interactive=%d\n", __func__,
|
||||||
|
interactive);
|
||||||
|
|
||||||
/* cmd, internal, rigctld */
|
/* cmd, internal, rigctld */
|
||||||
if (!(interactive && prompt && have_rl))
|
if (!(interactive && prompt && have_rl))
|
||||||
{
|
{
|
||||||
|
@ -636,7 +638,9 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
|
||||||
retcode);
|
retcode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: cmd=%c(%02x)\n", __func__, isprint(cmd)?cmd:' ', cmd);
|
|
||||||
|
rig_debug(RIG_DEBUG_TRACE, "%s: cmd=%c(%02x)\n", __func__,
|
||||||
|
isprint(cmd) ? cmd : ' ', cmd);
|
||||||
|
|
||||||
/* Extended response protocol requested with leading '+' on command
|
/* Extended response protocol requested with leading '+' on command
|
||||||
* string--rigctld only!
|
* string--rigctld only!
|
||||||
|
|
Ładowanie…
Reference in New Issue