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.
This back end used a 480 second timeout which effectively blocks
retries. The long timeout claimed to be for something to do with
tuning which I assume is related to an auto ATU blocking rig CAT
responses. The standard retry mechanism should cope with this without
resorting to an artificially extended timeout.
The rig->state.rigport retry option can be overridden by a
configuration option and therefore should be used rather than the
initial capabilities default value.
Thanks to Ervin HA2OS for finding this defect.
JTSDK allow building hamlib from JTSDK-QT or JT-MSYS.
However, on Windows 7 64-bit the i/o redirects are causing the command
console to crash when building from JTSDK-QT.
This patch simply removes the input redirect which shouldn't be
necessary.
73
Mike W9MDB
Do the minimum swapping and other manipulation to determine the Tx and
VFO status when setting the split frequency and mode.
TODO - other funcitons.
The strategy to determine the current VFO at the start of a set or
query sequence of the split transmit VFO should not switch back to the
Rx VFO unless it is certain that it was current at the start of the
sequence.
This implementation reduces the number of VFO excahnges or sets to a
minimum when setting the TX VFO frequency and mode together.
This also includes a much smarter implementation of the logic used
when the new config option 'no_xchg' is enabled. Now it is able to
accurately determine the original VFO selected and leaves the
sequences with the same VFO selected. There is one corner case when
both VFOs are identical (frequency, mode and width) at the start where
it has to take a guess as to the selected originally VFO (Icom CAT
protocol has no command to elicit this information). In that case it
guesses as the last VFO selected using Hamlib. Applications can gain
absolute certainty by setting the VFO themselves prior to using the
rig_{set,get}_{split,}_{freq,mode,freq_mode}() function series. This
now gives seamless TX VFO configuration without any relay clattering
or TX/RX audio glitches.
This optimized implementation takes advantage of the CAT protocol
command to set both frequency and mode at the same time. It also only
needs to switch VFOs once either side of the command.
CAT protocols that don't allow direct addressing of VFOs require that
the "other" VFO be queried or set via a select then get/set then
select back to original or swap then get/set then swap again. When
both frequncy and mode need to be set the sequences can be optimized
if a single funciton is avaiable.
This enhancement adds those single functions rig_set_split_freq_mode()
and rig_get_split_freq_mode() with a default impelementation that
calls the individual rig_{get,set}_split_{freq,mode}() functions. Back
ends can choose to implement an optimized version which is used
instead of the default if present.
Using these functions when an optimized implementation is available
allows the TX VFO's frequency and mode to be set in a single operation
with only one VFO exchange or selection either side of the
operation. Many CAT protocols are very efficient when getting or
setting both frequency and mode and some even combine the two in a
single command.
The letters 'K' and 'k' are used for the rigctl short command name for
these functions.
Adds a new config param "-C fakefreq=1"
The ft757gx only has one-way comm so this simply returns the last freq
set.
WSJT-X can operate in fake it split mode with this too.
RRR
Mike W9MDB
Some distributions--Debian and Alpine tested--put libusb.h under the
libusb-1.0 directory. Test for its presence and if found define
HAVE_LIBUSB_1_0_LIBUSB_H. Also test for HAVE_LIBUSB or
HAVE_LIBUSB_1_0_LIBUSB_H and conditionally include the correct header
file in the sources.
Astyle is a code formatting utility that can quickly reformat a source
file based on the settings of its configuration file. The added
configuration file will format to a style mostly consistent with the
Linux Kernel Style guide:
https://www.kernel.org/doc/Documentation/CodingStyle
While conformance to this document is not the goal, it supplies a
reasonable set of guidelines to be used in Hamlib.
clang warned that lvl_len could be used unitialized in a call to
rig_debug. Initialze lvl_len to 0 as its assignement is inside an if
conditional.
Also reported by Greg Troxel.
Comment out the conditional:
if( pCmd->pacCmdStrs != NULL )
as the structure does not have a terminating NULL, this expression will
never evaluate to false. Should the structure assigned be modified to
have a NULL as the last element, then uncomment these lines to restore
the test.
After discussions with Greg N1DAM I have changed the dual stack
support to explicitly allow IPv4 connections mapped to IPv6 for any
AF_INET6 address since BSD as well as Windows defaults this socket
option to on (disallowed).
IPv4 mapped to IPv6 makes sense for Hamlib servers since starting two
servers one for each protocol family (the other option) is not
possible since there is only a single rig/rotator which cannot be
shared between two servers.
Fix typo in ft990.c
Remove unused var in newcat.c
Make rit and xit use labs() to match data type
Fix frequency print in newcat.c to use PRIll
RRR
Mike W9MDB