If the ts570 backend was called without the radio being turned on or the
wrong IO port specified, the library would generate a number of timeouts
and then fall through to behaving as though the communications channel
were opened. Discovered that the backend did not specify a function for
rig_open in the rig_caps structure.
Thanks to Volker Schroer, DL1KSV, for reporting this issue.
this rig is prone to giving transitory busy responses to CAT commands,
the retry mechanism for set commands was looping rather than accepting
the results of a successful command verification read. This is fixed
and the notification trace message is reduced to a warning.
This patch changes rig_list_foreach such that the called function may
call rig_unregister without having to access freed memory. This avoids
a valgrind MemCheck and makes it possible to clean up teh rig_list
database.
I'm implementing several changes to support some functionality for the
IC7300. In order to minimize the review process I'm submitting this
small one separately (still working on finish the IC7300 but it's some
fairly extensive changes since ICOM has changed the protocol for several
things).
For the IC7300 turning power on requires ~150 0xfe's be sent to wake up
the rig. This causes a buffer overflow condition in icom/frame.c. This
patch increases the buffer size and ensures no overflow.
73
Mike W9MDB
This makes the first non-option argument end getopt_long() parsing
stop rather than shuffling non-option arguments to the end. This is
necessary so that rig/rotator command language arguments can start
with a '-' character and also it enables the '-' pseudo command to
switch to reading commands from stdin work correctly.
The change also make checking for the '-', switch to stdin, command
stricter in that it must be where a command is expected and it must be
a word containing exactly a single '-' character.
Overall this allows the following styles of use:
$ rigctl R -
$ rigctl - <<EOF
>R -
>EOF
R -
$ echo "R -" | rigctl -
R -
$ rigctl -m 1 M CW -1
$ rigctl F 434000000 - <<EOF
>M FM 15000
>f m
>EOF
M FM 15000
f 145000000
m FM
15000
$
as well as the command line interpreter operation where no commands
nor '-' are provided:
$ rigctl
Rig command: R -
Rig command: r
Rptr Shift: -
Rig command: f
Frequency: 145000000
Rig command: m
Mode: FM
Passband: 15000
Rig command: F 434000000
Rig command: f
Frequency: 434000000
Rig command: q
$
This change allows the set_mode functions to leave the rig passband
unchanged if required. For the few rigs that do not have explcit
passband width control either current state is read and rewritten or a
"normal" width is chosen e.g. select a normal width when there is a
choice like CW and CW-NARROW.
It seems like || was used where && was intended here. Currently, the
conditions are always true, and there's no reason for them to be written
this way.
Found with Coccinelle.