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
Only ask Icom rigs once then desist if bandwidth request returns
command rejected. This avoids sending the request with every mode
query and possibly retrying 'retries' times for rigs that do not
suport the '1a 03' command which wastes much time at slow baud rates.
This patch fixes a frequency overflow problem on kenwood and yaesu that
can occur with frequencies that over a 32-bit signed int. This has been
shown to fix the problem on kenwood.
73
Mike W9MDB
As the rigctld and rotctld programs are actually user programs and
installed in ${prefix}/bin, it was erroneous to install the associated
manual pages into the man8 directory. Correct this error going forward
and install them into man1 with the other manual pages.
Correctly read SPLIT status TX STATUS is documented incorrectly.
Implement get_split_vfo () on all rigs.
Allow either RTTY or PKTUSB to be set, both go to DIG mode and rig
must be set appropriately. get_mode() returns what is actually set for
the rig DIG mode.
As Hamlib now restores the rig auto information state (AI) on exit
there is now a need to disable that functionality so that rigctl can
be used to set/reset AI mode on the rig explicitly.
A new public API function 'rig_no_restore_ai()' is also added that
allows any client to disable this auto AI restore functionality if
required. Most clients should do nothing as restoring AI state is a
good thing.
This issue came to light with the HDSDR program which has no ID
command response. For these awkward cases try an FA command to check
if the rig responds then use that same FA command for set command
verification. Otherwise use the ID command as before.
Kenwood, modern Yaesu rigs and many SDRs use an auto information
mechanism that broadcasts unsolicited rig state changes, Hamlib does
not support this and turns off the function. Because several passive
devices rely on this information to detect band changes for example
this change adds code to save the AI state on start up and restores it
on exit. These devices do no need the broadcasts since when an
application using Hamlib is running as necessary state polling by the
application provides continuous rig state updates.
This means that rigctl & rigctld now work with default arguments on a
modern Windows machine with dual stack and localhost being [::1] as
the first interface returned by getaddrinfo().
Try all the interfaces return by DNS lookups to establish a connection
or listening port. Handle Windows network errors correctly so that
meaningful messages are printed.
The rigctl program now accepts IPv6 numeric addresses in the portname
field like [<addr>}:<port> for example the IPv6 loopback on port 4531
would be [::1]:4531.
This means that rigctl & rigctld now work with default arguments on a
modern Windows machine with dual stack and localhost being [::1] as
the first interface returned by getaddrinfo().
Try all the interfaces return by DNS lookups to establish a connection
or listening port. Handle Windows network errors correctly so that
meaningful messages are printed.
The rigctl program now accepts IPv6 numeric addresses in the portname
field like [<addr>}:<port> for example the IPv6 loopback on port 4531
would be [::1]:4531.
As with Kenwood, the new style Yaesu rigs do not ACK set commands.
Rather than wait for an error, it is quicker to send a follow up
simple query (e.g. ID;) and read the reply, if it is a valid response
then the original set command worked; if it is a NACK response e.g. ?;
then the original command failed. Use this mechanism to initiate
retries of the original command.
Current code always tries to set data mode with 'DAx' command after
setting the mode. According to 'PC control command reference' manual
that results in error for the CW, FSK and AM mode.
The provided patch sends 'DAx' only if we have some of the other modes.