Wykres commitów

37 Commity (f9856c6b85c20baa648c928990bd1aa5ac026b17)

Autor SHA1 Wiadomość Data
Bill Somerville f9856c6b85 Take out unecessary delays in K(X)3(S) back end. 2017-08-12 22:09:39 +01:00
Michael Black 1e462e10e0 Move K3 DT0 before mode switch, add version info to electraft rig open, WSJT-X VOX rig split now works 2016-11-19 10:38:54 -06:00
Bill Somerville 222ad74de7 Add RIG_PASSBAND_NOCHANGE as possible set_{split_,split_freq_,}mode argument
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.
2016-04-19 21:27:52 +01:00
Bill Somerville 0ab6d99ef5 Attempt to restore AI status on exit
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.
2015-11-29 18:26:39 +00:00
Bill Somerville d4edc35827 Increase the number or retries for most Kenwood rigs
It appears  that these rigs  can go busy  for a significant  time when
switching between Tx and Rx.
2015-10-21 21:56:13 +01:00
Bill Somerville aa9ad54b94 Remove kenwood_simple_cmd as kenwood_transaction has that functionality 2015-02-16 18:16:10 +00:00
Bill Somerville 4a74db654a Clarify the handling of Kenwood CAT message terminators
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.
2015-02-13 18:07:10 +00:00
Bill Somerville b1e41d2d2c Elecraft K3 has 1 stop bit 2015-01-24 14:59:56 +00:00
Bill Somerville 12e88dc33d Fix response length expected error in K3 back end 2014-10-20 13:43:34 +01:00
Nate Bargmann c230cad17b kenwood/k3.c: Avoid possible buffer overrun
Running cppcheck found that the string length given to strncpy was one
too large for the buffer.
2014-03-06 14:55:10 -06:00
Bill Somerville 266139aa7c Fix Elecraft K3 Data Sub-Mode Setting.
The data sub-mode has to be set after setting the bandwidth on the
"back" VFO since the BW$ command seems to reset the data sub-mode.
2014-02-14 21:12:50 +00:00
Bill Somerville f42ff9bd6d Fix Elecraft Data Mode Translation.
Ensure a valid mode is set for all possible mode set values.
2014-02-14 21:12:50 +00:00
Bill Somerville 09373ede8f Fix data sub-modes on Elecraft K3.
The K3 supports AFSK & FSK sub-modes and for the D versions it also
has an internal RTTY and PSK31 decoder. The decoder sub-modes are
reported as FSK (RTTY) and the AFSK sub-modes are reported as PKT(USB
& LSB). LSB modes are assumed to be RTTY and USB modes are assumed to
be PKT(PSK, WS modes etc.).

For mode set the data sub-modes are set as follows:

RTTY -> FSK D normal (LSB) VFO shows MARK QRG
RTTYR -> FSK D reversed (USB) VFO shows MARK QRG
PKTUSB -> DATA A normal (USB) VFO shows suppressed carrier QRG
PKTLSB -> AFSK A normal (LSB) optimised for RTTY VFO shows MARK QRG

Not all data sub-mode combinations are possible but the above mapping
seems most likely to cover the user requirements.
2014-02-14 21:11:24 +00:00
Bill Somerville 6e57454b06 Add spilt mode get and set for Elecraft K3. 2014-02-14 21:11:24 +00:00
Nate Bargmann 977e92315e elecraft.c: Quell compiler warning of buffer size
GCC 4.8.x revealed an error in the way the destination buffer size was
calculated for storing the K3 firmware revision.  Now, instead of
declaring the array in the kenwood_priv_data structure, it is declared
as static in elecraft.c and a pointer is now assigned in the
kenwood_priv_data structure.  This allows for proper calculation of the
array size for strncpy().
2013-07-24 22:48:07 -05:00
Nate Bargmann 2b5f02d442 k3: Implement new RIT/XIT function
For the K3 RIT/XIT are now explicitly turned On/Off by calling
rig_get/set_func() and passing RIG_FUNC_R/XIT and the status of 1 or 0.

When setting the RIT/XIT offset by calling rig_set_r/xit, an offset of 0
will clear the RIT/XIT offset but will no longer turn the RIT/XIT
function Off.  Likewise, an offset can be set but not active until the
RIT/XIT function is explicitly turned On.
2013-01-18 05:50:01 -06:00
Nate Bargmann 334e845d4f Test for PB width < 0, normal PB, or +- limits
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 setting the bandwidth.

The width parameter is tested against wide and narrow filter values and
set to the returned values as upper and lower limits if width falls out
of those bounds.
(cherry picked from commit bb6c6493e1)
2012-06-28 18:11:33 -05:00
Nate Bargmann 1bb3697c87 Support high resolution S-meter on K3
Recent firmware versions since 4.37 now offer support for higher
resolution for the S-meter output via the SMH command.  The K3 backend
performs the STRENGTH level routine and passes other levels to the
Kenwood backend.

