Fix declarations after statements
Remove some !rig checks...we either don't need them or need them everywhere with a new error code
If you pass a NULL rig you get what you deserve :-)
This found tons of errors in rig_debug statements
So this patch cleans up all the files that were producing warnings or errors
This should fix a few segfaults when running with debug turned on
Buffer size is now an input parameter only as the return data length
is implicit since a null terminated C string is returned. Better
precondition checks are impelmented.
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.
The function kenwood_cmd doesn't add value and it uses a reply buffer
that is not required. Also the use of a reply buffer disables the
verification of commands that have no reply feature. Substituted
kenwood_simple_cmd calls that do the job correctly without a reply
buffer.
Added delay to busy retry loop when sending commands to rig.
Implemented retries on wrong length repies from rig also with a delay.
- fix th_[sg]et_ctcss_tone(), let them handle the tone instead
of the CTCSS, covered by th_[gs]et_ctcss_sql()
- new tm_set_vfo_bc2() capable of split handling along with th_[sg]et_split_vfo()
- customize TM-D700 channel caps and channel desc size
- set TM-D700's timeout to 1 second
- fix TM-D700's targetable_vfo
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2979 7ae35d74-ebe9-4afe-98af-79ac388436b8
- fixed tabs and spaces
- added generic routine for vfo errors
- set_mem: do not switch vfo if already in mem mode
- simplified invocation of some commands
- buffer optimizations
- added PARM_BEEP and PARM_APO
- fixed getting of LEVEL_RFPOWER
- fixed get_ant
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2886 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
* get ready for freqs higher than 31 bits
* on freq higher than 470MHz, tuning step of TH-F7 must be at least 10kHz
* fix flexible th_get_mode
* added RIG_LEVEL_BALANCE/RIG_LEVEL_ATT
* and yes, we do want to read the transaction's reply, to know if successful
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2354 7ae35d74-ebe9-4afe-98af-79ac388436b8
* Flexible rmode_t conversion
* Made th_get_channel/th_set_channel more generic, esp. to work with TH-F7E
* Major TH-F7E improvements
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2348 7ae35d74-ebe9-4afe-98af-79ac388436b8
introduce PRIll (printf format) and SCNll (scanf) in misc.h.
This needs to have config.h included beforehand.
* do likewise with freq_t type (double) in rig.h
FREQFMT is deprecated.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1903 7ae35d74-ebe9-4afe-98af-79ac388436b8