pull/680/head
Mike Black W9MDB 2021-04-21 23:48:29 -05:00
rodzic e42571de9c
commit b0e006ce6c
9 zmienionych plików z 44 dodań i 17 usunięć

Wyświetl plik

@ -844,7 +844,8 @@ static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
ENTERFUNC;
priv->curr->tx_freq = tx_freq;
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->curr->tx_freq = %.0f\n", __func__, priv->curr->tx_freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->curr->tx_freq = %.0f\n", __func__,
priv->curr->tx_freq);
RETURNFUNC(RIG_OK);
}
@ -857,7 +858,8 @@ static int dummy_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
ENTERFUNC;
*tx_freq = priv->curr->tx_freq;
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->curr->tx_freq = %.0f\n", __func__, priv->curr->tx_freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->curr->tx_freq = %.0f\n", __func__,
priv->curr->tx_freq);
RETURNFUNC(RIG_OK);
}

Wyświetl plik

@ -328,9 +328,11 @@ static int netrigctl_open(RIG *rig)
{
break;
}
switch(i)
switch (i)
{
}
rig->caps->tx_range_list1->startf = rs->tx_range_list[i].startf;
rig->caps->tx_range_list1->endf = rs->tx_range_list[i].endf;
rig->caps->tx_range_list1->modes = rs->tx_range_list[i].modes;
@ -626,7 +628,8 @@ static int netrigctl_open(RIG *rig)
{
// use the rig's timeout value pluse 200ms for potential network delays
rig->caps->timeout = strtol(value, NULL, 0) + 200;
rig_debug(RIG_DEBUG_TRACE, "%s: timeout value = '%s', final timeout=%d\n", __func__, value, rig->caps->timeout);
rig_debug(RIG_DEBUG_TRACE, "%s: timeout value = '%s', final timeout=%d\n",
__func__, value, rig->caps->timeout);
}
else
{

Wyświetl plik

@ -2105,7 +2105,8 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
// reason is we can't get width without swapping vfos -- yuck!!
if (width != NULL)
{
if (vfo & (RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A | RIG_VFO_CURR))
if (vfo & (RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A |
RIG_VFO_CURR))
{
// then we get our current vfo..i.e. VFOA
if (rig->state.current_vfo != RIG_VFO_A)
@ -2137,7 +2138,9 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
rig_set_vfo(rig, RIG_VFO_B);
retval = icom_get_dsp_flt(rig, *mode);
*width = retval;
if (*width == 0) *width = rig->state.cache.widthMainA; // we'll use VFOA's width
if (*width == 0) { *width = rig->state.cache.widthMainA; } // we'll use VFOA's width
// dont' really care about cache time here
// this is just to prevent vfo swapping while getting width
rig->state.cache.widthMainB = retval;

Wyświetl plik

@ -1219,7 +1219,7 @@ const struct rig_caps powersdr_caps =
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 20,
.post_write_delay = 0,
// The combination of timeout and retry is important
// We need at least 3 seconds to do profile switches
// Hitting the timeout is OK as long as we retry

Wyświetl plik

@ -911,7 +911,8 @@ int kenwood_open(RIG *rig)
int retval;
split_t split;
vfo_t tx_vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s: found the right driver for %s(%d)\n", __func__, rig->caps->model_name, rig->caps->rig_model);
rig_debug(RIG_DEBUG_VERBOSE, "%s: found the right driver for %s(%d)\n",
__func__, rig->caps->model_name, rig->caps->rig_model);
/* get current AI state so it can be restored */
kenwood_get_trn(rig, &priv->trn_state); /* ignore errors */

Wyświetl plik

@ -796,7 +796,8 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
chan->funcs |= (lock_byte & 0x05) ? RIG_FUNC_LOCK : 0;
chan->funcs |= (lock_byte & 0x08) ? RIG_FUNC_MUTE : 0;
chan->freq = pll_value_to_rx_freq((hhtoi(statebuf + 12) << 8) + hhtoi(statebuf + 14));
chan->freq = pll_value_to_rx_freq((hhtoi(statebuf + 12) << 8) + hhtoi(
statebuf + 14));
chan->tx_freq = ((hhtoi(statebuf + 16) << 8) + hhtoi(statebuf + 18)) * FREQ_DIV;
if (chan->rptr_shift != RIG_RPT_SHIFT_NONE)

Wyświetl plik

@ -1703,7 +1703,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (rig->state.twiddle_state == TWIDDLE_ON)
{
// we keep skipping set_freq while the vfo knob is in motion
rig_debug(RIG_DEBUG_VERBOSE, "%s: Twiddle on so skipping this set_freq request one time\n", __func__);
rig_debug(RIG_DEBUG_VERBOSE,
"%s: Twiddle on so skipping this set_freq request one time\n", __func__);
rig->state.twiddle_state = TWIDDLE_OFF;
}
@ -2490,9 +2491,11 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
ENTERFUNC;
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s ********************** called vfo=%s\n", __func__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s ********************** called vfo=%s\n",
__func__, rig_strvfo(vfo));
}
if (CHECK_RIG_ARG(rig))
@ -4094,7 +4097,7 @@ int HAMLIB_API rig_set_split_freq_mode(RIG *rig,
// in split mode we alwasy use VFOB
// in the future we may start using RIG_VFO_TX and let the backend figure out what VFO to use
vfo = vfo_fixup(rig,RIG_VFO_B); // in split mode we always use VFOB/Sub for TX
vfo = vfo_fixup(rig, RIG_VFO_B); // in split mode we always use VFOB/Sub for TX
rig_debug(RIG_DEBUG_VERBOSE,
"%s: vfo=%s, tx_freq=%.0f, tx_mode=%s, tx_width=%d\n", __func__,
rig_strvfo(vfo), tx_freq, rig_strrmode(tx_mode), (int)tx_width);
@ -4347,7 +4350,8 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig,
if (!split || !tx_vfo)
{
rig_debug(RIG_DEBUG_ERR, "%s: split or tx_vfo is null, split=%p, tx_vfo=%p\n", __func__, split, tx_vfo);
rig_debug(RIG_DEBUG_ERR, "%s: split or tx_vfo is null, split=%p, tx_vfo=%p\n",
__func__, split, tx_vfo);
RETURNFUNC(-RIG_EINVAL);
}
@ -4358,7 +4362,9 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig,
// if we can't get the vfo we will return whatever we have cached
*split = rig->state.cache.split;
*tx_vfo = rig->state.cache.split_vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s: no get_split_vfo so returning split=%d, tx_vfo=%s\n", __func__, *split, rig_strvfo(*tx_vfo));
rig_debug(RIG_DEBUG_VERBOSE,
"%s: no get_split_vfo so returning split=%d, tx_vfo=%s\n", __func__, *split,
rig_strvfo(*tx_vfo));
RETURNFUNC(RIG_OK);
}

Wyświetl plik

@ -1651,11 +1651,13 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
rig_debug(RIG_DEBUG_TRACE, "%s: vfo_opt=%d\n", __func__, *vfo_opt);
if (my_rig->state.comm_state == 0)
{
rig_debug(RIG_DEBUG_WARN, "%s: rig not open...trying to reopen\n", __func__);
rig_open(my_rig);
}
retcode = (*cmd_entry->rig_routine)(my_rig,
fout,
fin,

Wyświetl plik

@ -103,6 +103,7 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[5] = modeB;
frame[6] = widthB;
}
frame[7] = 0xfd;
write(fd, frame, 8);
break;
@ -113,8 +114,9 @@ void frameParse(int fd, unsigned char *frame, int len)
if (vfo_curr == RIG_VFO_A || vfo_curr == RIG_VFO_MAIN) { freqA = freq; }
else { freqB = freq; }
// case 0x06:
case 0x07:
@ -181,10 +183,12 @@ int openPort(char *comport) // doesn't matter for using pts devices
{
int fd;
fd = open(comport, O_RDWR);
if (fd < 0)
{
perror(comport);
}
return fd;
}
@ -214,8 +218,10 @@ int openPort(char *comport) // doesn't matter for using pts devices
void rigStatus()
{
printf("VFOA: mode=%s width=%ld freq=%.0f\n", rig_strrmode(modeA), widthA, freqA);
printf("VFOB: mode=%s width=%ld freq=%.0f\n", rig_strrmode(modeB), widthB, freqB);
printf("VFOA: mode=%s width=%ld freq=%.0f\n", rig_strrmode(modeA), widthA,
freqA);
printf("VFOB: mode=%s width=%ld freq=%.0f\n", rig_strrmode(modeB), widthB,
freqB);
}
int main(int argc, char **argv)
@ -225,13 +231,16 @@ int main(int argc, char **argv)
printf("%s: %s\n", argv[0], rig_version());
#if defined(WIN32) || defined(_WIN32)
if (argc != 2)
{
printf("Missing comport argument\n");
printf("%s [comport]\n", argv[0]);
exit(1);
}
#endif
while (1)
{
int len = frameGet(fd, buf);