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.
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.
There was an inconsistency in whether the CAT terminator character is
included in returned messages. It now follows the comment in
kenwood_transaction() i.e. strips of the terminator and returns a
message length that reflects that.
Allows for a single ';' for verification with the Elecraft XG3 single
character commands.
Allow for rig specific instance data (needed by the Elecraft XG3 that
is a bit different from the rest of the Kenwood/Elecraft group).
Do not send a startup command to turn off AI mode to the Elecraft XG3
as it doesn't have that command or mode.
Restore the positive RTTY mode enabled check to the Elecraft K2 as it
appears that the MD6; and MD9; comamnds are valid even when RTTY mode
is disabled on the rig.
The K2 initialization was checking if RTTY mode was available by
sending an MD6; command and they querying the mode to check if it
worked. The latest kenwood routines now fail if an invalid command is
sent to the K2 initialization need only try the MD6; command to see if
RTTY is available on the rig.
The K2 RTTY and RTTY-R modes should be modeled as PKTLSB and PKTUSB
respectively since they are AFSK modes.
Also ensured that Kenwood mode sets do not try and set RIG_MODE_NONE
as it makes no sense.
Use the absolute value of any negative value that may be passed in via
the width parameter to set_mode.
If RIG_PASSBAND_NORMAL is passed in, call rig_passband_normal() to
determine the normal width for the mode before selecting the correct
filter (needs testing).
(cherry picked from commit 94ea3ced4c)
Wayne Burdick, N6KR, advises that the forthcoming KX3 (prototype
shown at Dayton Hamvention 2011) will have an identical command
set to the K3.
Fix K2 and K3 backend versions.
The K2 and K3 support a TQ command to query the transmit status. As
only four bytes are returned it is much faster than the longer IF
command response. Access is via rig_get_ext_level--rigctl 'l' command
with a Level mnemonic of 'txst'. Returns '0' on RX and '1' on TX.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3032 7ae35d74-ebe9-4afe-98af-79ac388436b8
Implemented kenwood_cfg_params structure to allow RIT/XIT tokens to be
available to all Kenwood backend rigs (Fine Step and Voice announce are
also defined). K2/K3 rigs can only set/get RIT/XIT.
Updated README.k2/k3 for RIT/XIT functions and prior updates.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3031 7ae35d74-ebe9-4afe-98af-79ac388436b8
Test k2_md_rtty flag when k2_set_mode() is passed RIG_MODE_RTTY or
RIG_MODE_RTTYR to avoid erroneously attempting to set RTTY when
k2_md_rtty is unset.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3024 7ae35d74-ebe9-4afe-98af-79ac388436b8
An oversight had omitted the necessary call to set the K2 to K22
extended mode before setting the filter. The function now sets K22
properly, sets the filter width, and then K20 before returning.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3023 7ae35d74-ebe9-4afe-98af-79ac388436b8
K2 backend will now scan for installed RTTY mode and filters per
mode upon rig_open(). Implemented get/set mode in K2. The get_mode()
function checks the filter bandwith and returns that for the width
value and the set_() function will select and set an appropriate
filter based on the width passed in.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3021 7ae35d74-ebe9-4afe-98af-79ac388436b8
Among the changes:
I finally had the time to build the CAT interface for my TS450 and
discovered a couple of new commands.
MX; MX0; MX1; is used to activate the AIP function
FL; FLXXXYYY; is used to set the filters.
I made a perl script to try every possible two-letters command. If
amyone is interested, at their own risk, just ask.
I've then modified and optimized the kenwood driver:
- moved MD_ defined to .h
- added init/cleanup
- ts450_get_mode -> kenwood_get_mode_if
- support reading memory channel freq within kenwood_get_freq
- added kenwood_safe_transaction as an helper with result len check
- added kenwood_get_if
- added get_level for RIG_LEVEL_CWPITCH
- set/get for RIG_FUNC_AIP
- replaced ts140/680 get_mode and get_freq
- removed the delay on the ts450. it works just fine without it.
=============================
the attached patch requires the first one I sent and
addresses a few remaining issues
- converted 8 spaces to tabs
- added kenwood_mode_table
- added kenwood_simple_transaction helper func
- use kenwood2rmode and rmode2kenwood where possible
- some code cleanup
- use kenwood_safe/simple_transaction where possible
- added kenwood_get_mem_if (ts140,ts450,ts680,ts690,ts850)
- added kenwood_get_channel (ts450,ts850)
- added FUNC_FINE_STEP (commented out, we have no more func slots)
- added LEVEL_CWPITCH (set)
- no reason to have ts850_set_func, ts850_set_level
- ... ts480_get/set_ant, ts480_set_func
- ... ts570_set/get_ant, ts570_get_channel, ts570_get_rit
- ... ts680_set_func
- ... ts790_get_mode, ts790_get_vfo
this patch is a bit more extensive and tested only on the TS450.
feedback will be appreciated.
where I removed code I took care to verify that the generic
code in kenwood.c worked in the same way.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2591 7ae35d74-ebe9-4afe-98af-79ac388436b8