This patch has not been tested with a firmware version older than 4.39
to assure that operation with the SM command still works as expected.
2011-11-22 16:49:18 -06:00
Nate Bargmann 8d16bebf40 Update LGPL header in Kenwood source files.
TNX to Lucian Laga, YO6PLB, for the notification.
2011-08-22 21:38:35 -05:00
Nate Bargmann 938f33058d K3/KX3 S-meter calibration.
K3 returns S-meter values of 0-15.  Tested with grig 0.8.0~rc1.
2011-08-20 16:04:57 -05:00
Nate Bargmann 7fbcc9d9e1 Implement K3 RIT/XIT clear via rig_set_ext_level()
Create new confparams token of 'ritclr' for clearing RIT/XIT offset
without turning off RIT/XIT function.  Thanks to Tor, N4OGW, for the
request.  May be replaced in the future by a dedicated RIT/XIT clear
function in the Hamlib API.
2011-06-07 18:04:58 -05:00
Nate Bargmann 2808713233 Sanitize rig_debug() output levels per docs.
Set most rig_debug() calls to leve RIG_DEBUG_VERBOSE and only use other
levels when it makes sense.
2011-06-03 16:09:25 -05:00
Nate Bargmann 3757b9af27 Correct K3 set_ant
As the K3 does not return a response to the AN? set command, direct the
backend to use kenwood_set_ant_no_ack() instead.  Thanks to Alexander
Sack, KC2ZSX for catching this.
2011-05-27 21:01:45 -05:00
Nate Bargmann 85f3db121a Add KX3 to K3 rig_caps.model_name
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.
2011-05-22 07:59:09 -05:00
Nate Bargmann, N0NB 6de8bb5089 k3_set/get_split_mode dummy functions
The K3 will swap VFOs with the frontend's implementation of
get_split_mode when the backend's definition in rig_caps is NULL.  These
functions simply return -RIG_ENAVAIL when called to preserve the K3's
operating state.

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3057 7ae35d74-ebe9-4afe-98af-79ac388436b8
2011-02-19 02:58:11 +00:00
Nate Bargmann, N0NB 1a4d075490 K3 specific set_rit, set_xit
Added support for the K3's ability to set RIT/XIT offset frequency
directly.
Coding style changes.

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3056 7ae35d74-ebe9-4afe-98af-79ac388436b8
2011-02-18 02:04:05 +00:00
Nate Bargmann, N0NB 58842fb417 Add support for TX Query on K2 and K3
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
2011-02-01 03:18:36 +00:00
Nate Bargmann, N0NB 15615ec467 Add extension parameter handling for K2/K3 RIT/XIT
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
2011-02-01 00:48:45 +00:00
Nate Bargmann, N0NB a8ac278878 K3 get extra level for IF center frequency
Implemented rig_get_ext_level() for the K3 FI command which returns the
last four digits of the IF center frequency.  This value changes as the
operator adjusts the shift control, changes mode, or adjusts the bandwidth
control.  The function returns the actual frequency of 8210000 Hz plus
the value returned by the FI command.

To get this frequency value the token IFCTR must be passed to
rig_get_ext_level().  This token is specific to the K3 backend.

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3029 7ae35d74-ebe9-4afe-98af-79ac388436b8
2011-01-31 04:03:58 +00:00
Nate Bargmann, N0NB 7ba0620356 Implement filter scanning and get/set mode on K2
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
2011-01-19 02:39:51 +00:00
Nate Bargmann, N0NB 8ac3a90885 Moved K3 specific functions to k3.c
Keep shared functions in elecraft.c



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3004 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-11-03 03:08:33 +00:00
Nate Bargmann, N0NB a298c8e7eb Implement k3_set_vfo()
Document K3 backend particulars om README.k3



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3003 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-10-30 14:25:46 +00:00
Nate Bargmann, N0NB b57d9e1a37 Support for Elecraft extensions to base Kenwood functions (particularly
for the K3).
Added debugging print functions to all Kenwood backend functions for
easier debugging.



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3002 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-10-29 21:20:51 +00:00
Stéphane Fillod, F8CFE 48c055dd3d closer look at the K3, still untested
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2629 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-02-10 22:51:21 +00:00
Alessandro Zummo, IZ1PRB c6cdfe91a8 Remove const from priv_caps to allow kenwood_init to initialize default values if they're missing
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2600 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-01-28 23:30:59 +00:00
Nate Bargmann, N0NB 30f66de479 Several Kenwood patches from Alessandro Zummo, azummo-lists@towertech.it
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
2009-01-23 03:24:42 +00:00
Stéphane Fillod, F8CFE 57dca4a25a new backend for the Elekraft K3
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2378 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-09-01 19:01:13 +00:00