hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 12)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
(20) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Nate B. <n0...@us...> - 2021-05-17 22:33:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 300da9c8dac986e20a05677f868daf24b03a9c1a (commit) via aaee375d48cbe1411c110d556429fdfcb1414eee (commit) from fdf1f7f6f01ef4f265fcd7a33859e0a976756389 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 300da9c8dac986e20a05677f868daf24b03a9c1a Merge: fdf1f7f6 aaee375d Author: Nate Bargmann <n0...@n0...> Date: Mon May 17 17:32:16 2021 -0500 Merge pull request #702 from N0NB/doxygen_work Distribute logo image file for the Doxygen manual commit aaee375d48cbe1411c110d556429fdfcb1414eee Author: Nate Bargmann <n0...@n0...> Date: Mon May 17 15:15:17 2021 -0500 Distribute logo image file for the Doxygen manual diff --git a/doc/Makefile.am b/doc/Makefile.am index 0bf6d047..cdf653ea 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = hamlib.cfg index.doxygen hamlib.css footer.html +EXTRA_DIST = hamlib.cfg index.doxygen hamlib.css footer.html hamlib.png dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \ man1/rigctl.1 man1/rigctld.1 man1/rigmem.1 man1/rigsmtr.1 \ ----------------------------------------------------------------------- Summary of changes: doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-17 05:06:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via fdf1f7f6f01ef4f265fcd7a33859e0a976756389 (commit) from 561b8d0785161eaf2f9bc70b1f86089e0cae2505 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fdf1f7f6f01ef4f265fcd7a33859e0a976756389 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon May 17 00:05:16 2021 -0500 Fix newline in help in rigctld.c diff --git a/tests/rigctld.c b/tests/rigctld.c index 4dd07053..31ec01f6 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1219,7 +1219,7 @@ void usage(void) " -o, --vfo do not default to VFO_CURR, require extra vfo arg\n" " -v, --verbose set verbose mode, cumulative (-v to -vvvvv)\n" " -W, --twiddle_timeout timeout after detecting vfo manual change\n" - " -W, --twiddle_rit suppress VFOB getfreq so RIT can be twiddled" + " -W, --twiddle_rit suppress VFOB getfreq so RIT can be twiddled\n" " -x, --uplink set uplink get_freq ignore, 1=Sub, 2=Main\n" " -Z, --debug-time-stamps enable time stamps for debug messages\n" " -h, --help display this help and exit\n" ----------------------------------------------------------------------- Summary of changes: tests/rigctld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-05-17 02:45:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The annotated tag, 4.2 has been created at 5123acdb3e08f1d1f0271316d0406a112e62207d (tag) tagging cdad07b5f66c5bc0f993511d333fe55554f6d8f9 (commit) tagged by Nate Bargmann on Sun May 16 21:43:56 2021 -0500 - Log ----------------------------------------------------------------- Hamlib 4.2 release -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEG5vcSeqIHtMzWHg79yYl4u2+1ZgFAmCh2J8ACgkQ9yYl4u2+ 1ZgGwQwAynD/B50F2kaEBfPFYHtYkbvnQ3JRr81Ev7OPONpn+mIFq/tvwTr6obMy AIf1rLm5GaXwa178dqDfL1NgZE18BQUq5S+AjbRCbmetSyn2Ov3X6WWtGgYyTmgU CSp2fsOool2xhoSCd86LleVTQoX0NFGxgIKgZt58btI+B0hhBPbgSo/LhPllyFFA Iv7KbeR7qaIy56PUJI4dyRpxFLT1pef7cFpDy3g4kr/Yra/d0Tp4cNF8fg86ivHU 1lsP+g45WQDtDfla48mqSVRdg+DITu4GJdeyQ86URPY7YTSdEV7biryrPisMBYAG oH9BcRxP4qpqJM0cDA9100Hw9mWcCn0QkQEIdToDWuq2a2Gbj/wB4QpJgPVtvEFz IrX5jPIrAxcaD9T94YZedlhje+MEXKr5p/OHAXoqhZUlm8uQrgmeIPJWXLqxG97j SwyP7bcQtwbKS/yRHw4w4feyPxdcr6LAhmXozss96a71qJ88k0Tt3QleP5wiWboO gtJAXiLn =xOKW -----END PGP SIGNATURE----- (no author) (1): New repository initialized by cvs2svn. Adrian Chadd (1): Upgrade TS-711 and TS-811 to work. Agis Zisimatos (1): easycomm: Return the correct value of pointer val Alessandro Zummo, IZ1PRB (36): Remove const from priv_caps to allow kenwood_init to initialize default values if they're missing Call kenwood_init in each and every driver Use an appropriate debug level Support get/set_powerstat on pcr100 Add kenwood_simple_cmd Make set_ptt behave as before, fix set_ant for ts570.c ts450: remove RIG_FUNC_TONE from has_xx_func if tone unit is not detected ts450,ts690,ts850: use FL command to get/set filters in get/set_mode. (code from ts850.c) ts450: indentation fixes remove fixed command terminator (;) from generic code ts140,ts2000,ts480,ts570,ts680,ts850,ts870s: remove usage of fixed ; and EOM fix tabs thg71,tmv7,ts450s,ts690: verify rig id at rig_open ts450: implement set_channel remove unused parameter from get_kenwood_func ts570,ts850,ts870s,ts140,ts480,ts680: use kenwood_simple_cmd where possible Replace __FUNCTION__, which is gcc specific and was deprecated a long time ago, with __func__, which is at least defined in C99. generic, ts850: implemented CTCSS TN command (reported not working for ts850, should now be fixed) Add description for the kenwood mode n. 8 implemented set/get_ext_param (voice, fine, xit, rit). enabled on ts450 and ts850 Added my call sign removed comment about switch optimizatons. the compiler will generate the assembly code in a different order which is usually based on the case value. other compiler optimizations might also affect it, so it's useless to optimize the order. check ptt status before set_ptt. enabled on ts850. style fixes band up/down was inverted Try to compensate for leftover characters Try to cope withe the PCR100 and PCR1000 at the same time Bumped out to beta, solved a few bugs. Tested with PCR100/1000/1500. kenwood: send the whole buffer at once, added kenwood_cmd - removed EOM, it's handled by kenwood_transaction - 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 tmv7: removed EOM thg71: removed EOM thf7: - wrong rfpower level granularity - added .reset - call kenwood_open - use generic th_set_vfo th: fixed formatting issue th: fixed stack corruption th: fixed a missing newline Alex V Flinsch, KC2IVL (8): Initial changes for ft100 Initial release initial release fixed various command options new file, list of tones/codes and sequence used by various yaesu rigs added get frequency to ft100 code added getinfo func hdr *** empty log message *** Alexander Sack (1): Get firmware revision level from K3/KX3. Alexander Schultze (3): easycomm: include a new EasyComm3 to support move speed and infostring update EasyComm3 to include setting and getting of config and status easycomm: implement get/set config, easycom include status and error bytes, fix get_info Alexandru Csete OZ9AEC (34): Added new stylesheet to make API docs look better. Modified to use new stylesheet. Added doxygen comments. Added rotator.h and rotlist.h to the input list. Applied Tommi's improvements from the FT-857 backend with the following changes and additions: Full RF power scale corresponds to 10 bars, not 15. Added RIT, XIT and IF shift ranges to dummy backend. Cast constant caps to variable caps in order to avoid compiler warnings. Cast from const to variable in order to avoid compiler warnings. - Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (ft920). - Disable unused functions and variables (frg100). - Incremented backend version numbers. Use tone_t for pcr1_ctcss_list. Changed arg 4 of pcr_transaction to unsigned. Cast the other mismatches to (char *). Cast unsigned char to char in order to avoid compiler warnings. Incremented backend version number. - Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (tentec.c). - Cast unsigned char to char in order to avoid compiler warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast unsigned char to char in order to avoid compiler warnings. - Handle all enum values in switch statements. Fixed type mismatches that caused compile warnings. Fixed type mismatches that caused compile warnings. Initialise icom_val to avoid compiler warning. Fixed type mismatches between signed and unsigned char. There are a few very suspicious 'if' statements in icom.c and frame.c - Fixed type mismatches and unhandled switch cases. - Incremented backend version numbers. Cast constant caps to variable caps in order to avoid compiler warnings. Updated. Added infor about w (send_cmd). Max serial rate is 9600. Changed backend status to stable. Escape the backslash character. The 765 can do RIG_SCAN_PROG and RIG_SCAN_MEM. Fixed S-meter reading to use calibration table since frontend always uses RAWSTR. Fixed RF power reading and added power2mw and mw2power. Fixed RIG_LEVEL_STRENGTH reading. Andrew Errington (1): Initial support for CM108 GPIO contorl of PTT Ben Coleman, NJ8J (6): Fixed bug in rpcrig_set_parm (using RIG_LEVEL_IS_FLOAT instead of RIG_PARM_FLOAT) Fixed same bug in rigctl_get_parm. Added checking of return string from rig on set (non-retrieval) commands. Added code for COMP function. Added alinco_set_parm & tweaked dx77 capabilities. Handle setting Keyer speed and CW Pitch Added NJ8J's email address. Change email address for NJ8J Berndt Josef Wulf, VK5ABN (11): Implemented rig_set_channel() Implemented set_parm() for BACKLIGHT operation Commented out RIG_MODE_PKTFM overlooked at the submission of previous code Implemented RIG_MODE_PKTFM and RIG_MODE_PKTLSB modes Changed debug message format for freq_t from long long to double ft990_get_ptt() now uses the FT990_SF_XMIT instead of FT990_SF_PTT. FT990_SF_PTT only returns status of PTT activated by CAT commands, whereas FT990_SF_XMIT reports the actual status of the ptt line. ft990_get_mem(): Fixed bug that prevented the reporting of current channel number when vfo != RIG_VFO_MEM Fixed erroneous return value Fixed mispelled name for VK5ABN Added missing modes to RX/TX caps Fixed bug in ft990_set_mode that caused RTTY interchanged modes USB/LSB Fixed bugs in ft990_get_channel Bill Barker (1): Add test for Flex 6300 ID Bill Somerville (212): Patch submission for IC-756 Patch to allow same serial port for PTT and CAT. Patch to fix broken Yaesu backend with FT-2000(D) Fix rig_open not failing when PTT/DCD port is unavailable. Fix Icom IC-756 filter handling. Fix Yaesu newcat backend set_tx_vfo issue. Add support for Data Modes on Icom "Pro" models. Fix Icom IC-726 mode handling. Fix Kenwood TS-2000 split operation. Fix Kenwood Split Operation for TS50 & TS480. Fix Kenwood TS-870s split and bandwidth set/get. Correct receive buffer length for IS; comamnd. Fix Kenwood CAT transaction busy retry mechanism. Fix Kenwood get split VFO function. Add data sub-mode support for TS590s. Correct order of MD and DA commands for TS590s. Get firmware revision for TS590s in rig_open. Fix TS590s firmware defect. Fix Kenwood get_vfo function returning wrong VFO in split TX. Make Kenwood TS590s firmware defect fixup revision specific. Extend TS590s firmware defect fixup to both VFOs. Fix Icom IC-756 Pro III get data mode. Add spilt mode get and set for Elecraft K3. Fix data sub-modes on Elecraft K3. Fix Elecraft Data Mode Translation. Fix Elecraft K3 Data Sub-Mode Setting. Fix Yaesu FT1000MP and FT1000MP Mk V modes. Fix configure.ac Fix a warning message. Added option to not use VFO XCHG command when setting split parameters. Fix a buffer overflow in the Windows termios emulation. Fix pkg-config generation. Fix Icom IC-756Pro mode get/set. Facility for rigctl to read commands from standard input. Add a pause command to the rigctl command set. Prefix action function names so as not to clash with system names. Prefix action function names so as not to clash with system names. Corrected typos in rigctl.1 manpage. Add read commands from stdin and pause command features to rotctl. Merge branch 'rigctl-stdin' of ssh://git.code.sf.net/u/bsomervi/hamlib into rigctl-stdin Fix manpage errors. Remove redundant RIG_PTT_SERIAL_CAT enum from ptt_t Only check for serial control line conflicts if PTT shares CAT port Fix Ten-Tec Orion get/set split functions Icom IC-7410 has VFO A/B not MAIN/SUB Added IC-7410 data modes Add retry mechanism for Yaesu "newcat" backend Implement retries for Yaesu "newcat" rigs Disable auto information mode on open Add retry mechanism for Yaesu "newcat" backend Implement retries for Yaesu "newcat" rigs Disable auto information mode on open Merge branch 'yaesu-retries' of ssh://git.code.sf.net/u/bsomervi/hamlib into yaesu-retries RIG_OK is zero and need not be negated and this will not change Fix response length expected error in K3 back end Data mode support for the Icom IC-7700 Data mode support for the Icom IC-9100 Data mode support for the Icom IC-7200 Add support for the Kenwood TS-590SG Kenwood TS-590SG Always clear serial control lines when used for PTT Disable AI mode on open for Kenwood/Elecraft rigs Add more diagnostics and error checks to serial line control Move serial line control error checks to lower level routines Merge branch 'master' into kenwood-ai-off-at-start Merge branch 'master' into ptt-control-on-cat-port Fix serial i/o on Windows. Yaesu newcat style command response reading improvements Increase communications timeout for Icom rigs Kenwood AIn; command has no reply Revert read_string() to partial results are a success status Remove gratuitous sleeps before function exits Error checks on simulated direct VFO addressing Elecraft K2 RTTY modes are not FSK Kenwood and Elecraft rigs sometimes ignore commands Removed kenwood_cmd function and replaced uses of it Allow for failed test command on the K2 Elecraft K3 has 1 stop bit Kenwood TS-570 series IF returns current frequency Switch to "ID;" command for verification as no "AI;" on TS-840s Increase Elecraft K2 comms timeout and retries Switch Kenwood TS940 to generic kenwood CAT functions Improve command verification for Kenwood & Elecraft Use local buffer in kenwood transaction funciton Clarify the handling of Kenwood CAT message terminators Further clarification in the implementation of kenwood_transaction() Removed redundant precondition test Remove kenwood_simple_cmd as kenwood_transaction has that functionality Call kenwood_open() for TS-2000 to ensure AI mode is disabled Allow for bad ID from DDUtil in TS-2000 mode Allow one extra byte in read_string() length to accomodate terminator Enable data modes for the Icom IC-7100 Allow for PowerSDR ID in Kenwood TS2000 emulation mode Fix TenTec Argonaut message lengths and timeout Fix TenTec set split command Implement get PTT status for the TenTec Argonaut Fix error with width in set mode for the TT argonaut Yaesu FT540 can only change the frequency of the current VFO Fix defect in Kenwood TS-940 IF command response parsing Fix response lengths for the TT Jupiter 538 Do not attempt CAT PTT commands on the Icom IC-706mkIIG Use correct argument type for serial control line functions Initial back end implementation for the Kenwood TS-990s Mode set is not VFO targetable on the Kenwood TS990s The Kenwood TS990s only does split Tx on SUB VFO The doesn't appear to be a way of getting PTT/SEND on the TS990s Lower both RTS and DTR on alternate PTT serial port Honour any error status from serial port calls Dummy get_ptt function needs to read RTS/DTR/PARALLEL Make autogen.sh agnostic to whitespace in paths Increase the number or retries for most Kenwood rigs Command validation for Yaesu set commands Remove unecessary delays from TS-940S backend Proper IPv6 and dual stack networking Fix compiler warnings Proper IPv6 and dual stack networking for rotator net daemon Attempt to restore AI status on exit Allow for poor emulations of Kenwood rigs that have no ID command Use correct function to execute set type commands with no response Add a new command line option '--no-restore-ai' ('-n') to rigctl Fix FT-817/857/897 issues and add some missing functionality Fix missing PKTUSB mode setting code for FT-817 & FT-897 Fix a logic error in band detection during IC-910 set frequency Add missing configuration getters Detect C-IV NAK returns as rejected commands Elecraft rigs do not switch VFO in IF command responses during split Tx. Redundant split mode directives on Elecraft rigs cause Tx failures Only use IPv6 features on Windows versions that support it (>=XP) Improve IPv6 portability and consistency Add 23cms to IC-910(H) backend Implement combined split VFO frequency and mode setting. Initial implementation of rig_{set,get}_split_freq_mode() for FT-857. Implement rig_{set,get}_split_freq_mode() for IC-756 series. Add {get,set}_splitfrequency_mode for the IC-910(H) Elide unnecessary CAT commands when setting split frequency and mode Do not swap VFO unnecessarily Better set frequency semantics for the IC-910(h) VFO targetable get frequency operation for the Icom IC-910(h) Make sure right band is used when setting frequency on IC-910(H) Use rig state rig port retry option rather than from capabilities Use a sensible port timeout value for the Kenwood TS-850 Further attempts to simplify and improve Icom CAT for split operating Add RIG_PASSBAND_NOCHANGE as possible set_{split_,split_freq_,}mode argument Switch to POSIXLY_CORRECT mode for getopt_long() Fix a regression introduced in 222ad74 Do not crash if expected CTCSS tones not sepcified Do not attempt to query AI state on the TS-450s as it is not supported Some more Kenwood rigs with no AI query Adjust rig_list_foreach to allow use for unregistering Fix an issue presenting on the Yaesu FT-450(D) Release the serial port used for PTT when possible Change the IC7600 & IC7800 set/get mode to versions that support DATA modes Add rig_{open,close} functions to TS-790 backend Revised kenwood rig busy response handling Add get and set split functions for the TS450S Simplify and fix defects in the FT991 back end Fix some endian issues in the si570/AVR SDR back ends Fix a state machine defect with repeated PTT reset calls Do not pass --no-cpp_precomp to compilers on Mac OS X Allow RIG_LEVEL_STRENGTH queries over the network link Stop rigctld and rotctld crashing when service threads cannot write to clients Use snprintf throughout kenwood/kenwood.c for buffer safety Fix off-by-one issue in reading memory mode from IF command response Fix some issues with commands not supported by TS-2000 CAT emulations Add best guess transmit status to rig state structure Take out unecessary delays in K(X)3(S) back end. FT-817 status queries honour retries and timeout Make rig_open() call in rigctld lazy and add graceful termination Simplify SWIG interface definition and hide 64-bit values from Lua binding Remove unnecessary delays from TS-990 and TS-2000 back ends Change frequency setting for the FT-747GX to something more basic Fix an incorrect error return value from win32_serial_select() Fix timeout issues with the Ten-Tec Orion/Eagle Ensure compilation works with a pre C11 compiler Make code C90 compliant again Move unnecessary global and file static variables to the stack Simplify unnecessary persistence of extended response state Fix misunderstanding of netrigctl_transaction() return value Made PTT and DCD options consistent between rigctl and rigctld Report unrecognised PTT and DCD types in rigctl and rigctld Update i/o functions to support GPIO(N) port closure Fixed erroneous messages in rig_close with GPIO(N) PTT or DCD types Remove duplication across GPIO and GPION handling of PTT and DCD Improved get PTT state handling in dummy backend Simplify closing of device files Repair a regression with the dummy get PTT functionality Revert "Add debug to serial.c" Repair a regression with the dummy get PTT functionality Revert "Add debug to serial.c" Fix regression with slow responses from SmartSDR causing errors Deal with remote PTT type at the client end Avoid 'echo -n' as macOS sh doesn't support it Fixing an operator precedence defect Updates to the TH-D7A/E back end Less ambiguous variable name and repair merge issue in prior commit Add missing config parameters for rig power on/off and screen-saver New power on option rather than power on/off Make version recording safe for parallel builds without breaking make dist Make version recording safe for parallel builds Ensure old hamlibdatetime.h headers in the source dir are ignored Merge branch 'safe-scs-versioning' of ssh://git.code.sf.net/u/bsomervi/hamlib into safe-scs-versioning Fix make dist versioning Use BUILT_SOURCES make mechanism as intended Fix rebuild dependency Build hamlibdatetime.h every time Force copy over existing Minimize rebuilding Correct use of sh if Another attempt at a reliable SCS version header generation Remove temporary file Add missing shared library API exports Add missing export definition Blaine Kubesh (8): added Icom803 to icmarine added Icom803 to icmarine added Icom803 to icmarine Update ic-m803 remote-id to 20 Update icm803.c Update AUTHORS undo author changes Update icm803.c Bob Freeman (1): New CNCTRK rotor backend Brian G. Lucas (10): Pretty much a complete re-write of thd72.c, since the old one didn't work at all. Many commands have been tested with real hardware. But more work remains to be done. WIP: thd72 driver. More level, func, and parm stuff works. WIP: thd72 driver. Try to simplify the menu based interface. WIP: thd72 driver. First cut at get_channel(). Other cleanup. WIP: thd72 driver. More interfaces implemented. Other cleanup. Implement some more interfaces. Comment out get_chan_all_cb because the block read routine doesn't work. Fix a format so that it works with Windows. Can't test it because I have no Windows machines. Fix RFPOWER level for FT-450D. It uses 5-100, rather than 0-255 that the FT-450 does. In newcat_open(), initialize rig_id in case any subsequent commands need it. Some calls to thd72_get_menu_item where passing wrong values for range check. C-Elegans (1): Add ability to have rigctld display transverter frequency Charles Suprin (7): Add file for TM-D710 support. Merge branch 'master' of ssh://hamlib.git.sourceforge.net/gitroot/hamlib/hamlib Add D710 to riglist. Add D710 code to kenwood library. Register D710 interface. Initial D710 Implementation. Register D710 interface. Charles Suprin, AA1VS (3): extend th_get_vfo_char to support D700 Changed th_set_freq to round and select step size to use. Allows 6.25kHz and 5kHz channelization. Use new th_set_freq for TM-D700 Chris Karpinsky, AA1VL (7): add serial_flush() method to clean rx buffer initial stab at this for the Yaesu FT-817 add ft817.* add ft817 bump the backend status to ALPHA Initial entry of cgirig giving ability to use hamlib from a web browser. increased post write delay to 300 Chris Ruvolo (4): TS-690: deal with optional tone board using TS-450 logic TS-690 does not implement the PC command to get/set output power level TS-690 does not implement the GT command to get/set AGC rate TS-690: bump version Chuck Hemker, N2POR (1): Use RIG_TARGETABLE_MODE in rig_set_mode and rig_get_mode DL1YCF (6): Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Dale E. Edmons, KD7ENI (19): Added comments to commandline in rigctl (second time) --Dale Started TS-2000 update/overhaul --Dale Copied too much stuff, backed out what I broke. Bring ts2k.c more in line with current CVS. Changed ts2000.c to ts2000.h. Start of rig menuing functions. New file. Renamed ts2000.c.new ts2000.h Bring code more in line with CVS code. Changes often, so added status. Will delete when things stabilize. Corrected status to CVS branch. Renamed new ts2000.c to ts2000.h Wouldn't compile. Removed ts2k.c. Haven't got all new rig.h stuff removed. Temp kludge to make ts2k.c compile (keeps Hamlib from compiling!). Updated status. Added working TS-2000 files. There are some changes left out but this is the minimum I could commit and have a functional rig. The cost is that I've broken kylix and others that duplicate rig.h. I'm in the process of repairing the damage. Please be patient. I hope a day or so, but am asking for up to a week. E-mail me about *anything* you find broken. Kylix (and similar) is (are) known to not work. Changed name back to original. Had to re-run automake kenwood/Makefile. 1) Updated branch_ts2k with respect to HEAD. 2) Working ts2k_menu. (only in RIG_MODEL_TS2K) 3) Split TS-2000 into experimental and standard versions: RIG_MODEL_TS2000 = standard, RIG_MODEL_TS2K = experimental. 4) Basic command parser in tests/rc. Will open/close rig or copy a freq from one rig/vfo to another rig/vfo. Very cool. Very basic. Very experimental. 5) Added test programs. a) testcmd - calls parser (no command prompt yet!) b) testts2k - replacement for testrig (with trivial modification) c) testptt - testts2k/testrig should not transmit. TX stuff in testptt. 6) Used crowbar to merge HEAD into branch_ts2k. Working on clean-up. 7) I'm sure I've forgotten or neglected to mention some other stuff. Daniel Estévez (2): Fix DIG MODE for FT817-ND Fix DIG MODE for FT817-ND Daniele Forsi (5): Set the executable bits on py3test.py Fix spelling errors Fix more spelling errors Fix more spelling errors Fix typos Daniele Forsi IU5HKX (1): Fix a [missingInclude] "information" when running cppcheck --check-config Dario Ventura (3): New Prosistel rotor backend from IZ7CRX Add elevation code to Prosistel backend TS2000 Satellite mode and Gpredict Dariusz Bismor, SQ9KEJ (1): rigmem: implement CSV file loading David Fannin (1): Submission for new backend model (134) for Yaesu FT-DX1200 Davide Gerhard (3): tests/{memcsv.c,memsave.c}: partially revert commit 4072f9f4 ic746.c: correct chanbuf length, fix channel structure and support split ic746.c: add ic746pro_set_channel() to load memory from csv Dawid Szymanski (2): ICOM Voice Keyer implemented. typo fix Diane Bruce, VA3DB (5): - first cut at fixing configure to recognise --without-tcl-binding and --without-python-binding options - gt_HEADER_INTTYPES_H is definitely bogus here, leftover from what? - document debian/FreeBSD needs for AUTOMAKE etc. - add in libtoolize which should be there - These should have been commented out. - Extra comma on RIG_STATUS_BUGGY can cause a compiler error. Dieter Röver (1): Fix bug in vfo_comp calculation in Hamlib Ekki Plicht (DF4OR) (2): New model Icom IC-R8600 Patch for Icom DCS code handling Elliott Liggett (1): Added functionality for the IC-7300 auto antenna tuner Eriks Dobelis (2): ft817: adding delay before next retry after returning from tx to rx ft817: Moving delay value into #define section of the header Ervin Hegedus (9): RIG_PASSBAND_NORMAL wasn't handled correctly when rig_set_mode() was called - fixed Fixed SWIG `Setting a const char * variable may leak memory' error Fixed Kenwood filter cmd when passband is set to 500Hz Merged from upstream Merge branch 'master' of http://git.code.sf.net/p/hamlib/code Added Lua binding and demo script Added new example to Python demo script (set/get float type level) Change variable length argument handling in affected functions Fix two typos Ervin Hegedüs (1): rig.swg: New properly formatted macro Evgeniy Titorenko (1): Add Radant AZV-1 Rotator controller protocol. Francois Retief (21): Added read_serial function to read strings from a port. Corrected some comments Added code to hexdump to right align ASCII dump column added private caps for rig termination character add private caps and more commands. Changed to a new transaction function and adde quite a few commands. add private caps to store the termination character of Kenwood rigs commands. added a kenwood_init and _cleanup routine for priv caps & priv data. Added a new function: LCD Lamp ON/OFF (for Kenwood TH-7DA) check trn state of rig in rig_open. Initial commit of Kylix binding New backend for rotators New RPC backend for rotators Added rot_move function Fix macro name Added rot_move function Added easycomm and rpcrot backends Fixed circular dependency for rpc.rigd and rpc.rotd regenerated Added IC-910 rig. Added constants for the IC-910 rig. Frank Goenninger (3): Add ADAT ADT-200A backend adat updates from Frank, DG1SBG ADAT fixes on Windows Frank Singleton, VK3FCS (165): Initial revision Initial revision *** empty log message *** *** empty log message *** *** empty log message *** Initial revision Initial revision *** empty log message *** *** empty log message *** added build_all ,cleanall and verify targets *** empty log message *** initial top level makefile add some things initial import initial import initial import fixed some typos use rig_open and rig_close added rig_open and rig_close fixed cmd_sat_on / off added sat-on and sat_off to test changed cmd_get_rx_status, must do tx also updated test() all reads use while (1) and break added ../common as object path added rig_open and rig_close using rig_open and rig_close and serial.h use common dir for serial stuff use ft747 on serial port /dev/ttyS0 read uses while(1) and break use while(1) and break added read_sleep use read_sleep now from serial.h using read_sleep from serial.h had rx and tx status swapped (document error?) removed cmd_get_update using CVS instead of RCS directories use MODE_xx defines cannot use const int in case statements ?? so use #define instead use #defines for MODE_XXX used in case statements working out freq conversion, unfinished playing with test routines long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode); long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode) frq = cmd_get_freq_mode_status_main_vfo(fd, &mode); starting with the cmd_set commands now starting on cmd_set commands now starting on cmd_set_freq commands now add scanning todo now set sat rx and tx freq and mode also fix typo dump raw hex data when writing and reading trying some cms_set_freq_xxx commands added routines for dec <-> packed decimal conversion minor added generic hex dump routine, static void dump_hex(unsigned char *ptr, int size, int width); removed unwanted debug printf's removed dump_hex from here.. calc_freq_from_packed4 is about to be replaced calc_packed_from_char and calc_char_from_packed now here cleanup cleanup void dump_hex(unsigned char *ptr, int size, int width); adding dcs tables and repeater offset in Hz describe faulty yaesu documentation added README.license for GPL added GPL license info included full GPL license Updated docs to point to http://sourceforge.net/projects/hamlib/ and added a C code snippet on how to use the API. added -I$(COMMON_DIR) to find rig.h added -I$(COMMON_DIR) to find rig.h adding capabilities initial capabilities stuff starting to add rig_caps stuff starting to add rig_caps stuff starting to add rig_caps stuff. added GPL stuff and comments adding rig_caps stuff adding rig_cap stuff adding rig_caps stuff add capabilities and preferences adding rig_caps functionality adding rig_caps stuff frontend reduction on backend function namespace - phew !! frontend API clarification removed old open_port2() using old rig_caps fixed some typos, added 3 more candidates for API missing ; in some enums converting to frontend/backend structure compiles ok removed open_port() and write_block() removed open_port() and write_block() fixed typos, added &ft747_caps in rig_caps changing to frontend/backend style converting to frontend/backend style added 3 more cmd_* for API examples Example of setting rig Main VFO to 439.700 Mhz FM cleanup comments added extern const struct rig_caps ft747_caps; still thinking about set/get strategy minor updates added extra rig caps added some set/get examples with return code checking added testrig to Makefile, no linking yet added usleep to read_sleep() updated rig_caps structure *** empty log message *** test making a shared lib (at last) for the frontend - more todo test making a shared lib for the frontend - make hamlib describe frontend/backend structure updated code snippet example started ft747_set_ptt and ft747_set_vfo starting to implement set/get pairs added typedef enum ptt_type_e ptt_type_t; added VFO types to enum starting on libhamlib Makefile, added ./lib and ./include under common make, make install, and make clean work ok, using ./lib and ./include directories also. make, make install, and make clean work ok, using ./lib and ./include directories also. removed "make verify". Added reference to common/Makefile added printf("testrig:main() has been called \n"); for testing linking makefile for testing testrig linking alternative rig_base declaration removes references to rig_caps at compile time. should populate it another way -- FS added printf's to confirm rig.c (hamlib) is being called ok better libhamlib.so version :-) added ft847_open and ft847_close to enable CAT ON/OFF added ft747_open and ft747_close updated lib names for backend to libhamlib-xxxxx.so API updates - added set/get_mode merge with TRN stuff and add some set/get_mode and vfo stuff added post_write_delay cvs mails to hamlib-cvs-digest cvs mail update works ok :-) minor fixes updated ptt/mode/vfo added set/get freq to use generic bcd etc more set_freq() examples 1. Added VFO as target for some set/get cmds. 2. ./testrig still runs ok using RIG_VFO_CURR. minor update to active VFO handling in _set_vfo some new defines for FT747_VFO_A/B minor updates to active vfo handling added ptt handling example, stand back ! trying different approach to storing cmd sequence. _set_ptt is being converted. Needs tidying up though. Some sequences are complete, and can be read from static data. Incomplete sequences will eventually be copied form static declaration, and completed in priv data. Removed static stuff from functions. Also, begin to implement table driven command translation from API to rig native. priv now contains a cmd table that is used for backend commands towards rig. Added some new freq/mode combinations. converting ft847 to table driven, similar to ft747. more table driven stuff for ft847. cat/ptt/freq being converted. Added ft847_send_priv_cmd(), converted some part of API to use this. Added _set_mode to work now. TODO: put _send_priv_cmd into yaesu.[ch] so ft747 can use also. Turned on PTT also (stand back).. rig_cleanup and rig_close not calling backend removed unused calc_ functions. removed old API functions, general cleanup tested rig_close and rig_cleanup Initial release, common yaesu declareations etc. add version tag nseq uses YAESU_CMD_LENGTH Initial yaesu Makefile Moved from ft747 and ft847 dirs common yaesu handling common yaesu dir Begin to use common yaesu code general cleanup, added _send_priv_cmd added targetable_vfo value to caps minor cleanup ChangeLog history started Initial import for ChangeLog handling starting to convert rig struct to readable form more of convert rig struct to readable form Changelog update for HAMLIB-1.1.1 Gerardo Richarte (1): gs232b.c: Improve get_position string parsing Gisle Vanem (1): Enable verbose mode in bindings/pytest.py Greg Troxel (1): Warning about dodgy code in drake.c HB9EIK (4): Initial release ELAD FDM DUO Update ELAD files Update build system for ELAD backend Update copyright for fdm_duo.c Hans Van Ingelgom (1): Added Peaberry V1 and V2 models Hegedüs Ervin (4): Merge branch 'master' of http://git.code.sf.net/p/hamlib/code Check SWIG string functions for some languages Leave off multiply 'typedef const char * const_char_string' definition (in rig.swg and rotator.swg) Fixed int[10] type variable error in bindings Jae Stutzman (5): Added HPSDR backend Clears potential garbage data in read buffer prior to command being sent Updated PiHPSDR backend defaults Use Windows ioctlsocket to avoid buffer overrun Added new AGC control for PiHPSDR James Watson, HZ1JW (2): Added ic7200 to icom Corrected modes in ic7200.c Jaroslav Skarvada (2): Fix hardcoded pcconfig libdir Fix serial_port DCD squelch Jeroen Vreeken (9): Add support for GPIO PTT. Add missing breaks and improve error messages Add Dorji DRA818 modules (VHF and UHF variants) Also works with NiceRF SA818 modules Merge branch 'master' of git://git.code.sf.net/p/hamlib/code Small fixes to DRA818 volume handling Add GPIO and GPION options for DCD. Also bump abi version since the config params struct needed resizing. Merge branch 'master' of github.com:Hamlib/Hamlib GPIO working after debugging Merge branch 'master' of github.com:Hamlib/Hamlib Johan Ström (1): Backup serial options on open, restore on close John Paul Adrian Glaubitz (1): dummy/dummy.c: Fix unaligned access in dummy_get_level() Jonathan Bastien-Filiatrault (3): Correct FT; command that does not exist on the FT-891. Allow setting split mode without smashing the VFOB frequency. Scale power values correctly for Yaesu FT-891. Jonny public (1): ether6: New rotor backend from Jonny, DG9OAA Joop Stakenborg, PG4I (116): update (kenwood is not a WIP anymore) first implementation of kenwood_get_ptt enable get_ptt for this rig add get_ptt for this rig additional protocol checks and cleanups fix signal strength add RIG_LEVEL_RFPOWER fix_compilation add rit capabilities bring comands in sync with other kenwood rigs add rit capabilities send_morse added explain set_rit fix get_ctcss_tone by using IF command typo add xit capabilities add set_level and get_level bring rig in sync with other kenwood rigs bump version numbers nothing returned by the rig for these commands fix get_level_agc fix set_level_agc getting in sync with the debian 1.1.2 package remove template files initial checkin make this NMU for now correct the path for copying files in the apropriate package do not install the old changelog versioning not used move .la, .a, .so files to the correct package include rpc.rigd and rpc.rotd include pkgconfig support don't create shlibs file for drake, jrc and easycomm libraries move hamlib1 to the top so the documentations gets installed correctly make building easier, call autogen.sh INSTALL file not used build the documentation package we don't have to call configure twice cleanup remove some build dependencies and don't call autogen.sh ts450s uses IF command for get_vfo, get_freq and get_mode minor bugfix, bump to beta add CWR and RTTYR this rig does not have a command for reading IF bandwidth retrieve passband with FW command passband should be calculated after mode is set use rig_passband_normal here various lintian fixes one last lintian fix use FW command to set bandpass cw filters for normal, narrow and wide more filters get_mode and set_mode for this rig filters some comments correct rit add get_level cleanups more modes set_level for this rig should use kenwood_get_freq minor bug add rpm support need hamlib.spec for 'make rpm' make rpm will fail with a '-' in the version number a working spec file update debian build for rotorez and fodtrack, minor fixes unofficial fix the debian build script, new maintainer update the debian build tree to the latest correct baudrate for the ts-950, use the information field IF for get_vfo by default (supported by most kenwood rigs), ts870s will use the much shorter FR command for get_vfo correct baudrate for some rigs and add ts-950 to the id_list ts-850 returns ID 009 according to martin, OK1RR fix 'make rpm' build for hamlib-1.1.5 not needed sync with latest debian package and add tcl, c++, python and perl bindings correct spelling s-meter calibration by Matt Dawson basic functionality by Matt Dawson, tested with grig and xlog lifetime e-mail address :-) sync with latest debian release more functionality, mode and frequency get by Matt Dawson only switch tx vfo is split is on set attenuator level export convenience function get_kenwood_level, so they can be use by other backends add RIG_LEVEL_SWR, copied from ts850 add RIG_LEVEL_COMP, RIG_LEVEL_AGC, copied from ts850 bump version, no preamp really add ALC read this time, only change meter if needed, cleanups split has_get_level and has_set_level fix coding, python2.4 compatibility fix compilation warnings more compilation warnings nuked, use tone_t for ctcss_list use size_t fix more compilation warnings, int->size_t, unsigned char->char more unsigned char->char and int->size_t transitions set functions should have ack_len zero, also need to check other rigs make sure we use ack_len=0 for functions that return nothing (set functions) more unsigned char->char and int->size_t transitions extend rig capabilities, patch by Tom, DL1JBE add RIG_LEVEL_STRENGTH to caps, set post write delay to 0 and do some cleanups re-establish post-write delay remove rpath backdoor long long really needed here? updates by matt, GW0VNR long long really needed here? - patch by diane Bruce distribute footer.html correct set/get power try better s-meter readings packages renamed obsolete sync with latest debian release no need to link to python sync with latest, python changes another debian update: use 'make distclean' in the rules file Joshua Lynch (4): initial SatEL rotator support factored io functions out. improve reliability...i hope. fixed state bug. reconnecting would disable motion every other connect. merged upstream/master into master Juergen Rinas, DC3BW (4): added antenna switching... added a few get_level/set_level get_function/set_functions. * fixed set_func (concerns most kenwood rigs) * added 115200 to the list of baudrates in probeallrigs_kenwood() * fixed ptt * expanded frequency range (available after firmware update) according to http://www.kenwood.com/i/products/info/amateur/ts_480/firmware/pop_ts480_e.htm * added tuning steps * added filter list * increased version info Julian Cable (3): WinRadio G313: Updates from Julian Campbell wrg313api.c: Fix Win32 (MinGW) build issue Use Automake conditionals for G313 build Kamal Mostafa (3): Fix mingw32 cross-compilation procedure and config Do not let macros/ac_python_devel.m4 trash CPPFLAGS and LIBS Fix spelling errors Kamal Mostafa, KA6MAL (19): Hard-code length of hamlib_version and hamlib_copyright strings to stay compliant with hamlib 1.2 ABI and avoid spurious "consider relinking" warnings from dynamic loader. Removed stale debian/ dir from the hamlib source (it is maintained in the Debian diff and isn't useful in this tree). Update bundled libltdl (libtool) to version 2.2.6b to address CVE-2009-3736. - autogen.sh: never downgrade our bundled libltdl/ (only run libtoolize if system version is newer than our bundled version). - autofixer.sh: script removed as libtool 1.x is no longer allowed. - configure.ac: (not enabled) optional setting to deprecate embedded libltdl/. Added Kamal Mostafa and Jaime Robles as maintainers for Debian packaging. Fix build --with-python-binding breakage introduced by Python 2.6: Do not reference LOCALMODLIBS, else it will add libraries to our link line (e.g -lssl) which are not necessarily installed. Elektor 507 frequency selection resolution improvements, contributed by John Nogatch AC6SL. Move backend libraries into /usr/lib/hamlib directory. Force automake to invoke the C (not C++) linker in kit/ when no C++ is in use. python: fix --with-python-binding configure macro fix configure.ac paths for FreeBSD Remove bundled libltdl (libtool) README.developer: restore libtool prerequisite text Fix segfault on improper -C syntax configure: add check and advice for missing ltdl.h configure: refine advice for missing ltdl.h source warnings cleanup: rpcgen-generated code source warnings cleanup: #if-0 out a few unused routines source warnings cleanup: #ifdef out unused FT-840 routines source warnings cleanup: rotorez_rot_reset wrapper for stop Kayne (1): Updated k3_set_modes to work on KX3 Kosta Arvanitis (1): Allow IC-7410 to send cw messages Kārlis Millers (1): Merge pull request #1 from Hamlib/master Ladislav Vaiz (3): Add Android build support Android build updates for monolithic build Initial support for FUNcube Dongle Pro Larry Gadallah (1): AR7030+: Error reading signal strength for low signal levels. Larry Gadallah, VE6VQ (20): Added Larry Gadallah as maintainer of AOR AR7030+ Added AOR AR7030 Plus Added caps for AR7030+ Added caps for AR7030+ Added AR7030+ Alpha version of AR7030+ backend Alpha version of AR7030+ backend Rationalized naming convention, ran everything through lint. Rationalized naming convention, ran everything through lint. Fixed SVN tags Fixed SVN tags Added AR7030P utilities in ar7030p_utils.c Initial version of utility functions for AR7030 Plus receiver Removed utility/helper functions, added/updated Rig API functions Added new I/O helper functions, IR code definitions Added private data to support channel information Added init/cleanup functions, started implementation of mem/channel access functions Added prototypes for pbsToHz() and hzToPBS() helper functions. Added comments to denote mey_sq, mey_pb, and mey_id labels Added implementation for pbsToHz() and hzToPBS() helper functions. Added various memory/VFO functions. Magne Mæhre (1): Enable set_powerstat (turning radio on/off) for IC-7100. Malcolm Herring (62): init branch init branch New model: Icom IC-R6 Icom IC-R10 & 20 testing complete. Move to Beta ignore build Complete R6 commands Add IC-R30 daily fix tones Merge remote-tracking branch 'Hamlib/master' update Merge branch 'master' into icr6 ICR6 new functions merge update Merge remote-tracking branch 'Hamlib/master' commands 00-15 Merge branch 'master' into icr30 icr30 updates Automatically detect CI-V echo state Icom R8600 to Alpha Update contributors Merge branch 'master' into origin/master Fix Icom DCS SQL funnctions Merge remote-tracking branch 'Hamlib/master' Merge remote-tracking branch 'Hamlib/master' Prepare for D-STAR implementation Merge remote-tracking branch 'Hamlib/master' Initial implementation of icom extended operations more extended operations Merge remote-tracking branch 'Hamlib/master' more ext functions fix merge conflicts more ext_cmd updates ic7100 ext functions Merge remote-tracking branch 'mdblack/master' Merge branch 'master' of https://github.com/malcolmh/Hamlib add token list for ext operations Merge remote-tracking branch 'mdblack/master' more ext operations Merge remote-tracking branch 'mdblack/master' custom ops using ext ops scheme custom level ops Merge remote-tracking branch 'mdblack/master' Merge remote-tracking branch 'Hamlib/master' add scope functions update IC7100 update rigs for new functions Merge remote-tracking branch 'Hamlib/master' new directory structure Merge remote-tracking branch 'Hamlib/master' correct powerstat caps Merge remote-tracking branch 'Hamlib/master' New custom parm implementations restore get_powerstat correct rig_close cap Merge remote-tracking branch 'Hamlib/master' Merge remote-tracking branch 'Hamlib/master' Merge remote-tracking branch 'Hamlib/master' add g/set_ext_func to API additional error checking for extended operations Add Macports to README.osx Mark J. Fine (25): Fixed post-write-delay timing Added support for ECSS/FAX and meter strength Added support for meter strength Added ECSS support to R8B and reconfigured default filter modes Reconfigured default filter modes Updated to reflect recent changes within v1.2.2cvs-2 Fixed CWPITCH function on IC-R75 to use 'set mode data' command. Added level granularity steps included other rig_ prefixes fixed get_powerstat to read correctly when memory channel is blank Added memory switching function in set_vfo Added set memory channel# in radio in set_mem Added set_vfo command for vfo/mem switching Corrected handling of "vacant" memory channels Correctly detect if in memory mode in get_vfo() Reduced large decision trees with bitwise math Added set/get channel functions Updated set/get channel functions Made get_channel aware of untunable blank memory channel accounted for dual preamp (10 & 20db) Fixed passband width return for IC-756PROII Added FM narrow to passband spec Added a provisional define for a variable bandwidth control Added a provisional variable bandwidth control to the RIG_LEVEL enumeration Added provisions for a variable bandwidth control Added provisions for a tone control Corrected problems with Squelch (SQL) and Notch (NOTCHF) controls Added provisions for a variable bandwidth control (BWC) Fixed low-end of freq range from 100kHz to 10kHz. Fixed several differences in 535/545 commands Added missing manual notch switch for the NRD-545 Martin Cooper (2): Don't expect a response when none is required. Don't send EasyComm I commands to EasyComm II rotators. Martin Ewing (7): Add test for valid set frequency, esp. for VFOA (ham band only) Expand valid range_lists for full hardware ranges Fix tt565_transaction to allow Morse commands. Orion.c: remove spurious debug statement. implement level settting and misc fixes remove debug stmt Increment Jupiter version Trim TS950 commands that are not provided by CAT jupiter.c: Updates from Martin, AA6E Martin Ewing, AA6E (69): specified buffer lengths, added default vfo A setting Fix SWR & S-meter, set ATT, set AGC, add rough STR_CAL func. Fix timeout, add retry, better S-mtr scale various bug fixes Added RIG_LEVEL_CWPITCH, RIG_LEVEL_KEYSPD, send_morse() Added RIG_FUNC_TUNER, RIG_FUNC_LOCK and RIG_FUNC_VOX, fixed MEM_CAP. Added VFO_OPS, promote to Beta Support LEVEL_VOX, VOXGAIN, ANTIVOX Support LEVEL_NR as Orion NB setting (firmware bug), FUNC_NB -> NB=0,4 Add get_, set_ant (ignores rx only ant) Added Orion, Orion 2 info Squashed warnings about signedness Orion S-meter cal minor - add doxygen info for enums minor - doxygen parameters doxygen formatting add comments info on generating docs doc improvements add comment documentation documentation allow atten = 0 dB patch from SM6PPS fix enum documentation documentation page documentation documentation split orion.c and add doc info documentation SM6PPS mods for AOR 5000a further rx-320 mods by Ken Prox use binary mode VFO requests correct CHANNEL_CAPS sytax Dead simple sample Hamlib program Correct float vs int interpolation options Add autodetect version 1 or 2 firmware (using rig_get_info). Correct V1 calibration. Make V2 calibration the default. Signal RIG_LEVEL_STRENGTH supported. Moved firmware detection to new tt565_open routine, where it is done every time the rig is opened. Add more functions to example program. Ensure printable get_info string Fix bug that seg faulted when get_info returned null. (No reward points!) Add S meter operations to sample program. Adjust retry & timeout values to help in case of no response from rig, i.e., if rig power happens to be off. Prettify some code indents. Better error handling, reliability for serial I/O. Misc prettification. TT Omni VI / Plus improvements Fix typo Fix Omni VI PTT function Update Icom info Declutter Omni VI memories, rit/xit Fix serial I/O error checking Add author. (credits info added to web page, also) Switch back to ASCII freq. setting because of hardware(?) bug. Add AF, RF gain and squelch level capability. Add thanks to W1RFI & ARRL minor changes RIG_STATUS_ALPHA reflecting initial tests. fix missing comma use rawstrength.i which matters in PPC compile fix string handling in LEVEL_RAWSTR Orion - implement RIG_LEVEL_STRENGTH Example updates Orion: Allow frontend to handle RIG_LEVEL_STRENGTH Minor comment re rit/xit Downgrade ERR to WARN (i/o retry) Init revision - tnx Stephane Autofixer sets up for libtool v1 or v2 autofixer.sh supportin libtool v1 and v2 minor update repair echo cmd Max Lock (1): Addition of support for CM108B PTT Michael Black (1307): TenTec Omni VII update from W9MDB New XG3 backend Fixes to termios.c on W32 targets xg3 patch Check TS-590S for EU or US firmware New backend for FT-991 Flush the debug stream Omni VII to set VFO_CURR correctly Omni VII patch for WSJT-X FT-991 patch Small FT-991 patch for WSJT support Omni VII patch FT-857 and FT-991 patches Fix possible frequency overflow on Kenwood and Yaesu Add get_freq to FRG-100 Clean up clang warnings on adat.c Clear up a clang compiler warning in kenwood/elecraft.h Clean up clang warnings in tentec Fix port->pathname checks Quell clang warnings in tests directory Various Yaesu updates Simply define TRUE to 1 in omnivii.c Allow the ft757gx to work with WSJT-X. Remove input redirects in autogen.sh Initial support for the IC-7300 Add send_morse to icom rigs tmd710 patch Icom frame patch Exposed constants via function calls Remove define Merge branch 'master' of https://github.com/N0NB/hamlib Changed some modules to LGPL in lieu of GPL Fixed buffer overflow in rigctl_parse and rotctl_parse Merge branch 'master' of https://github.com/N0NB/hamlib Move K3 DT0 before mode switch, add version info to electraft rig open, WSJT-X VOX rig split now works Merge branch 'master' of https://github.com/N0NB/hamlib Added IC-7850/51 -- works with WSJT-X Merge branch 'master' of https://github.com/N0NB/hamlib Add ic7850 ic7851 -- works with wsjtx Add ic7850 ic7851 -- works with wsjtx Merger 7850/51 into 785x Fix ft991_get_mode Added ft891 backend Fix ic785x default addr to 0x8e Fix FT-891 recognition IC-M710 now working with WSJST-X Add icm710.h to icmarine Makefile.am Merge pull request #1 from Hamlib/master Fix FT857 to return the SMeter-based value Reduce debug info in flrig.c Change RIG_MODE and RIG_FUNC to 64-bit values Merge hamlib head Add PRXll macro for 64-bit use Fixup for 64-bit in memcsv.c 64 bit mods to netrigctl.c testrig.c Add TS-890S as derivative of TS-480 plus new modes Add XHCG to ic706.c Change rmode_t to uint64_t and remove unneeded casts Fix RIG_MODE structure in src/msic.c Fix some 64bit items and add RIG_FUNC_NB2 for TS-890S Suppress GCC unused-return warning Fix rig_idx2settings for 64-bit sprintf_list functions Fix flrig when WSJT-X startup causes rig mode change Increase flrig timeout value Add USB mode to flrig Fix flrig memory leak Fix bug where constant value was being trashed Add PKT modes to ts590.c Add BC2 and NB2 functions for newer kenwoods Change RIG_SETTING_MAX for 64-bit compatibility All kenwoods to have 3-char commands for functions and return whatever value the rig returns instead of 0/1 Changes to add more ts890 capabilities, e.g. NB2, BC2 Fix kenwoood BC BC2 returns Fix kenwood BC BC2 return merge master New utility to allow non-hamlib-aware programs to use hamlib rigs via COM ports Virtual com ports providing a TS-2000 Emulator Example connecting N1MM or such to FLRig via COM5/COM6 virtual COM pair rigctlcom -m 4 -R COM5 -S 115200 N1MM connects to COM6 TS-2000 115200 8N1 Add TUNER on/off fnction for Yaesu rigs Fix segfault in rigctlcom with no args and improve usage Add rigctlcom to install scripts Add FT847UNI for early serial number units that are one-way comm Add rigctlcom to gitignore Reduce verbosity in FLRig Ensure buf is zeroed in kenwood_safe_transaction to avoid return random data Reduce verbosity of rig_strrmode and read_string Improve error handling in network_flush when disconnect happens Reduce verbosity of rig_strvfo netrigctl can now do vfo mode -- has automatic detection of rigctld vfo mode rigctl automatically detects vfo mode of rigctld rigctli and rigctld recommend vfo mode if not selected Merge branch 'master' of https://github.com/Hamlib/Hamlib Fix memset in kenwood.c Fix network_flush as it was not actually flushing before This was causing an infinite loop and WSJT-X to lock up using flex6xxx backend network.c astyle applied Add ability for rigctlcom to work with Ham Radio Deluxe astyle format of rigctlcom.c Relax chk_vfo requirement for backward compatibility astyle for netrigctl.c Merge branch 'master' of https://github.com/Hamlib/Hamlib Fix ts590 RIG_LEVEL_AF astyle ts590.c Update TS590 version and make it STABLE Add set/get powerstat for ic785x.c Have kenwood set_powerstat ON wait for get_powerstat Fix set_powerstat wait lo... [truncated message content] |
From: Nate B. <n0...@us...> - 2021-05-17 02:42:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.2 has been created at cdad07b5f66c5bc0f993511d333fe55554f6d8f9 (commit) - Log ----------------------------------------------------------------- commit cdad07b5f66c5bc0f993511d333fe55554f6d8f9 Author: Nate Bargmann <n0...@n0...> Date: Sun May 16 21:40:24 2021 -0500 Advance to 4.2 for release diff --git a/configure.ac b/configure.ac index 7086bb01..4fdd14a9 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.2~git],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.2],[ham...@li...],[hamlib],[http://www.hamlib.org]) AC_CONFIG_SRCDIR([include/hamlib/rig.h]) AC_CONFIG_MACRO_DIR([macros]) ----------------------------------------------------------------------- hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-05-17 02:32:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 561b8d0785161eaf2f9bc70b1f86089e0cae2505 (commit) from fbd07524e2291974b32b75241115c35b974b0dba (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 561b8d0785161eaf2f9bc70b1f86089e0cae2505 Author: Nate Bargmann <n0...@n0...> Date: Sun May 16 21:31:49 2021 -0500 Advance to 4.3~git diff --git a/NEWS b/NEWS index c82c9727..425f1c54 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... +Version 4.3 + * 2021-??-?? + Version 4.2 * 2021-05-17 * New rig_get_mode_bandwidths -- returns token set for bandwidths for given mode diff --git a/configure.ac b/configure.ac index 7086bb01..eeb19891 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.2~git],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.3~git],[ham...@li...],[hamlib],[http://www.hamlib.org]) AC_CONFIG_SRCDIR([include/hamlib/rig.h]) AC_CONFIG_MACRO_DIR([macros]) @@ -56,7 +56,7 @@ dnl See README.release on setting these values # Values given to -version-info when linking. See libtool documentation. # Set them here to keep c++/Makefile and src/Makefile in sync. ABI_VERSION=4 -ABI_REVISION=2 +ABI_REVISION=3 ABI_AGE=0 AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version]) ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ configure.ac | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-05-17 02:27:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via fbd07524e2291974b32b75241115c35b974b0dba (commit) via b679b0c75350bafd1404ccdca61ef3845d77abaf (commit) via 55ec759a75041897bec3dd114dc38b5f2bcc3c39 (commit) via 0ed6b110889286a7773f893b6d36e02e3fcefceb (commit) from 47cf24582626e44d028aaa66fe1ebc9b3d6fd760 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fbd07524e2291974b32b75241115c35b974b0dba Merge: 47cf2458 b679b0c7 Author: Nate Bargmann <n0...@n0...> Date: Sun May 16 21:26:14 2021 -0500 Merge pull request #701 from N0NB/doxygen_work Doxygen work commit b679b0c75350bafd1404ccdca61ef3845d77abaf Author: Nate Bargmann <n0...@n0...> Date: Sun May 16 21:14:04 2021 -0500 Update NEWS for 4.2 release diff --git a/NEWS b/NEWS index 683d706c..c82c9727 100644 --- a/NEWS +++ b/NEWS @@ -7,14 +7,14 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... Version 4.2 - * 2021-04-27 + * 2021-05-17 * New rig_get_mode_bandwidths -- returns token set for bandwidths for given mode Rig command: \get_mode_bandwidths CW Mode=CW Normal=500Hz Narrow=50Hz Wide=2400Hz - * New rig_get_info -- returns token set for all vfos where order does not matter + * New rig_get_info -- returns token set for all vfos where order does not matter This is a string return to allow for easy future expansion without changing the API New tokens may be introduced and can be skipped if not used by clients Rig command: \get_rig_info @@ -37,13 +37,18 @@ Version 4.2 * USRP lib and gnuradio are deprecated and will be removed in 5.0 * Added Radan rotator - * Added Malachite SDR + * Added Malachite SDR * Major rework for PRM80 * Add twiddle_timeout and twiddle_rit --set-conf options - rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1 + rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1 This will set the twiddle timeout to 5 seconds and turn on twiddle_rit - For twiddle timeout VFOB will not be polled for 5 seconds after VFO twiddling is detected - rigctld --twiddle is deprecated and will be removed in 5.0 along with get_twiddle and set_twiddle + For twiddle timeout VFOB will not be polled for 5 seconds after VFO twiddling + is detected + * rigctld --twiddle is deprecated and will be removed in 5.0 along with + get_twiddle and set_twiddle + * Rework Doxygen manual including default layout for Doxygen 1.9.1. So far + the amplifier, rotator, and utilities API sections have been updated. The + rig (radio) section remains to be updated. Version 4.1 2021-01-31 commit 55ec759a75041897bec3dd114dc38b5f2bcc3c39 Author: Nate Bargmann <n0...@n0...> Date: Sun May 16 21:11:10 2021 -0500 Format to break lines before 80 characters diff --git a/README.freqranges b/README.freqranges index 6fe68b84..9d5ca122 100644 --- a/README.freqranges +++ b/README.freqranges @@ -1,9 +1,15 @@ -Frequency ranges are being changed to reflect rig capabilities instead of region restrictions +Frequency ranges are being changed to reflect rig capabilities instead of +region restrictions + As of 2020-05-05 the behavior is: + #1 Any range which shows ITU# or TBD has not been modified to this convention -#2 Ranges on the backends are being change to USA/EUR/KOR/TPE/ITR per the IC-9700 convention. So if you see one of those monikers on a rig's freq range it should accurately reflect the rig's capabilities. +#2 Ranges on the backends are being change to USA/EUR/KOR/TPE/ITR per the + IC-9700 convention. So if you see one of those monikers on a rig's freq + range it should accurately reflect the rig's capabilities. -Note that most rigs will have just USA or USA/EUR models. Not too many rigs have more than 2 models but it appears at least Icom is headed that way. +Note that most rigs will have just USA or USA/EUR models. Not too many rigs +have more than 2 models but it appears at least Icom is headed that way. USA - United States of America EUR - Europe @@ -12,5 +18,3 @@ TPE - Japan ITR - ?? AUS - Australia CHN - China - - commit 0ed6b110889286a7773f893b6d36e02e3fcefceb Author: Nate Bargmann <n0...@n0...> Date: Sun May 16 21:10:31 2021 -0500 Update Doxygen comments and main page diff --git a/doc/index.doxygen b/doc/index.doxygen index 366239c1..1d6103f0 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -1,10 +1,5 @@ /*! \mainpage Hamlib API Reference -\section auth Authors - -Stéphane Fillod, F8CFE, and Frank Singleton, VK3FCS and the Hamlib Group -\n Documentation revisions by Martin Ewing, AA6E, Nate Bargmann, N0NB, Michael Black, W9MDB - \section s1 Preface This document describes the Hamlib library Application Programming Interface @@ -14,18 +9,24 @@ We attempt to document the complete API of the core modules of Hamlib, i.e. the API seen by end-user application developers. You may navigate the documentation through the tabs at the top of this page. +\note This documentation is a work in progress. + Please report any problems to ham...@li.... \section txtfil Distributed information files These text files are distributed with the Hamlib package. -Readme files: \subpage Rdme "General"; +\li Readme files: \subpage Rdme "General"; \subpage Rdmebeta "Beta Tester"; \subpage Rdmedevel "Developer"; -\subpage Rdmewin "MS Windows" +\subpage Rdmewin "MS Windows"; +\subpage Rdmeosx "Mac OS X"; +\subpage Rdmefrq "Frequency range changes"; +\subpage Rdmemulti "Multicast support"; +\subpage Security "Security policy"; -Other files: \subpage INSTALL; +\li Other files: \subpage INSTALL; \subpage AUTHORS; \subpage COPYING; \subpage COPYING.LIB; @@ -44,10 +45,20 @@ Other files: \subpage INSTALL; \section slic Documentation License \li \subpage doclicense + +\section auth Authors + +\li Stéphane Fillod, F8CFE, and Frank Singleton, VK3FCS and the Hamlib Group +\li Documentation revisions by Martin Ewing, AA6E, Nate Bargmann, N0NB, +Michael Black, W9MDB and many others. */ + + +/* Subpage definitions follow. */ + /*! \page doclicense License for Documentation This documentation is free; you can redistribute it without -any restrictions. The modification or derived work must retain +any restrictions. The modification or derived work must retain copyright and list all authors. This documentation is distributed in the hope that it will be @@ -58,48 +69,81 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. /*! \page Rdme README (general) \verbinclude README */ + /*! \page Rdmebeta README.betatester \verbinclude README.betatester */ + /*! \page Rdmedevel README.developer \verbinclude README.developer */ + /*! \page Rdmewin Cross-compiling Hamlib on Linux for MS Windows This page contains the `scripts/README.build-Windows` instructions and the -`scripts/build-w32.sh` file that describe cross-compiling Hamlib for MS -Windows 32 bit on Debian GNU/Linux. +`scripts/build-w32.sh` and `scripts/build-w64.h` files that describe +cross-compiling Hamlib for MS Windows 32 and 64 bit versions on Debian +GNU/Linux. +\tableofcontents \section Build README.build-Windows \verbinclude README.build-Windows \subsection W32 The build-w32.sh script -\verbinclude build-w32.sh +\include{lineno} build-w32.sh \subsection W64 The build-w64.sh script -\verbinclude build-w64.sh +\include{lineno} build-w64.sh +*/ + +/*! \page Rdmeosx README.osx +\verbinclude README.osx */ + +/*! \page Rdmefrq README.freqranges +\verbinclude README.freqranges +*/ + +/*! \page Rdmemulti README.multicast +\verbinclude README.multicast +*/ + +/* FIXME: figure out how to include Markdown for HTML output. */ +/*! \page Security SECURITY.md +\include SECURITY.md +*/ + /*! \page INSTALL INSTALL \verbinclude INSTALL */ + /*! \page AUTHORS AUTHORS \verbinclude AUTHORS */ + /*! \page COPYING COPYING \verbinclude COPYING */ + /*! \page COPYING.LIB COPYING.LIB \verbinclude COPYING.LIB */ + /*! \page LICENSE LICENSE \verbinclude LICENSE */ + /*! \page NEWS NEWS \verbinclude NEWS */ + /*! \page PLAN PLAN \verbinclude PLAN */ + /*! \page THANKS THANKS \verbinclude THANKS */ + +/* Defined API groups--sections included with addtogroup in sources. */ + /*! Define groups for Doxygen * \defgroup rig Rig (transceiver) API * \defgroup rig_internal Rig (transceiver) Internal API diff --git a/src/locator.c b/src/locator.c index b7679549..07bd653b 100644 --- a/src/locator.c +++ b/src/locator.c @@ -1,17 +1,3 @@ -/** - * \addtogroup utilities - * @{ - */ - -/** - * \file src/locator.c - * \brief locator and bearing conversion interface - * \author Stephane Fillod and the Hamlib Group - * \date 2000-2010 - * - * Hamlib Interface - locator, bearing, and conversion calls - */ - /* * Hamlib Interface - locator and bearing conversion calls * Copyright (c) 2001-2010 by Stephane Fillod @@ -47,12 +33,49 @@ * */ -/*! \page hamlib Hamlib general purpose API + +/** + * \addtogroup utilities + * @{ + */ + +/** + * \file src/locator.c + * + * \brief QRA locator (Maidenhead grid square) and latitude/longitude bearing + * conversion interface. + * + * \author Stephane Fillod + * \author Nate Bargmann + * \author Dave Hines + * \author The Hamlib Group + * \date 2000-2020 + */ + +/** + * \page hamlib Hamlib general purpose API + * + * Hamlib function call interface for determining QRA locator (Maidenhead grid + * square), bearing, and conversion between QRA locator and latitude/longitude + * formats. + * + * \par Sources used in writing these routines * - * Here are grouped some often used functions, like locator conversion - * routines. + * \parblock + * Code to determine bearing and range was taken from the Great Circle, + * by Steven R. Sampson, N5OWK.<br /> + * Ref: "Air Navigation", Air Force Manual 51-40, 1 February 1987<br /> + * Ref: "ARRL Satellite Experimenters Handbook", August 1990 + * + * Code to calculate distance and azimuth between two QRA locators, taken from + * wwl, by IK0ZSN, Mirko Caserta. + * + * New bearing code added by N0NB was found at: + * http://williams.best.vwh.net/avform.htm#Crs + * \endparblock */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -67,74 +90,93 @@ #include <hamlib/rotator.h> -#ifndef DOC_HIDDEN - +/** \brief Standard definition of a radian. */ #define RADIAN (180.0 / M_PI) -/* arc length for 1 degree, 60 Nautical Miles */ +/** \brief arc length for 1 degree in kilometers, i.e. 60 Nautical Miles */ #define ARC_IN_KM 111.2 + /* The following is contributed by Dave Hines M1CXW * * begin dph */ -/* - * These are the constants used when converting between Maidenhead grid - * locators and longitude/latitude values. MAX_LOCATOR_PAIRS is the maximum - * number of locator character pairs to convert. This number MUST NOT exceed - * the number of pairs of values in loc_char_range[]. - * Setting MAX_LOCATOR_PAIRS to 3 will convert the currently defined 6 - * character locators. A value of 4 will convert the extended 8 character - * locators described in section 3L of "The IARU region 1 VHF managers - * handbook". Values of 5 and 6 will extent the format even more, to the - * longest definition I have seen for locators, see - * http://www.btinternet.com/~g8yoa/geog/non-ra.html - * Beware that there seems to be no universally accepted standard for 10 & 12 - * character locators. - * - * The ranges of characters which will be accepted by locator2longlat, and - * generated by longlat2locator, are specified by the loc_char_range[] array. - * This array may be changed without requiring any other code changes. + +/* At this time documenting a single static variable as in loc_char_range[] + * below is not supported by Doxygen. Hide this section until support exists + * or a work-around becomes available. + */ +#ifndef DOC_HIDDEN + +/** + * \brief Constants used when converting between Maidenhead grid + * locators and longitude/latitude values. + * + * \ref MAX_LOCATOR_PAIRS is the maximum number of locator character pairs to + * convert. This number MUST NOT exceed the number of pairs of values in + * loc_char_range[]. Setting \ref MAX_LOCATOR_PAIRS to 3 will convert the + * currently defined 6 character locators. A value of 4 will convert the + * extended 8 character locators described in section 3L of "The IARU region 1 + * VHF managers handbook". Values of 5 and 6 will extent the format even + * more, to the longest definition I have seen for locators, see + * http://www.btinternet.com/~g8yoa/geog/non-ra.html (currently a dead + * link. -N0NB). Be aware that there seems to be no universally accepted + * standard for 10 & 12 character locators. + * + * The ranges of characters which will be accepted by locator2longlat(), and + * generated by longlat2locator(), are specified by the \ref loc_char_range[] + * array. This array may be changed without requiring any other code changes. * * For the fifth pair to range from aa to xx use: - * const static int loc_char_range[] = { 18, 10, 24, 10, 24, 10 }; + * \code const static int loc_char_range[] = { 18, 10, 24, 10, 24, 10 };\endcode * * For the fifth pair to range from aa to yy use: - * const static int loc_char_range[] = { 18, 10, 24, 10, 25, 10 }; - * - * MAX_LOCATOR_PAIRS now sets the limit locator2longlat() will convert and - * sets the maximum length longlat2locator() will generate. Each function - * properly handles any value from 1 to 6 so MAX_LOCATOR_PAIRS should be - * left at 6. MIN_LOCATOR_PAIRS sets a floor on the shortest locator that - * should be handled. -N0NB + * \code const static int loc_char_range[] = { 18, 10, 24, 10, 25, 10 };\endcode */ const static int loc_char_range[] = { 18, 10, 24, 10, 24, 10 }; +#endif /* !DOC_HIDDEN */ + +/** \def MAX_LOCATOR_PAIRS + * + * \brief Longest locator to process, e.g. AA00AA00AA00. + * + * Sets the limit locator2longlat() will convert and sets the maximum length + * longlat2locator() will generate. Each function properly handles any value + * from `1` to `6` so \ref MAX_LOCATOR_PAIRS should be left at `6`. + * + * \def MIN_LOCATOR_PAIRS + * + * \brief Shortest locator to process, e.g. AA. + * + * Sets a floor on the shortest locator that should be handled. + */ #define MAX_LOCATOR_PAIRS 6 #define MIN_LOCATOR_PAIRS 1 /* end dph */ -#endif /* !DOC_HIDDEN */ - /** - * \brief Convert DMS to decimal degrees - * \param degrees Degrees, whole degrees - * \param minutes Minutes, whole minutes - * \param seconds Seconds, decimal seconds - * \param sw South or West + * \brief Convert Degrees Minutes Seconds (DMS) notation to decimal degrees + * (D.DDD) angle. + * + * \param degrees Degrees, whole degrees. + * \param minutes Minutes, whole minutes. + * \param seconds Seconds, decimal seconds. + * \param sw South or West. * - * Convert degree/minute/second angle to decimal degrees angle. - * \a degrees >360, \a minutes > 60, and \a seconds > 60.0 are allowed, - * but resulting angle won't be normalized. + * Convert a Degrees Minutes Seconds (DMS) notation value to a decimal degrees + * (D.DDD) angle value. * - * When the variable sw is passed a value of 1, the returned decimal - * degrees value will be negative (south or west). When passed a - * value of 0 the returned decimal degrees value will be positive - * (north or east). + * \note For the parameters \a degrees >360, \a minutes > 60, and \a seconds > + * 60.0 are allowed, but the resulting angle will not be normalized. * - * \return The angle in decimal degrees. + * When the variable \a sw is passed a value of 1, the returned decimal + * degrees value will be negative (*South* or *West*). When passed a value of 0 + * the returned decimal degrees value will be positive (*North* or *East*). + * + * \return The signed angle in decimal degrees (D.DDD). * * \sa dec2dms() */ @@ -173,23 +215,25 @@ double HAMLIB_API dms2dec(int degrees, int minutes, double seconds, int sw) /** - * \brief Convert D M.MMM notation to decimal degrees - * \param degrees Degrees, whole degrees - * \param minutes Minutes, decimal minutes - * \param sw South or West + * \brief Convert degrees decimal minutes (D M.MMM) notation to decimal + * degrees (D.DDD) angle. + * + * \param degrees Degrees, whole degrees. + * \param minutes Minutes, decimal minutes. + * \param seconds Seconds, decimal seconds. + * \param sw South or West. * - * Convert a degrees, decimal minutes notation common on - * many GPS units to its decimal degrees value. + * Convert a degrees decimal minutes (D M.MMM) notation common on many GPS + * units to a decimal degrees (D.DDD) angle value. * - * \a degrees > 360, \a minutes > 60.0 are allowed, but - * resulting angle won't be normalized. + * \note For the parameters \a degrees > 360, \a minutes > 60.0, \a seconds > + * 60.0 are allowed, but the resulting angle will not be normalized. * - * When the variable sw is passed a value of 1, the returned decimal - * degrees value will be negative (south or west). When passed a - * value of 0 the returned decimal degrees value will be positive - * (north or east). + * When the variable \a sw is passed a value of 1, the returned decimal + * degrees value will be negative (*South* or *West*). When passed a value of + * 0 the returned decimal degrees value will be positive (*North* or *East*). * - * \return The angle in decimal degrees. + * \return The signed angle in decimal degrees (D.DDD). * * \sa dec2dmmm() */ @@ -223,29 +267,33 @@ double HAMLIB_API dmmm2dec(int degrees, double minutes, double seconds, int sw) /** - * \brief Convert decimal degrees angle into DMS notation - * \param dec Decimal degrees - * \param degrees Pointer for the calculated whole Degrees - * \param minutes Pointer for the calculated whole Minutes - * \param seconds Pointer for the calculated decimal Seconds - * \param sw Pointer for the calculated SW flag + * \brief Convert a decimal degrees (D.DDD) angle into Degrees Minutes + * Seconds (DMS) notation. + * + * \param dec Decimal degrees (D.DDD). + * \param degrees Pointer for the calculated whole Degrees. + * \param minutes Pointer for the calculated whole Minutes. + * \param seconds Pointer for the calculated decimal Seconds. + * \param sw Pointer for the calculated SW (South/West) flag. + * + * Convert decimal degrees angle (D.DDD) into its Degree Minute Second (DMS) + * notation. * - * Convert decimal degrees angle into its degree/minute/second - * notation. + * When \a dec < -180 or \a dec > 180, the angle will be normalized within + * these limits and the sign set appropriately. * - * When \a dec < -180 or \a dec > 180, the angle will be normalized - * within these limits and the sign set appropriately. + * Upon return, guarantees 0 >= \a degrees <= 180, 0 >= \a minutes < 60, and + * 0.0 >= \a seconds < 60.0. * - * Upon return dec2dms guarantees 0 >= \a degrees <= 180, - * 0 >= \a minutes < 60, and 0.0 >= \a seconds < 60.0. + * When \a dec is < 0.0 \a sw will be set to 1. When \a dec is >= 0.0 \a sw + * will be set to 0. This flag allows the application to determine whether + * the DMS angle should be treated as negative (*South* or *West*). * - * When \a dec is < 0.0 \a sw will be set to 1. When \a dec is - * >= 0.0 \a sw will be set to 0. This flag allows the application - * to determine whether the DMS angle should be treated as negative - * (south or west). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * \retval -RIG_EINVAL if any of the pointers are NULL. - * \retval RIG_OK if conversion went OK. + * \retval RIG_OK The conversion was successful. + * \retval RIG_EINVAL Either of the pointers are NULL. * * \sa dms2dec() */ @@ -317,28 +365,33 @@ int HAMLIB_API dec2dms(double dec, /** - * \brief Convert a decimal angle into D M.MMM notation - * \param dec Decimal degrees - * \param degrees Pointer for the calculated whole Degrees - * \param minutes Pointer for the calculated decimal Minutes - * \param sw Pointer for the calculated SW flag + * \brief Convert a decimal degrees (D.DDD) angle into degrees decimal minutes + * (D M.MMM) notation. * - * Convert a decimal angle into its degree, decimal minute - * notation common on many GPS units. + * \param dec Decimal degrees angle. + * \param degrees Pointer for the calculated whole Degrees. + * \param minutes Pointer for the calculated decimal Minutes. + * \param sw Pointer for the calculated SW flag. * - * When passed a value < -180 or > 180, the value will be normalized - * within these limits and the sign set apropriately. + * Convert a decimal angle into its degree, decimal minute + * notation common on many GPS units. * - * Upon return dec2dmmm guarantees 0 >= \a degrees <= 180, - * 0.0 >= \a minutes < 60.0. + * When passed a value < -180 or > 180, the value will be normalized + * within these limits and the sign set apropriately. * - * When \a dec is < 0.0 \a sw will be set to 1. When \a dec is - * >= 0.0 \a sw will be set to 0. This flag allows the application - * to determine whether the D M.MMM angle should be treated as negative - * (south or west). + * Upon return dec2dmmm guarantees 0 >= \a degrees <= 180, + * 0.0 >= \a minutes < 60.0. * - * \retval -RIG_EINVAL if any of the pointers are NULL. - * \retval RIG_OK if conversion went OK. + * When \a dec is < 0.0 \a sw will be set to 1. When \a dec is + * >= 0.0 \a sw will be set to 0. This flag allows the application + * to determine whether the D M.MMM angle should be treated as negative + * (south or west). + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The conversion was successful. + * \retval RIG_EINVAL Either of the pointers are NULL. * * \sa dmmm2dec() */ @@ -369,23 +422,27 @@ int HAMLIB_API dec2dmmm(double dec, int *degrees, double *minutes, int *sw) /** - * \brief Convert Maidenhead grid locator to Longitude/Latitude - * \param longitude Pointer for the calculated Longitude - * \param latitude Pointer for the calculated Latitude - * \param locator The Maidenhead grid locator--2 through 12 char + nul string + * \brief Convert QRA locator (Maidenhead grid square) to Longitude/Latitude. + * + * \param longitude Pointer for the calculated Longitude. + * \param latitude Pointer for the calculated Latitude. + * \param locator The QRA locator--2 through 12 characters + nul string. + * + * Convert a QRA locator string to Longitude/Latitude in decimal degrees + * (D.DDD). The locator should be 2 through 12 chars long format. + * \a locator2longlat is case insensitive, however it checks for locator + * validity. * - * Convert Maidenhead grid locator to Longitude/Latitude (decimal degrees). - * The locator should be in 2 through 12 chars long format. - * \a locator2longlat is case insensitive, however it checks for - * locator validity. + * Decimal long/lat is computed to center of grid square, i.e. given + * `EM19` will return coordinates equivalent to the southwest corner + * of `EM19mm`. * - * Decimal long/lat is computed to center of grid square, i.e. given - * EM19 will return coordinates equivalent to the southwest corner - * of EM19mm. + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * \retval -RIG_EINVAL if locator exceeds RR99xx99xx99 or exceeds length - * limit--currently 1 to 6 lon/lat pairs. - * \retval RIG_OK if conversion went OK. + * \retval RIG_OK The conversion was successful. + * \retval RIG_EINVAL The QRA locator exceeds RR99xx99xx99 or exceeds length + * limit--currently 1 to 6 lon/lat pairs--or is otherwise malformed. * * \bug The fifth pair ranges from aa to xx, there is another convention * that ranges from aa to yy. At some point both conventions should be @@ -461,23 +518,29 @@ int HAMLIB_API locator2longlat(double *longitude, /** - * \brief Convert longitude/latitude to Maidenhead grid locator - * \param longitude Longitude, decimal degrees - * \param latitude Latitude, decimal degrees - * \param locator Pointer for the Maidenhead Locator - * \param pair_count Precision expressed as lon/lat pairs in the locator + * \brief Convert longitude/latitude to QRA locator (Maidenhead grid square). * - * Convert longitude/latitude (decimal degrees) to Maidenhead grid locator. - * \a locator must point to an array at least \a pair_count * 2 char + '\\0'. + * \param longitude Longitude, decimal degrees. + * \param latitude Latitude, decimal degrees. + * \param locator Pointer for the QRA Locator. + * \param pair_count Requested precision expressed as lon/lat pairs in the + * returned QRA locator string. * - * \retval -RIG_EINVAL if \a locator is NULL or \a pair_count exceeds - * length limit. Currently 1 to 6 lon/lat pairs. - * \retval RIG_OK if conversion went OK. + * Convert longitude/latitude given in decimal degrees (D.DDD) to a QRA + * locator (Maidenhead grid square). \a locator must point to an array length + * that is at least \a pair_count * 2 char + '\\0'. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The conversion was successful. + * \retval RIG_EINVAL if \a locator is NULL or \a pair_count exceeds length + * limit. Currently 1 to 6 lon/lat pairs. * * \bug \a locator is not tested for overflow. * \bug The fifth pair ranges from aa to yy, there is another convention - * that ranges from aa to xx. At some point both conventions should be - * supported. + * that ranges from aa to xx. At some point both conventions should be + * supported. * * \sa locator2longlat() */ @@ -531,26 +594,28 @@ int HAMLIB_API longlat2locator(double longitude, /** * \brief Calculate the distance and bearing between two points. - * \param lon1 The local Longitude, decimal degrees - * \param lat1 The local Latitude, decimal degrees - * \param lon2 The remote Longitude, decimal degrees - * \param lat2 The remote Latitude, decimal degrees - * \param distance Pointer for the distance, km - * \param azimuth Pointer for the bearing, decimal degrees * - * Calculate the QRB between \a lon1, \a lat1 and \a lon2, \a lat2. + * \param lon1 The local Longitude, decimal degrees. + * \param lat1 The local Latitude, decimal degrees, + * \param lon2 The remote Longitude, decimal degrees. + * \param lat2 The remote Latitude, decimal degrees. + * \param distance Pointer for the distance, km. + * \param azimuth Pointer for the bearing, decimal degrees. * - * This version will calculate the QRB to a precision sufficient - * for 12 character locators. Antipodal points, which are easily - * calculated, are considered equidistant and the bearing is - * simply resolved to be true north (0.0). + * Calculate the distance and bearing (QRB) between \a lon1, \a lat1 and + * \a lon2, \a lat2. * - * \retval -RIG_EINVAL if NULL pointer passed or lat and lon values - * exceed -90 to 90 or -180 to 180. - * \retval RIG_OK if calculations are successful. + * This version will calculate the QRB to a precision sufficient for 12 + * character locators. Antipodal points, which are easily calculated, are + * considered equidistant and the bearing is simply resolved to be true north, + * e.g. \a azimuth = 0.0. * - * \return The distance in kilometers and azimuth in decimal degrees - * for the short path are stored in \a distance and \a azimuth. + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The calculations were successful. + * \retval RIG_EINVAL If a NULL pointer passed or \a lat and \a lon values + * exceed -90 to 90 or -180 to 180. * * \sa distance_long_path(), azimuth_long_path() */ @@ -664,12 +729,13 @@ int HAMLIB_API qrb(double lon1, /** * \brief Calculate the long path distance between two points. - * \param distance The shortpath distance * - * Calculate the long path (respective of the short path) - * of a given distance. + * \param distance The shortpath distance in kilometers. * - * \return the distance in kilometers for the opposite path. + * Calculate the long path (opposite bearing of the short path) of a given + * distance. + * + * \return The distance in kilometers for the opposite path. * * \sa qrb() */ @@ -683,13 +749,13 @@ double HAMLIB_API distance_long_path(double distance) /** * \brief Calculate the long path bearing between two points. - * \param azimuth The shortpath bearing--0.0 to 360.0 degrees * - * Calculate the long path (respective of the short path) - * of a given bearing. + * \param azimuth The shortpath bearing--0.0 to 360.0 degrees. + * + * Calculate the long path (opposite of the short path) of a given bearing. * - * \return the azimuth in decimal degrees for the opposite path or - * -RIG_EINVAL upon input error (outside the range of 0.0 to 360.0). + * \return the azimuth in decimal degrees for the opposite path or RIG_EINVAL + * (negated value) upon input error (outside the range of 0.0 to 360.0). * * \sa qrb() */ ----------------------------------------------------------------------- Summary of changes: NEWS | 17 ++- README.freqranges | 14 +- doc/index.doxygen | 70 ++++++++-- src/locator.c | 384 ++++++++++++++++++++++++++++++++---------------------- 4 files changed, 302 insertions(+), 183 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-13 03:46:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 47cf24582626e44d028aaa66fe1ebc9b3d6fd760 (commit) from dd4e631e598084355e7d6ea9cd855d7af2370096 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 47cf24582626e44d028aaa66fe1ebc9b3d6fd760 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed May 12 22:44:33 2021 -0500 Fix +\get_vfo_list to put RPRT on a separate line diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 69df31ab..da3ff16d 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2294,7 +2294,7 @@ declare_proto_rig(get_vfo_list) fprintf(fout, "%s: ", cmd->arg1); } - fprintf(fout, "%s%c", prntbuf[0] ? prntbuf : "None", ext_resp); + fprintf(fout, "%s%c\n", prntbuf[0] ? prntbuf : "None", ext_resp); RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-12 21:50:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via dd4e631e598084355e7d6ea9cd855d7af2370096 (commit) via 252a3ead630d6fecd312455ab8cd309db685f3c7 (commit) from 94410f7a7176586190386119ad90275fbc9e3005 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dd4e631e598084355e7d6ea9cd855d7af2370096 Merge: 94410f7a 252a3ead Author: Michael Black <mdb...@ya...> Date: Wed May 12 16:42:46 2021 -0500 Merge pull request #699 from mikaelnousiainen/fix-yaesu-targetable-roofing-filter Fix Yaesu roofing filter VFO targeting commit 252a3ead630d6fecd312455ab8cd309db685f3c7 Author: Mikael Nousiainen <mik...@ik...> Date: Wed May 12 23:51:35 2021 +0300 Add RIG_TARGETABLE_ROOFING to allow Yaesu roofing filter targeting by VFO only for FTDX5000 and FTDX101. Fix TS-480 VOXDELAY level definition. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index c148b433..68014eb9 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -503,6 +503,7 @@ typedef unsigned int vfo_t; #define RIG_TARGETABLE_MEM (1<<8) #define RIG_TARGETABLE_BANK (1<<9) #define RIG_TARGETABLE_ANT (1<<10) +#define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO #define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK) #define RIG_TARGETABLE_ALL 0x7fffffff //! @endcond diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index a18237dc..112bce34 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -1382,7 +1382,7 @@ const struct rig_caps ts480_caps = .vfo_ops = TS480_VFO_OPS, .level_gran = { [LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } }, - [LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 3000 }, .step = { .i = 150 } }, + [LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 30 }, .step = { .i = 1 } }, [LVL_KEYSPD] = {.min = {.i = 10}, .max = {.i = 60}, .step = {.i = 1}}, [LVL_CWPITCH] = {.min = {.i = 400}, .max = {.i = 1000}, .step = {.i = 50}}, [LVL_BKIN_DLYMS] = {.min = {.i = 0}, .max = {.i = 1000}, .step = {.i = 50}}, diff --git a/rigs/yaesu/ft5000.c b/rigs/yaesu/ft5000.c index 4baeecb3..eef1d3b0 100644 --- a/rigs/yaesu/ft5000.c +++ b/rigs/yaesu/ft5000.c @@ -126,7 +126,7 @@ const struct rig_caps ftdx5000_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1000), .vfo_ops = FTDX5000_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_ANT, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_ANT | RIG_TARGETABLE_ROOFING, .transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index b7220ce0..a85dbbb7 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -113,7 +113,7 @@ const struct rig_caps ftdx101d_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1200), .vfo_ops = FTDX101_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_COMMON | RIG_TARGETABLE_ANT, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_COMMON | RIG_TARGETABLE_ANT | RIG_TARGETABLE_ROOFING, .transceive = RIG_TRN_OFF, /* May enable later as the FTDX101 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 8ed66d2d..32439aa9 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -7994,7 +7994,7 @@ static int set_roofing_filter(RIG *rig, vfo_t vfo, int index) roofing_filters = priv_caps->roofing_filters; - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & RIG_TARGETABLE_ROOFING) { main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } @@ -8100,7 +8100,7 @@ static int get_roofing_filter(RIG *rig, vfo_t vfo, roofing_filters = priv_caps->roofing_filters; - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & RIG_TARGETABLE_ROOFING) { main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 1 + rigs/kenwood/ts480.c | 2 +- rigs/yaesu/ft5000.c | 2 +- rigs/yaesu/ftdx101.c | 2 +- rigs/yaesu/newcat.c | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-11 16:59:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 94410f7a7176586190386119ad90275fbc9e3005 (commit) via 9902ec796cc4928831c46d7c6d32aa005465d4bd (commit) via 62d9da91decaa00f66069a46a98a1bdc9dbe7d8b (commit) via 62a35a41c64e1083e1428a458093f7c3add4c49a (commit) via 7d4ac08ca618f6cea3cc162763fc0af78c6c8f22 (commit) via b849e00e1da2b12fca21e67dbb0399bffc051bdd (commit) via 3da8bb344a6ee7083259909193be1521cbc1217a (commit) from 1bbe783e05ef0c089a3739be2a486e6c95d89934 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 94410f7a7176586190386119ad90275fbc9e3005 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue May 11 11:59:20 2021 -0500 Increase FLRig timeout to 5 seconds diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index fca7c0e6..fa72bcb6 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -144,7 +144,7 @@ const struct rig_caps flrig_caps = RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "FLRig", .mfg_name = "FLRig", - .version = "20210409", + .version = "20210511", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -153,7 +153,7 @@ const struct rig_caps flrig_caps = .port_type = RIG_PORT_NETWORK, .write_delay = 0, .post_write_delay = 0, - .timeout = 2000, + .timeout = 5000, .retry = 2, .has_get_func = RIG_FUNC_NONE, commit 9902ec796cc4928831c46d7c6d32aa005465d4bd Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 9 15:16:23 2021 -0500 Reduce rigctld verbosity when using direct commands from rigctl client https://github.com/Hamlib/Hamlib/issues/690 diff --git a/tests/Makefile.am b/tests/Makefile.am index df6cdb60..7d7a835e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,7 +31,7 @@ rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) $(AM # all the programs need this LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS) -rigmem_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS) +rigmem_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS) -I$(top_builddir)/src rigctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src rotctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src rotctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src diff --git a/tests/rigctld.c b/tests/rigctld.c index f43a1491..4dd07053 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1088,7 +1088,7 @@ void *handle_socket(void *arg) sync_callback, 1, 0, &handle_data_arg->vfo_mode, send_cmd_term, &ext_resp, &resp_sep); - if (retcode != 0) { rig_debug(RIG_DEBUG_ERR, "%s: rigctl_parse retcode=%d\n", __func__, retcode); } + if (retcode != 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: rigctl_parse retcode=%d\n", __func__, retcode); } } else { commit 62d9da91decaa00f66069a46a98a1bdc9dbe7d8b Merge: 62a35a41 7d4ac08c Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 9 13:51:09 2021 -0500 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit 62a35a41c64e1083e1428a458093f7c3add4c49a Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 9 13:48:03 2021 -0500 Adding proposal for multicast rig status/control https://github.com/Hamlib/Hamlib/issues/695 diff --git a/README.multicast b/README.multicast new file mode 100644 index 00000000..150788d1 --- /dev/null +++ b/README.multicast @@ -0,0 +1,54 @@ +Planned for version 4.3 -- comments/suggestions about this are more than welcome +Multicast UDP broadcast on port 4531 (one below rigctld 4532) +Bidirectional rig control and status +Choice of token pairs or JSON +All packets will be tagged with ID=[unique name] -- so multiple rigs can broadcast/rx on the same port + + +Broadcast packet contents to be based on get_rig_info output +This will be the text format of name=value pairs +Can be multiple VFO lines +Parsers should allow for unknown tags that may be added in the future + +Rig command: \get_rig_info +Rig command: \get_rig_info +VFO=Main Freq=145000000 Mode=None Width=0 RX=1 TX=1 +VFO=VFOB Freq=145000000 Mode=FM Width=15000 RX=0 TX=0 +Split=0 SatMode=0 +PTT=1 (1=On, 0=Off) +Rig=Dummy (name of connected rig) +App=Hamlib (name of application providing the packet) +Version=20210429 (version YYYYMMDD) -- reverse compatibilty will be maintained +Status=OK (possible values OK, Offline, Error) +ErrorMsg=msg text (pipe delimited multi-line error message) +CRC=0xf49f4708 (this is just an example CRC and not accurate for this example) + +Example JSON +{ + "VFO1": { // unlimited number of VFOs possible + "VFO": "VFOA", + "Freq": 14074000, // Hz + "Mode": "USB", + "Width": 5000, .. // Hz + "RX": 0, // boolean values 0 = off, 1 = on + "TX": 0, + }, + "VFO2": { + "VFO": "VFOB", + "Freq": 14076000, + "Mode": "USB", + "Width": 5000, + "RX": 0, + "TX": 0, + }, + "Split": 0, + "SatMode": 0 + "ID": "Rig#1", // customizable rig identification + "Rig": "Dummy", + "App": "Hamlib", + "Version": "20210429", // protocol version date YYYYMMDD + "Seq": 1, // 1-up sequence number 32-bit -- wraps around to 1 from 2^32-1 + "CRC": "0xf49f4708" // 32-bit CRC of all data replacing the CRC value with 0x00000000 +} + +Will be able to set freq, mode, width, ptt commit 7d4ac08ca618f6cea3cc162763fc0af78c6c8f22 Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 9 13:48:03 2021 -0500 Adding proposal for multicast rig status/control diff --git a/README.multicast b/README.multicast new file mode 100644 index 00000000..150788d1 --- /dev/null +++ b/README.multicast @@ -0,0 +1,54 @@ +Planned for version 4.3 -- comments/suggestions about this are more than welcome +Multicast UDP broadcast on port 4531 (one below rigctld 4532) +Bidirectional rig control and status +Choice of token pairs or JSON +All packets will be tagged with ID=[unique name] -- so multiple rigs can broadcast/rx on the same port + + +Broadcast packet contents to be based on get_rig_info output +This will be the text format of name=value pairs +Can be multiple VFO lines +Parsers should allow for unknown tags that may be added in the future + +Rig command: \get_rig_info +Rig command: \get_rig_info +VFO=Main Freq=145000000 Mode=None Width=0 RX=1 TX=1 +VFO=VFOB Freq=145000000 Mode=FM Width=15000 RX=0 TX=0 +Split=0 SatMode=0 +PTT=1 (1=On, 0=Off) +Rig=Dummy (name of connected rig) +App=Hamlib (name of application providing the packet) +Version=20210429 (version YYYYMMDD) -- reverse compatibilty will be maintained +Status=OK (possible values OK, Offline, Error) +ErrorMsg=msg text (pipe delimited multi-line error message) +CRC=0xf49f4708 (this is just an example CRC and not accurate for this example) + +Example JSON +{ + "VFO1": { // unlimited number of VFOs possible + "VFO": "VFOA", + "Freq": 14074000, // Hz + "Mode": "USB", + "Width": 5000, .. // Hz + "RX": 0, // boolean values 0 = off, 1 = on + "TX": 0, + }, + "VFO2": { + "VFO": "VFOB", + "Freq": 14076000, + "Mode": "USB", + "Width": 5000, + "RX": 0, + "TX": 0, + }, + "Split": 0, + "SatMode": 0 + "ID": "Rig#1", // customizable rig identification + "Rig": "Dummy", + "App": "Hamlib", + "Version": "20210429", // protocol version date YYYYMMDD + "Seq": 1, // 1-up sequence number 32-bit -- wraps around to 1 from 2^32-1 + "CRC": "0xf49f4708" // 32-bit CRC of all data replacing the CRC value with 0x00000000 +} + +Will be able to set freq, mode, width, ptt commit b849e00e1da2b12fca21e67dbb0399bffc051bdd Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 9 13:47:21 2021 -0500 Fix caching error -- check value instead of pointer....duh.... https://github.com/Hamlib/Hamlib/issues/694 diff --git a/src/rig.c b/src/rig.c index 40f2bea0..ef78b831 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1977,7 +1977,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) cache_show(rig, __func__, __LINE__); - if (freq != 0 && cache_ms_freq < rig->state.cache.timeout_ms) + if (*freq != 0 && cache_ms_freq < rig->state.cache.timeout_ms) { rig_debug(RIG_DEBUG_TRACE, "%s: %s cache hit age=%dms, freq=%.0f\n", __func__, rig_strvfo(vfo), cache_ms_freq, *freq); commit 3da8bb344a6ee7083259909193be1521cbc1217a Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 9 13:46:33 2021 -0500 New format for freq in memcsv.c diff --git a/tests/memcsv.c b/tests/memcsv.c index d6dc9439..241a5ece 100644 --- a/tests/memcsv.c +++ b/tests/memcsv.c @@ -607,7 +607,7 @@ int dump_csv_chan(RIG *rig, if (mem_caps->freq) { - fprintf(f, "%.0"PRIfreq"%c", chan.freq, csv_sep); + fprintf(f, "%"PRIfreq"%c", chan.freq, csv_sep); } if (mem_caps->mode) @@ -622,7 +622,7 @@ int dump_csv_chan(RIG *rig, if (mem_caps->tx_freq) { - fprintf(f, "%.0"PRIfreq"%c", chan.tx_freq, csv_sep); + fprintf(f, "%"PRIfreq"%c", chan.tx_freq, csv_sep); } if (mem_caps->tx_mode) ----------------------------------------------------------------------- Summary of changes: README.multicast | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ rigs/dummy/flrig.c | 4 ++-- src/rig.c | 2 +- tests/Makefile.am | 2 +- tests/memcsv.c | 4 ++-- tests/rigctld.c | 2 +- 6 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 README.multicast hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-08 17:48:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 1bbe783e05ef0c089a3739be2a486e6c95d89934 (commit) via d012d5e71401c9fede74aaadf4cedcc32a208110 (commit) from 27eb0087cb9c2c6332f88ae228c9c8ea11535972 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1bbe783e05ef0c089a3739be2a486e6c95d89934 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 8 12:47:59 2021 -0500 Change freq printout in ft1000mp.c diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 814f6b59..260150a1 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -770,8 +770,8 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) to_bcd(p->p_cmd, freq / 10, 8); /* store bcd format in in p_cmd */ // cppcheck-suppress * - rig_debug(RIG_DEBUG_TRACE, "%s: freq = %"PRIll" Hz\n", __func__, - (int64_t)from_bcd(p->p_cmd, 8) * 10); + rig_debug(RIG_DEBUG_TRACE, "%s: freq = %"PRIfreq" Hz\n", __func__, + (freq_t)from_bcd(p->p_cmd, 8) * 10); cmd = p->p_cmd; /* get native sequence */ write_block(&rig_s->rigport, (char *) cmd, YAESU_CMD_LENGTH); commit d012d5e71401c9fede74aaadf4cedcc32a208110 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 8 12:47:10 2021 -0500 Change default freq print to zero decimal places diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 1f1c781e..c148b433 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -355,7 +355,7 @@ typedef double freq_t; /** * \brief printf(3) format to be used for freq_t type */ -#define PRIfreq "f" +#define PRIfreq ".0f" /** * \brief scanf(3) format to be used for freq_t type ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 2 +- rigs/yaesu/ft1000mp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-08 12:49:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 27eb0087cb9c2c6332f88ae228c9c8ea11535972 (commit) from 493860dae806c650325ae430147fa06be827266f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 27eb0087cb9c2c6332f88ae228c9c8ea11535972 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 8 07:49:01 2021 -0500 Fix buffer overflow in radant.c https://github.com/Hamlib/Hamlib/commit/0165d81e479965c17f0cd1fcbf1662bc2e9d41f3#commitcomment-50545346 diff --git a/rotators/radant/radant.c b/rotators/radant/radant.c index c9b7d7eb..aa3084a3 100644 --- a/rotators/radant/radant.c +++ b/rotators/radant/radant.c @@ -102,12 +102,12 @@ transaction_quit: static int radant_rot_set_position(ROT *rot, azimuth_t az, elevation_t el) { - char cmdstr[13]; + char cmdstr[32]; int retval; rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el); - sprintf(cmdstr, "Q%.1f %1.f\r", az, el); + snprintf(cmdstr, sizeof(cmdstr), "Q%.1f %1.f\r", az, el); retval = radant_transaction(rot, cmdstr, NULL, 0); @@ -128,7 +128,7 @@ radant_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - sprintf(cmdstr, "Y\r"); + snprintf(cmdstr, sizeof(cmdstr), "Y\r"); retval = radant_transaction(rot, cmdstr, ackbuf, sizeof(ackbuf)); @@ -182,7 +182,7 @@ const struct rot_caps radant_rot_caps = ROT_MODEL(ROT_MODEL_RADANT), .model_name = "AZ-1/AZV-1", .mfg_name = "Radant", - .version = "20210409.0", + .version = "20210508.0", .copyright = "LGPL", .status = RIG_STATUS_BETA, .rot_type = ROT_TYPE_OTHER, ----------------------------------------------------------------------- Summary of changes: rotators/radant/radant.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-07 17:31:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 493860dae806c650325ae430147fa06be827266f (commit) from ce470548b2b3f5bd4b9681ab188fedd900578161 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 493860dae806c650325ae430147fa06be827266f Author: Mike Black W9MDB <mdb...@ya...> Date: Fri May 7 12:30:14 2021 -0500 Add ; to k3.c to please the eye diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index de9594c0..d477edc9 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -1155,7 +1155,7 @@ int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) c = 'A' + kmode - 10; } - rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c\n", __func__, kmode, c) + rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c\n", __func__, kmode, c); if (vfo == RIG_VFO_B) { ----------------------------------------------------------------------- Summary of changes: rigs/kenwood/k3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-07 16:44:18
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via ce470548b2b3f5bd4b9681ab188fedd900578161 (commit) from e84b8a3c99e09c71db45c86849d4e31825895e3f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ce470548b2b3f5bd4b9681ab188fedd900578161 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri May 7 11:43:53 2021 -0500 Promote IC821H to stable diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index b58ef84c..930cc5fd 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -99,7 +99,7 @@ const struct rig_caps ic821h_caps = .mfg_name = "Icom", .version = BACKEND_VER ".1", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_NONE, .dcd_type = RIG_DCD_NONE, ----------------------------------------------------------------------- Summary of changes: rigs/icom/ic821h.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-07 16:43:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via e84b8a3c99e09c71db45c86849d4e31825895e3f (commit) via 29013fd02196aa829a0f29d57766e35f24f29cd3 (commit) via 102439be15cb42d7d82ecb5f5a9ab2726d2b4876 (commit) from dd2f0f380eb1207352b07803db16a0d59f4bbdc5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e84b8a3c99e09c71db45c86849d4e31825895e3f Author: Mike Black W9MDB <mdb...@ya...> Date: Fri May 7 08:25:54 2021 -0500 Add special check for IC821H in icom_set_vfo Seems the IC821H reverses Main/Sub logic when in satmode Remove IC821 from riglist.h and icom.c -- not used https://github.com/Hamlib/Hamlib/issues/693 diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index a044d8c4..1aeac09b 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -215,7 +215,7 @@ #define RIG_MODEL_IC775 RIG_MAKE_MODEL(RIG_ICOM, 30) #define RIG_MODEL_IC781 RIG_MAKE_MODEL(RIG_ICOM, 31) #define RIG_MODEL_IC820 RIG_MAKE_MODEL(RIG_ICOM, 32) -#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) +//#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) // not implemented and can be reused #define RIG_MODEL_IC821H RIG_MAKE_MODEL(RIG_ICOM, 34) #define RIG_MODEL_IC970 RIG_MAKE_MODEL(RIG_ICOM, 35) #define RIG_MODEL_ICR10 RIG_MAKE_MODEL(RIG_ICOM, 36) diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index 83ced8cd..b58ef84c 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -74,7 +74,8 @@ int ic821h_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) rig_debug(RIG_DEBUG_TRACE, "%s: tx_vfo==MAIN so assuming sat mode=%d\n", __func__, rig->state.cache.satmode); priv->tx_vfo = split == RIG_SPLIT_ON ? RIG_VFO_SUB : RIG_VFO_MAIN; - retval = rig_set_vfo(rig, RIG_VFO_MAIN); + // the IC821 seems to be backwards in satmode -- setting Main select Sub and vice versa + retval = rig_set_vfo(rig, RIG_VFO_SUB); } else if (tx_vfo == RIG_VFO_A) { diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index a6f7bd2e..0ead6f5b 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -574,7 +574,6 @@ static const struct icom_addr icom_addr_list[] = {RIG_MODEL_IC785x, 0x8e}, {RIG_MODEL_IC781, 0x26}, {RIG_MODEL_IC820, 0x42}, - {RIG_MODEL_IC821, 0x4c}, {RIG_MODEL_IC821H, 0x4c}, {RIG_MODEL_IC910, 0x60}, {RIG_MODEL_IC9100, 0x7c}, @@ -2257,6 +2256,9 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) vfo = RIG_VFO_MAIN; if (rig->state.cache.split == RIG_SPLIT_ON && !rig->state.cache.satmode) { vfo = RIG_VFO_A; } + + // Seems the IC821H reverses Main/Sub when in satmode + if (rig->caps->rig_model == RIG_MODEL_IC821H && rig->state.cache.satmode) { vfo = RIG_VFO_SUB; } } else if ((vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) && VFO_HAS_DUAL) { @@ -2271,6 +2273,9 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) vfo = RIG_VFO_SUB_A; } else if (rig->state.cache.split == RIG_SPLIT_ON) { vfo = RIG_VFO_B; } + + // Seems the IC821H reverses Main/Sub when in satmode + if (rig->caps->rig_model == RIG_MODEL_IC821H && rig->state.cache.satmode) { vfo = RIG_VFO_MAIN; } } else if ((vfo == RIG_VFO_A || vfo == RIG_VFO_B) && !VFO_HAS_A_B && VFO_HAS_MAIN_SUB) diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 505dc454..e73c569c 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210430" +#define BACKEND_VER "20210507" /* * defines used by comp_cal_str in rig.c commit 29013fd02196aa829a0f29d57766e35f24f29cd3 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu May 6 23:59:00 2021 -0500 Add ic821h_set_split_vfo https://github.com/Hamlib/Hamlib/issues/693 diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index 39b0597b..83ced8cd 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -28,6 +28,7 @@ #include <hamlib/rig.h> #include "icom.h" +#include "misc.h" #define IC821H_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_FM) @@ -54,12 +55,48 @@ static const struct icom_priv_caps ic821h_priv_caps = ic737_ts_sc_list }; + +// split could be on VFOA/B or Main/Sub +// If Main/Sub we assume we're doing satmode +int ic821h_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) +{ + struct icom_priv_data *priv = (struct icom_priv_data *) rig->state.priv; + int retval; + + ENTERFUNC; + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, split=%d, tx_vfo=%s\n", __func__, + rig_strvfo(vfo), split, rig_strvfo(tx_vfo)); + + if (tx_vfo == RIG_VFO_MAIN) + { + rig->state.cache.satmode = + split; // we emulate satmode of other rigs since we apparently can't query + rig_debug(RIG_DEBUG_TRACE, "%s: tx_vfo==MAIN so assuming sat mode=%d\n", + __func__, rig->state.cache.satmode); + priv->tx_vfo = split == RIG_SPLIT_ON ? RIG_VFO_SUB : RIG_VFO_MAIN; + retval = rig_set_vfo(rig, RIG_VFO_MAIN); + } + else if (tx_vfo == RIG_VFO_A) + { + retval = rig_set_vfo(rig, RIG_VFO_A); + priv->tx_vfo = split == RIG_SPLIT_ON ? RIG_VFO_B : RIG_VFO_A; + } + else + { + rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s not handled for split mode\n", __func__, + rig_strvfo(tx_vfo)); + RETURNFUNC(-RIG_EINVAL); + } + + RETURNFUNC(retval); +} + const struct rig_caps ic821h_caps = { RIG_MODEL(RIG_MODEL_IC821H), .model_name = "IC-821H", .mfg_name = "Icom", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_BETA, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -168,6 +205,7 @@ const struct rig_caps ic821h_caps = .set_mode = icom_set_mode, .get_mode = icom_get_mode, .set_vfo = icom_set_vfo, + .set_split_vfo = ic821h_set_split_vfo, .decode_event = icom_decode_event, .set_mem = icom_set_mem, commit 102439be15cb42d7d82ecb5f5a9ab2726d2b4876 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu May 6 23:58:15 2021 -0500 Change CRC to use all data by substituting CRC value with zeros diff --git a/src/rig.c b/src/rig.c index 3ca65769..40f2bea0 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6326,11 +6326,13 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) rxb = !rxa; txb = split == 1; snprintf(response, max_response_len, - "VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d\nRig=%s\nApp=Hamlib\nVersion=20210429\n", + "VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d\nRig=%s\nApp=Hamlib\nVersion=20210506\nCRC=0x00000000\n", rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB), freqB, modeBstr, (int)widthB, rxb, txb, split, satmode, rig->caps->model_name); unsigned long crc = gen_crc((unsigned char *)response, strlen(response)); - sprintf(crcstr, "CRC=0x%08lx\n", crc); + char *p = strstr(response,"CRC="); + if (p) + sprintf(p, "CRC=0x%08lx\n", crc); strcat(response, crcstr); RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: include/hamlib/riglist.h | 2 +- rigs/icom/ic821h.c | 41 ++++++++++++++++++++++++++++++++++++++++- rigs/icom/icom.c | 7 ++++++- rigs/icom/icom.h | 2 +- src/rig.c | 6 ++++-- 5 files changed, 52 insertions(+), 6 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-06 17:23:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via dd2f0f380eb1207352b07803db16a0d59f4bbdc5 (commit) via 0ec349de49ded733d4c40127a4a7797f7e58084d (commit) via 79a7a915fba792642e7d83759617c62e5a649030 (commit) via d0a12e5391e539b4fcc3de39ef5d9960fbdd9f89 (commit) from fe4bf9add854ab9b1d1afb3c5f277e6c6addd3d6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dd2f0f380eb1207352b07803db16a0d59f4bbdc5 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu May 6 12:21:48 2021 -0500 Fix bad variable in ts890.c diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index cf91236d..4248604e 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -124,7 +124,7 @@ int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return retval; } - sscanf(lvlbuf + 3, "%d", &levelint); + sscanf(ackbuf + 3, "%d", &levelint); val->i = levelint * 3 / 2; /* 150ms units converted to 100ms units */ return RIG_OK; commit 0ec349de49ded733d4c40127a4a7797f7e58084d Merge: 79a7a915 d0a12e53 Author: Michael Black <mdb...@ya...> Date: Thu May 6 12:15:05 2021 -0500 Merge pull request #692 from mikaelnousiainen/fix-kenwood-vox-delay Fix Kenwood VOX delay unit commit 79a7a915fba792642e7d83759617c62e5a649030 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu May 6 12:14:17 2021 -0500 Fix TS890 vox delay level diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index 093c7c37..cf91236d 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -116,6 +116,18 @@ int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) switch (level) { + case RIG_LEVEL_VOXDELAY: + retval = kenwood_safe_transaction(rig, "VD0", ackbuf, sizeof(ackbuf), 6); + + if (retval != RIG_OK) + { + return retval; + } + + sscanf(lvlbuf + 3, "%d", &levelint); + val->i = levelint * 3 / 2; /* 150ms units converted to 100ms units */ + return RIG_OK; + case RIG_LEVEL_RF: retval = kenwood_transaction(rig, "RG", ackbuf, sizeof(ackbuf)); @@ -228,7 +240,7 @@ const struct rig_caps ts890s_caps = RIG_MODEL(RIG_MODEL_TS890S), .model_name = "TS-890S", .mfg_name = "Kenwood", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit d0a12e5391e539b4fcc3de39ef5d9960fbdd9f89 Author: Mikael Nousiainen <mik...@ik...> Date: Thu May 6 18:24:02 2021 +0300 Hamlib VOX delay unit is 1/10th of a second diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index a6dcc95e..2fc0c3d2 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2914,12 +2914,13 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) break; case RIG_LEVEL_VOXDELAY: - if (val.i > 3000 || val.i < 0) + if (val.i > 30 || val.i < 0) { RETURNFUNC(-RIG_EINVAL); } - snprintf(levelbuf, sizeof(levelbuf), "VD%04d", val.i); + // Raw value is in milliseconds + snprintf(levelbuf, sizeof(levelbuf), "VD%04d", val.i * 100); break; case RIG_LEVEL_VOXGAIN: ----------------------------------------------------------------------- Summary of changes: rigs/kenwood/kenwood.c | 5 +++-- rigs/kenwood/ts890s.c | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-05 20:15:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via fe4bf9add854ab9b1d1afb3c5f277e6c6addd3d6 (commit) via 805cd8e60b380b78fe6dc3d67167a03d9b298219 (commit) via d0038fb643135a2413105196132bf91382998363 (commit) from a56e976787f8dacf725efd7cf7a724081aaa0303 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fe4bf9add854ab9b1d1afb3c5f277e6c6addd3d6 Merge: 805cd8e6 d0038fb6 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed May 5 15:15:06 2021 -0500 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit 805cd8e60b380b78fe6dc3d67167a03d9b298219 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed May 5 15:13:56 2021 -0500 Move ant_rx ant_tx set to after NULL check in rig.c https://github.com/Hamlib/Hamlib/pull/691#issuecomment-832918894 diff --git a/src/rig.c b/src/rig.c index fe6dd94d..3ca65769 100644 --- a/src/rig.c +++ b/src/rig.c @@ -5081,8 +5081,6 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ENTERFUNC; - *ant_tx = *ant_rx = RIG_ANT_UNKNOWN; - if (CHECK_RIG_ARG(rig)) { RETURNFUNC(-RIG_EIO); @@ -5096,6 +5094,8 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, RETURNFUNC(-RIG_EINVAL); } + *ant_tx = *ant_rx = RIG_ANT_UNKNOWN; + caps = rig->caps; if (caps->get_ant == NULL) commit d0038fb643135a2413105196132bf91382998363 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed May 5 15:13:56 2021 -0500 Move ant_rx ant_tx set to after NULL check in rig.c diff --git a/src/rig.c b/src/rig.c index fe6dd94d..3ca65769 100644 --- a/src/rig.c +++ b/src/rig.c @@ -5081,8 +5081,6 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ENTERFUNC; - *ant_tx = *ant_rx = RIG_ANT_UNKNOWN; - if (CHECK_RIG_ARG(rig)) { RETURNFUNC(-RIG_EIO); @@ -5096,6 +5094,8 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, RETURNFUNC(-RIG_EINVAL); } + *ant_tx = *ant_rx = RIG_ANT_UNKNOWN; + caps = rig->caps; if (caps->get_ant == NULL) ----------------------------------------------------------------------- Summary of changes: src/rig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-05 15:45:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via a56e976787f8dacf725efd7cf7a724081aaa0303 (commit) via 0721eb5ce686ec0bd82cab6a9f7a10fa2bbe60f8 (commit) via 9e8ef6dc9e7064852bfd664444cdd6bf7cc06324 (commit) from 7f60e1fcb036551e7bae101f13414f5fe3e58086 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a56e976787f8dacf725efd7cf7a724081aaa0303 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed May 5 10:45:22 2021 -0500 Add null checks in rig.c for ant_tx and ant_rx astyle rig.c diff --git a/src/rig.c b/src/rig.c index 08552d18..fe6dd94d 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2154,7 +2154,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(-RIG_ENAVAIL); } - if (vfo == RIG_VFO_CURR) vfo = rig->state.current_vfo; + if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } if ((caps->targetable_vfo & RIG_TARGETABLE_MODE) || vfo == rig->state.current_vfo) @@ -2369,8 +2369,9 @@ pbwidth_t HAMLIB_API rig_passband_normal(RIG *rig, rmode_t mode) rs = &rig->state; // return CW for CWR and RTTY for RTTYR - if (mode == RIG_MODE_CWR) mode = RIG_MODE_CW; - if (mode == RIG_MODE_RTTYR) mode = RIG_MODE_RTTY; + if (mode == RIG_MODE_CWR) { mode = RIG_MODE_CW; } + + if (mode == RIG_MODE_RTTYR) { mode = RIG_MODE_RTTY; } for (i = 0; i < HAMLIB_FLTLSTSIZ && rs->filters[i].modes; i++) { @@ -2946,7 +2947,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) // some rigs like the FT-2000 with the SCU-17 need just a bit of time to let the relays work // can affect fake it mode in WSJT-X when the rig is still in transmit and freq change // is requested on a rig that can't change freq on a transmitting VFO - if (ptt != RIG_PTT_ON) hl_usleep(10*1000); + if (ptt != RIG_PTT_ON) { hl_usleep(10 * 1000); } rig->state.cache.ptt = ptt; elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); @@ -5087,8 +5088,11 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, RETURNFUNC(-RIG_EIO); } - if (ant_curr == NULL) + if (ant_curr == NULL || ant_tx == NULL || ant_rx == NULL) { + rig_debug(RIG_DEBUG_ERR, + "%s: null pointer in ant_curr=%p, ant_tx=%p, ant_rx=%p\n", __func__, ant_curr, + ant_tx, ant_rx); RETURNFUNC(-RIG_EINVAL); } commit 0721eb5ce686ec0bd82cab6a9f7a10fa2bbe60f8 Merge: 7f60e1fc 9e8ef6dc Author: Michael Black <mdb...@ya...> Date: Wed May 5 10:42:06 2021 -0500 Merge pull request #691 from mikaelnousiainen/fix-get-ant-null-check Fix rig_get_ant NULL check commit 9e8ef6dc9e7064852bfd664444cdd6bf7cc06324 Author: Mikael Nousiainen <mik...@ik...> Date: Wed May 5 18:23:02 2021 +0300 Fix rig_get_ant NULL check diff --git a/src/rig.c b/src/rig.c index eb1e099e..08552d18 100644 --- a/src/rig.c +++ b/src/rig.c @@ -5087,7 +5087,7 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, RETURNFUNC(-RIG_EIO); } - if (ant_curr) + if (ant_curr == NULL) { RETURNFUNC(-RIG_EINVAL); } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-04 19:35:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 7f60e1fcb036551e7bae101f13414f5fe3e58086 (commit) via 78a697e58204b6e951a8b1f80a7c8b1e0bae61fe (commit) via 5bafde9ae64c277202fba92955a855a4a555670f (commit) via 231f9faad8feaa761298c8595afa63379a077023 (commit) via c1b2131d9460637c8647626430a913304946a671 (commit) from 4108c0b57169060a2c2743d39ba4471e87e70f83 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7f60e1fcb036551e7bae101f13414f5fe3e58086 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue May 4 14:34:51 2021 -0500 Fix dummy rig to recognize Main/Sub VFOS -- this fixes "M CW 500" Fix rig.c set_mode to recognize curr_vfo correctly https://github.com/Hamlib/Hamlib/issues/689 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index b5da2d1e..1d6b5b55 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -469,15 +469,23 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), buf); + vfo = vfo_fixup(rig, vfo); switch (vfo) { + case RIG_VFO_MAIN: case RIG_VFO_A: priv->vfo_a.mode = mode; priv->vfo_a.width = width; break; + case RIG_VFO_SUB: case RIG_VFO_B: priv->vfo_b.mode = mode; priv->vfo_b.width = width; break; case RIG_VFO_C: priv->vfo_c.mode = mode; priv->vfo_c.width = width; break; + default: + rig_debug(RIG_DEBUG_ERR, "%s: unknown VFO=%s\n", __func__, rig_strvfo(vfo)); + RETURNFUNC(-RIG_EINVAL); } + vfo = vfo_fixup(rig, vfo); + if (RIG_PASSBAND_NOCHANGE == width) { RETURNFUNC(RIG_OK); } if (width == RIG_PASSBAND_NORMAL) @@ -2127,7 +2135,7 @@ struct rig_caps dummy_caps = RIG_MODEL(RIG_MODEL_DUMMY), .model_name = "Dummy", .mfg_name = "Hamlib", - .version = "20210428.0", + .version = "20210504.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, @@ -2292,7 +2300,7 @@ struct rig_caps dummy_no_vfo_caps = RIG_MODEL(RIG_MODEL_DUMMY_NOVFO), .model_name = "Dummy No VFO", .mfg_name = "Hamlib", - .version = "20210428.0", + .version = "20210504.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, diff --git a/src/rig.c b/src/rig.c index 25161ce9..eb1e099e 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2154,8 +2154,9 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(-RIG_ENAVAIL); } + if (vfo == RIG_VFO_CURR) vfo = rig->state.current_vfo; + if ((caps->targetable_vfo & RIG_TARGETABLE_MODE) - || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { TRACE; diff --git a/tests/simyaesu.c b/tests/simyaesu.c index dababa68..fb9c0fff 100644 --- a/tests/simyaesu.c +++ b/tests/simyaesu.c @@ -1,6 +1,9 @@ // can run this using rigctl/rigctld and socat pty devices -// socat -d -d pty,raw,echo=0 pty,raw,echo=0 +// gcc -o simyaesu simyaesu.c +#define _XOPEN_SOURCE 600 #include <stdio.h> +#include <stdlib.h> +#include <fcntl.h> #include <string.h> #include <unistd.h> @@ -31,13 +34,13 @@ typedef enum nc_rigid_e } nc_rigid_t; int -getmyline(FILE *fp, char *buf) +getmyline(int fd, char *buf) { int c; int i = 0; memset(buf, 0, BUFSIZE); - while ((c = fgetc(fp)) != EOF) + while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -46,63 +49,101 @@ getmyline(FILE *fp, char *buf) return strlen(buf); } -int main() + +#if defined(WIN32) || defined(_WIN32) +int openPort(char *comport) // doesn't matter for using pts devices +{ + int fd; + fd = open(comport, O_RDWR); + + if (fd < 0) + { + perror(comport); + } + + return fd; +} + +#else +int openPort(char *comport) // doesn't matter for using pts devices +{ + int fd = posix_openpt(O_RDWR); + char *name = ptsname(fd); + + if (name == NULL) + { + perror("pstname"); + return -1; + } + + printf("name=%s\n", name); + + if (fd == -1 || grantpt(fd) == -1 || unlockpt(fd) == -1) + { + perror("posix_openpt"); + return -1; + } + + return fd; +} +#endif + + + +int main(int argc, char *argv[]) { char buf[256]; + char *pbuf; int n; - FILE *fp = fopen("/dev/pts/3", "r+"); + int fd = openPort(argv[1]); - //,while(getmyline(fp,buf)) while (1) { - getmyline(fp, buf); + getmyline(fd, buf); + printf("Cmd:%s\n", buf); if (strcmp(buf, "RM5;") == 0) { printf("%s\n", buf); usleep(50 * 1000); - n = fprintf(fp, "%s", "RM5100000;"); + pbuf = "RM5100000;"; + n = write(fd, pbuf, strlen(pbuf)); printf("n=%d\n", n); if (n <= 0) { perror("RM5"); } - - fflush(fp); } if (strcmp(buf, "AN0;") == 0) { printf("%s\n", buf); usleep(50 * 1000); - n = fprintf(fp, "%s", "AN030;"); + pbuf = "AN030;"; + n = write(fd, pbuf, strlen(pbuf)); printf("n=%d\n", n); if (n <= 0) { perror("AN"); } - - fflush(fp); } else if (strcmp(buf, "IF;") == 0) { printf("%s\n", buf); usleep(50 * 1000); - n = fprintf(fp, "%s", "IF059014200000+000000700000;"); + pbuf = "IF059014200000+000000700000;"; + n = write(fd, pbuf, strlen(pbuf)); printf("n=%d\n", n); if (n <= 0) { perror("IF"); } - - fflush(fp); } else if (strcmp(buf, "ID;") == 0) { printf("%s\n", buf); usleep(50 * 1000); - int id = NC_RIGID_FTDX101D; -// int id = NC_RIGID_FTDX3000; - n = fprintf(fp, "ID%03d;", id); + int id = NC_RIGID_FTDX3000; + snprintf(buf,sizeof(buf),"ID%03d;", id); + n = snprintf(buf, sizeof(buf), "ID%03d;", id); + n = write(fd, buf, strlen(buf)); printf("n=%d\n", n); if (n <= 0) { perror("ID"); } - - fflush(fp); } #if 0 @@ -116,8 +157,6 @@ int main() printf("n=%d\n", n); if (n <= 0) { perror("AI"); } - - fflush(fp); } } @@ -126,12 +165,11 @@ int main() { printf("%s\n", buf); usleep(50 * 1000); - n = fprintf(fp, "%s", "VS0;"); + pbuf = "VS0;"; + n = write(fd, pbuf, strlen(pbuf)); printf("n=%d\n", n); if (n < 0) { perror("VS"); } - - fflush(fp); } else if (strcmp(buf, "EX032;") == 0) { @@ -139,12 +177,11 @@ int main() ant = (ant + 1) % 3; printf("%s\n", buf); usleep(50 * 1000); - n = fprintf(fp, "EX032%1d;", ant); + snprintf(buf, sizeof(buf), "EX032%1d;", ant); + n = write(fd, buf, strlen(buf)); printf("n=%d\n", n); if (n < 0) { perror("EX032"); } - - fflush(fp); } else if (strlen(buf) > 0) commit 78a697e58204b6e951a8b1f80a7c8b1e0bae61fe Author: Mike Black W9MDB <mdb...@ya...> Date: Mon May 3 15:35:56 2021 -0500 Add rig_get_mode_bandwidths -- see NEWS Return token set of bandwidths for given mode diff --git a/NEWS b/NEWS index 9fa94ca9..683d706c 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,12 @@ Please send Hamlib bug reports to ham...@li... Version 4.2 * 2021-04-27 + * New rig_get_mode_bandwidths -- returns token set for bandwidths for given mode + Rig command: \get_mode_bandwidths CW + Mode=CW + Normal=500Hz + Narrow=50Hz + Wide=2400Hz * New rig_get_info -- returns token set for all vfos where order does not matter This is a string return to allow for easy future expansion without changing the API New tokens may be introduced and can be skipped if not used by clients diff --git a/src/rig.c b/src/rig.c index 66bf6d4e..25161ce9 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2367,6 +2367,10 @@ pbwidth_t HAMLIB_API rig_passband_normal(RIG *rig, rmode_t mode) rs = &rig->state; + // return CW for CWR and RTTY for RTTYR + if (mode == RIG_MODE_CWR) mode = RIG_MODE_CW; + if (mode == RIG_MODE_RTTYR) mode = RIG_MODE_RTTY; + for (i = 0; i < HAMLIB_FLTLSTSIZ && rs->filters[i].modes; i++) { if (rs->filters[i].modes & mode) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 303b5f66..69df31ab 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -165,6 +165,7 @@ declare_proto_rig(get_xit); declare_proto_rig(set_mode); declare_proto_rig(get_mode); declare_proto_rig(get_modes); +declare_proto_rig(get_mode_bandwidths); declare_proto_rig(set_vfo); declare_proto_rig(get_vfo); declare_proto_rig(get_rig_info); @@ -336,8 +337,9 @@ static struct test_table test_list[] = { 0xf2, "set_vfo_opt", ACTION(set_vfo_opt), ARG_NOVFO | ARG_IN, "Status" }, /* turn vfo option on/off */ { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ { 0xf5, "get_rig_info", ACTION(get_rig_info), ARG_NOVFO | ARG_OUT, "RigInfo" }, /* get several vfo parameters at once */ - { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, - { 0xf6, "get_modes", ACTION(get_modes), ARG_OUT | ARG_NOVFO, "Modes" }, + { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, + { 0xf6, "get_modes", ACTION(get_modes), ARG_OUT | ARG_NOVFO, "Modes" }, + { 0xf7, "get_mode_bandwidths", ACTION(get_mode_bandwidths), ARG_IN | ARG_NOVFO, "Mode" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */ { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, { 0x00, "", NULL }, @@ -2340,6 +2342,48 @@ declare_proto_rig(get_modes) RETURNFUNC(RIG_OK); } +declare_proto_rig(get_mode_bandwidths) +{ + int i; + char freqbuf[32]; + + ENTERFUNC; + + rmode_t mode = rig_parse_mode(arg1); + + for (i = 1; i < RIG_MODE_TESTS_MAX; i <<= 1) + { + if (i != mode) { continue; } + + if (mode == RIG_MODE_CWR) { mode = RIG_MODE_CW; } + + if (mode == RIG_MODE_RTTYR) { mode = RIG_MODE_RTTY; } + + pbwidth_t pbnorm = rig_passband_normal(rig, i); + + if (pbnorm == 0) + { + continue; + } + +// sprintf_freq(freqbuf, sizeof(freqbuf), pbnorm); + snprintf(freqbuf, sizeof(freqbuf), "%ldHz", pbnorm); + fprintf(fout, "Mode=%s\n", rig_strrmode(i)); + fprintf(fout, "Normal=%s\n", freqbuf); + + snprintf(freqbuf, sizeof(freqbuf), "%ldHz", rig_passband_narrow(rig, i)); + fprintf(fout, "Narrow=%s\n", freqbuf); + + snprintf(freqbuf, sizeof(freqbuf), "%ldHz", rig_passband_wide(rig, i)); + fprintf(fout, "Wide=%s", freqbuf); + } + + + RETURNFUNC(RIG_OK); +} + + + /* 'T' */ declare_proto_rig(set_ptt) commit 5bafde9ae64c277202fba92955a855a4a555670f Author: Mike Black W9MDB <mdb...@ya...> Date: Mon May 3 11:26:41 2021 -0500 Add bandwidths to get_modes diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index afc74e48..b44b625b 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -665,7 +665,7 @@ int dumpcaps(RIG *rig, FILE *fout) if (pbnorm == 0) { - continue; +// continue; } sprintf_freq(freqbuf, sizeof(freqbuf), pbnorm); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 4143eb40..303b5f66 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2301,6 +2301,8 @@ declare_proto_rig(get_vfo_list) declare_proto_rig(get_modes) { static char prntbuf[1024]; + int i; + char freqbuf[32]; ENTERFUNC; @@ -2313,6 +2315,28 @@ declare_proto_rig(get_modes) fprintf(fout, "%s%c", prntbuf[0] ? prntbuf : "None", ext_resp); + fprintf(fout, "\nBandwidths:"); + + for (i = 1; i < RIG_MODE_TESTS_MAX; i <<= 1) + { + pbwidth_t pbnorm = rig_passband_normal(rig, i); + + if (pbnorm == 0) + { + continue; + } + + sprintf_freq(freqbuf, sizeof(freqbuf), pbnorm); + fprintf(fout, "\n\t%s\tNormal: %s,\t", rig_strrmode(i), freqbuf); + + sprintf_freq(freqbuf, sizeof(freqbuf), rig_passband_narrow(rig, i)); + fprintf(fout, "Narrow: %s,\t", freqbuf); + + sprintf_freq(freqbuf, sizeof(freqbuf), rig_passband_wide(rig, i)); + fprintf(fout, "Wide: %s", freqbuf); + } + + RETURNFUNC(RIG_OK); } commit 231f9faad8feaa761298c8595afa63379a077023 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon May 3 09:24:02 2021 -0500 Add get_modes call to return list of rig modes diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 0ede3fc6..4143eb40 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -164,6 +164,7 @@ declare_proto_rig(set_xit); declare_proto_rig(get_xit); declare_proto_rig(set_mode); declare_proto_rig(get_mode); +declare_proto_rig(get_modes); declare_proto_rig(set_vfo); declare_proto_rig(get_vfo); declare_proto_rig(get_rig_info); @@ -336,6 +337,7 @@ static struct test_table test_list[] = { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ { 0xf5, "get_rig_info", ACTION(get_rig_info), ARG_NOVFO | ARG_OUT, "RigInfo" }, /* get several vfo parameters at once */ { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, + { 0xf6, "get_modes", ACTION(get_modes), ARG_OUT | ARG_NOVFO, "Modes" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */ { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, { 0x00, "", NULL }, @@ -2295,6 +2297,25 @@ declare_proto_rig(get_vfo_list) RETURNFUNC(RIG_OK); } +/* '\get_modes' */ +declare_proto_rig(get_modes) +{ + static char prntbuf[1024]; + + ENTERFUNC; + + rig_strrmodes(rig->state.mode_list, prntbuf, sizeof(prntbuf)); + + if ((interactive && prompt) || (interactive && !prompt && ext_resp)) + { + fprintf(fout, "%s: ", cmd->arg1); + } + + fprintf(fout, "%s%c", prntbuf[0] ? prntbuf : "None", ext_resp); + + RETURNFUNC(RIG_OK); +} + /* 'T' */ declare_proto_rig(set_ptt) commit c1b2131d9460637c8647626430a913304946a671 Author: Mike Black W9MDB <mdb...@ya...> Date: Sun May 2 17:33:37 2021 -0500 Update NEWS diff --git a/NEWS b/NEWS index f00cbfed..9fa94ca9 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,7 @@ Version 4.2 Split: 0 SatMode: 0 + * FILPATHLEN has changed to HAMLIB_FILPATHLEN * USRP lib and gnuradio are deprecated and will be removed in 5.0 * Added Radan rotator ----------------------------------------------------------------------- Summary of changes: NEWS | 7 ++++ rigs/dummy/dummy.c | 12 +++++-- src/rig.c | 7 +++- tests/dumpcaps.c | 2 +- tests/rigctl_parse.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++- tests/simyaesu.c | 95 ++++++++++++++++++++++++++++++++++++---------------- 6 files changed, 180 insertions(+), 34 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-02 03:19:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 4108c0b57169060a2c2743d39ba4471e87e70f83 (commit) via fc37f0aeaff8f6833d36052cd2fd8450ada0f846 (commit) via 78470cf4ae83a76501b905494ebed57fa485e2ed (commit) from 16f5502af0a4f0c0662ae14c7c7dd063bd2bc697 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4108c0b57169060a2c2743d39ba4471e87e70f83 Merge: fc37f0ae 78470cf4 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 1 22:19:28 2021 -0500 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit fc37f0aeaff8f6833d36052cd2fd8450ada0f846 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 1 22:18:28 2021 -0500 Add 10ms delay after rig_set_ptt to allow hardware ptt relays to do their thing https://github.com/Hamlib/Hamlib/issues/686 diff --git a/NEWS b/NEWS index 5353a4c1..f00cbfed 100644 --- a/NEWS +++ b/NEWS @@ -8,15 +8,25 @@ Please send Hamlib bug reports to ham...@li... Version 4.2 * 2021-04-27 - * New rig_get_vfo_info - * New rig_get_rig_info - Also get_rig_info in rigctld too - Example output with rig in split mode - This is a string return to allow for easy future expansion without changing the API - New tokens may be introduced and can be skipped if not used by clients - VFO=VFOA Freq=10133000 Mode=LSB Width=0 RX=1 TX=0 - VFO=VFOB Freq=10134000 Mode=LSB Width=0 RX=0 TX=1 - Split=1 SatMode=0 + * New rig_get_info -- returns token set for all vfos where order does not matter + This is a string return to allow for easy future expansion without changing the API + New tokens may be introduced and can be skipped if not used by clients + Rig command: \get_rig_info + VFO=Main Freq=145000000 Mode=None Width=0 RX=1 TX=1 + VFO=VFOB Freq=145000000 Mode=FM Width=15000 RX=0 TX=0 + Split=0 SatMode=0 + Rig=Dummy + App=Hamlib + Version=20210429 + CRC=0xf49f4708 + * New rig_get_vfo_info + Rig command: \get_vfo_info VFOA + Freq: 145000000 + Mode: None + Width: 0 + Split: 0 + SatMode: 0 + * USRP lib and gnuradio are deprecated and will be removed in 5.0 * Added Radan rotator diff --git a/src/rig.c b/src/rig.c index 582220c7..66bf6d4e 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2938,6 +2938,11 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) rs->transmit = ptt != RIG_PTT_OFF; } + // some rigs like the FT-2000 with the SCU-17 need just a bit of time to let the relays work + // can affect fake it mode in WSJT-X when the rig is still in transmit and freq change + // is requested on a rig that can't change freq on a transmitting VFO + if (ptt != RIG_PTT_ON) hl_usleep(10*1000); + rig->state.cache.ptt = ptt; elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); commit 78470cf4ae83a76501b905494ebed57fa485e2ed Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 1 15:51:52 2021 -0500 Fix get_vfo_info args diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 645be701..0ede3fc6 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -251,7 +251,7 @@ declare_proto_rig(pause); static struct test_table test_list[] = { #if 0 // implement set_freq VFO later if it can be detected -// { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, + { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, { 'f', "get_freq", ACTION(get_freq), ARG_OUT, "Frequency", "VFO" }, #else { 'F', "set_freq", ACTION(set_freq), ARG_IN1, "Frequency" }, @@ -333,9 +333,9 @@ static struct test_table test_list[] = { 0x8f, "dump_state", ACTION(dump_state), ARG_OUT | ARG_NOVFO }, { 0xf0, "chk_vfo", ACTION(chk_vfo), ARG_NOVFO, "ChkVFO" }, /* rigctld only--check for VFO mode */ { 0xf2, "set_vfo_opt", ACTION(set_vfo_opt), ARG_NOVFO | ARG_IN, "Status" }, /* turn vfo option on/off */ - { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ + { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ { 0xf5, "get_rig_info", ACTION(get_rig_info), ARG_NOVFO | ARG_OUT, "RigInfo" }, /* get several vfo parameters at once */ - { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, + { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */ { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, { 0x00, "", NULL }, ----------------------------------------------------------------------- Summary of changes: NEWS | 28 +++++++++++++++++++--------- src/rig.c | 5 +++++ 2 files changed, 24 insertions(+), 9 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-01 20:53:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 16f5502af0a4f0c0662ae14c7c7dd063bd2bc697 (commit) from 92d01adaa164a3487e2f7e29ef9f1918a9ce8274 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 16f5502af0a4f0c0662ae14c7c7dd063bd2bc697 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 1 15:51:52 2021 -0500 Fix get_vfo_info args It still incorrectly gives a Freq prompt for the VFO. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 645be701..0ede3fc6 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -251,7 +251,7 @@ declare_proto_rig(pause); static struct test_table test_list[] = { #if 0 // implement set_freq VFO later if it can be detected -// { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, + { 'F', "set_freq", ACTION(set_freq), ARG_IN1 | ARG_OUT1, "Frequency" }, { 'f', "get_freq", ACTION(get_freq), ARG_OUT, "Frequency", "VFO" }, #else { 'F', "set_freq", ACTION(set_freq), ARG_IN1, "Frequency" }, @@ -333,9 +333,9 @@ static struct test_table test_list[] = { 0x8f, "dump_state", ACTION(dump_state), ARG_OUT | ARG_NOVFO }, { 0xf0, "chk_vfo", ACTION(chk_vfo), ARG_NOVFO, "ChkVFO" }, /* rigctld only--check for VFO mode */ { 0xf2, "set_vfo_opt", ACTION(set_vfo_opt), ARG_NOVFO | ARG_IN, "Status" }, /* turn vfo option on/off */ - { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ + { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ { 0xf5, "get_rig_info", ACTION(get_rig_info), ARG_NOVFO | ARG_OUT, "RigInfo" }, /* get several vfo parameters at once */ - { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, + { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */ { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, { 0x00, "", NULL }, ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-05-01 18:19:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 92d01adaa164a3487e2f7e29ef9f1918a9ce8274 (commit) via 2dd87806cffae4164962204b05ad4b6890ead027 (commit) from a27595d71eb9b0715015625cf93cbcfd19378dfa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 92d01adaa164a3487e2f7e29ef9f1918a9ce8274 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 1 13:06:32 2021 -0500 Fix MinGW compile warning in dumpcaps.c diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index e138c53a..afc74e48 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -361,7 +361,8 @@ int dumpcaps(RIG *rig, FILE *fout) if (caps->has_set_level & RIG_LEVEL_READONLY_LIST) { - fprintf(fout, "Warning--backend can set readonly levels=0x%0llx\n", caps->has_set_level & RIG_LEVEL_READONLY_LIST); + //fprintf(fout, "Warning--backend can set readonly levels=0x%0llx\n", caps->has_set_level & RIG_LEVEL_READONLY_LIST); + fprintf(fout, "Warning--backend can set readonly levels\n"); backend_warnings++; } commit 2dd87806cffae4164962204b05ad4b6890ead027 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Apr 30 15:59:43 2021 -0500 Remove 3 second sleep from icom.c powerup diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 94356c98..a6f7bd2e 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -6618,7 +6618,8 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) retval = icom_transaction(rig, C_SET_PWR, pwr_sc, NULL, 0, ackbuf, &ack_len); rs->rigport.retry = retry; - hl_usleep(3000 * 1000); // give it 3 seconds to wake up + // why was this sleep here? We'll try without it + //hl_usleep(3000 * 1000); // give it 3 seconds to wake up break; diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 564b519e..505dc454 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210427" +#define BACKEND_VER "20210430" /* * defines used by comp_cal_str in rig.c ----------------------------------------------------------------------- Summary of changes: rigs/icom/icom.c | 3 ++- rigs/icom/icom.h | 2 +- tests/dumpcaps.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-04-30 20:42:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via a27595d71eb9b0715015625cf93cbcfd19378dfa (commit) via 12683d4fafd0063b5318a73e7b6d61e91ebf0530 (commit) from e3255e7a8da34fefbc0bdc5fe463cdf006af5267 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a27595d71eb9b0715015625cf93cbcfd19378dfa Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Apr 30 15:42:03 2021 -0500 Fix segfault in rigctl_parse.c when rig does not have ctcss_list or dcs_list diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index de312174..e138c53a 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -360,7 +360,8 @@ int dumpcaps(RIG *rig, FILE *fout) if (caps->has_set_level & RIG_LEVEL_READONLY_LIST) { - fprintf(fout, "Warning--backend can set readonly levels!\n"); + + fprintf(fout, "Warning--backend can set readonly levels=0x%0llx\n", caps->has_set_level & RIG_LEVEL_READONLY_LIST); backend_warnings++; } diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index aee4a766..645be701 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4357,26 +4357,34 @@ declare_proto_rig(dump_state) fprintf(fout, "has_power2mW=%d\n", rig->caps->power2mW != NULL); fprintf(fout, "has_mW2power=%d\n", rig->caps->mW2power != NULL); fprintf(fout, "timeout=%d\n", rig->caps->timeout); - fprintf(fout, "ctcss_list="); - for (i = 0; i < CTCSS_LIST_SIZE && rig->caps->ctcss_list[i] != 0; i++) + if (rig->caps->ctcss_list) { - fprintf(fout, - " %u.%1u", - rig->caps->ctcss_list[i] / 10, rig->caps->ctcss_list[i] % 10); - } + fprintf(fout, "ctcss_list="); - fprintf(fout, "\n"); - fprintf(fout, "dcs_list="); + for (i = 0; i < CTCSS_LIST_SIZE && rig->caps->ctcss_list[i] != 0; i++) + { + fprintf(fout, + " %u.%1u", + rig->caps->ctcss_list[i] / 10, rig->caps->ctcss_list[i] % 10); + } - for (i = 0; i < DCS_LIST_SIZE && rig->caps->dcs_list[i] != 0; i++) - { - fprintf(fout, - " %u", - rig->caps->dcs_list[i]); + fprintf(fout, "\n"); } - fprintf(fout, "\n"); + if (rig->caps->dcs_list) + { + fprintf(fout, "dcs_list="); + + for (i = 0; i < DCS_LIST_SIZE && rig->caps->dcs_list[i] != 0; i++) + { + fprintf(fout, + " %u", + rig->caps->dcs_list[i]); + } + + fprintf(fout, "\n"); + } fprintf(fout, "done\n"); } commit 12683d4fafd0063b5318a73e7b6d61e91ebf0530 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Apr 30 07:37:07 2021 -0500 Add Version, App, and CRC tags to rig_get_info This output will eventually be used for a multicast broadcast/receive capability diff --git a/src/rig.c b/src/rig.c index 358c1441..582220c7 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6211,6 +6211,52 @@ const char *HAMLIB_API rig_get_info(RIG *rig) return (rig->caps->get_info(rig)); } + +void make_crc_table(unsigned long crcTable[]) +{ + unsigned long POLYNOMIAL = 0xEDB88320; + unsigned long remainder; + unsigned char b = 0; + + do + { + // Start with the data byte + remainder = b; + + for (unsigned long bit = 8; bit > 0; --bit) + { + if (remainder & 1) + { + remainder = (remainder >> 1) ^ POLYNOMIAL; + } + else + { + remainder = (remainder >> 1); + } + } + + crcTable[(size_t)b] = remainder; + } + while (0 != ++b); +} + +static unsigned long crcTable[256]; + +unsigned long gen_crc(unsigned char *p, size_t n) +{ + unsigned long crc = 0xfffffffful; + size_t i; + + if (crcTable[0] == 0) { make_crc_table(crcTable); } + + for (i = 0; i < n; i++) + { + crc = crcTable[*p++ ^ (crc & 0xff)] ^ (crc >> 8); + } + + return ((~crc) & 0xffffffff); +} + /** * \brief get freq/mode/width for requested VFO * \param rig The rig handle @@ -6229,6 +6275,7 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) int ret; int rxa, txa, rxb, txb; response[0] = 0; + char crcstr[16]; vfoA = vfo_fixup(rig, RIG_VFO_A); vfoB = vfo_fixup(rig, RIG_VFO_B); @@ -6265,9 +6312,12 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) rxb = !rxa; txb = split == 1; snprintf(response, max_response_len, - "VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", + "VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d\nRig=%s\nApp=Hamlib\nVersion=20210429\n", rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB), - freqB, modeBstr, (int)widthB, rxb, txb, split, satmode); + freqB, modeBstr, (int)widthB, rxb, txb, split, satmode, rig->caps->model_name); + unsigned long crc = gen_crc((unsigned char *)response, strlen(response)); + sprintf(crcstr, "CRC=0x%08lx\n", crc); + strcat(response, crcstr); RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++-- tests/dumpcaps.c | 3 ++- tests/rigctl_parse.c | 36 +++++++++++++++++++++-------------- 3 files changed, 76 insertions(+), 17 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-04-29 22:28:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via e3255e7a8da34fefbc0bdc5fe463cdf006af5267 (commit) from 81e3e2e5d284bc1b74a4389a5bf309685b866a74 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e3255e7a8da34fefbc0bdc5fe463cdf006af5267 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 29 17:25:54 2021 -0500 Comment out work in progress in rigctl_parse.c diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 63ca1793..aee4a766 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4346,9 +4346,11 @@ declare_proto_rig(dump_state) fprintf(fout, "has_get_freq=%d\n", rig->caps->get_freq != NULL); fprintf(fout, "has_set_conf=%d\n", rig->caps->set_conf != NULL); fprintf(fout, "has_get_conf=%d\n", rig->caps->get_conf != NULL); +#if 0 fprintf(fout, "has_set_parm=%d\n", rig->caps->set_parm != NULL); fprintf(fout, "has_get_parm=%d\n", rig->caps->get_parm != NULL); fprintf(fout, "parm_gran=0x%x\n", rig->caps->parm_gran); +#endif // for the future // fprintf(fout, "has_set_trn=%d\n", rig->caps->set_trn != NULL); // fprintf(fout, "has_get_trn=%d\n", rig->caps->get_trn != NULL); ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-04-29 22:24:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 81e3e2e5d284bc1b74a4389a5bf309685b866a74 (commit) from 604516ed8f839e4927ecca34340f9e1f88576a58 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 81e3e2e5d284bc1b74a4389a5bf309685b866a74 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 29 17:23:37 2021 -0500 astyle files diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index e23f1055..e8ceb1b5 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -203,37 +203,46 @@ int parse_array_int(const char *s, const char *delim, int *array, int array_len) char *p; char *dup = strdup(s); char *rest = dup; - int n=0; + int n = 0; ENTERFUNC; - while((p = strtok_r(rest, delim, &rest))) + + while ((p = strtok_r(rest, delim, &rest))) { - if (n == array_len) { // too many items + if (n == array_len) // too many items + { return n; } + array[n] = atoi(p); //printf("%d\n", array[n]); ++n; } + free(dup); return n; } -int parse_array_double(const char *s, const char *delim, double *array, int array_len) +int parse_array_double(const char *s, const char *delim, double *array, + int array_len) { char *p; char *dup = strdup(s); char *rest = dup; - int n=0; + int n = 0; ENTERFUNC; - while((p = strtok_r(rest, delim, &rest))) + + while ((p = strtok_r(rest, delim, &rest))) { - if (n == array_len) { // too many items + if (n == array_len) // too many items + { return n; } + array[n] = atof(p); //printf("%f\n", array[n]); ++n; } + free(dup); return n; } @@ -555,6 +564,7 @@ static int netrigctl_open(RIG *rig) rig->caps->has_get_level = rs->has_get_level = strtoll(buf, NULL, 0); #if 0 // don't think we need this anymore + if (rs->has_get_level & RIG_LEVEL_RAWSTR) { /* include STRENGTH because the remote rig may be able to @@ -563,6 +573,7 @@ static int netrigctl_open(RIG *rig) rs->has_get_level |= RIG_LEVEL_STRENGTH; rig->caps->has_get_level |= RIG_LEVEL_STRENGTH; } + #endif ret = read_string(&rig->state.rigport, buf, BUF_MAX, "\n", 1); @@ -701,6 +712,7 @@ static int netrigctl_open(RIG *rig) if (!has) { rig->caps->get_conf = NULL; } } + #if 0 // for the future else if (strcmp(setting, "has_set_trn") == 0) { @@ -714,6 +726,7 @@ static int netrigctl_open(RIG *rig) if (!has) { rig->caps->get_trn = NULL; } } + #endif else if (strcmp(setting, "has_power2mW") == 0) { @@ -741,18 +754,22 @@ static int netrigctl_open(RIG *rig) double ctcss[CTCSS_LIST_SIZE]; rig->caps->ctcss_list = calloc(CTCSS_LIST_SIZE, sizeof(tone_t)); n = parse_array_double(value, " \n\r", ctcss, CTCSS_LIST_SIZE); - for(i=0;i<CTCSS_LIST_SIZE && ctcss[i] != 0;++i) rig->caps->ctcss_list[i] = ctcss[i]*10; - if (n < CTCSS_LIST_SIZE) rig->caps->ctcss_list[n] = 0; + + for (i = 0; i < CTCSS_LIST_SIZE && ctcss[i] != 0; ++i) { rig->caps->ctcss_list[i] = ctcss[i] * 10; } + + if (n < CTCSS_LIST_SIZE) { rig->caps->ctcss_list[n] = 0; } } - else if (strcmp(setting,"dcs_list") == 0) + else if (strcmp(setting, "dcs_list") == 0) { int i; int n; - int dcs[DCS_LIST_SIZE+1]; + int dcs[DCS_LIST_SIZE + 1]; rig->caps->dcs_list = calloc(DCS_LIST_SIZE, sizeof(tone_t)); n = parse_array_int(value, " \n\r", dcs, DCS_LIST_SIZE); - for(i=0;i<DCS_LIST_SIZE && dcs[i] != 0; i++) rig->caps->dcs_list[i] = dcs[i]; - if (n < DCS_LIST_SIZE) rig->caps->dcs_list[n] = 0; + + for (i = 0; i < DCS_LIST_SIZE && dcs[i] != 0; i++) { rig->caps->dcs_list[i] = dcs[i]; } + + if (n < DCS_LIST_SIZE) { rig->caps->dcs_list[n] = 0; } } else { @@ -2454,12 +2471,14 @@ static int netrigctl_get_trn(RIG *rig, int *trn) { return -RIG_EPROTO; } - - if (strstr(buf,"OFF")) *trn = RIG_TRN_OFF; - else if (strstr(buf,"RIG")) *trn = RIG_TRN_RIG; - else if (strstr(buf,"POLL")) *trn = RIG_TRN_POLL; - else { - rig_debug(RIG_DEBUG_ERR, "%s: Expected OFF, RIG, or POLL, got '%s'\n", __func__, buf); + + if (strstr(buf, "OFF")) { *trn = RIG_TRN_OFF; } + else if (strstr(buf, "RIG")) { *trn = RIG_TRN_RIG; } + else if (strstr(buf, "POLL")) { *trn = RIG_TRN_POLL; } + else + { + rig_debug(RIG_DEBUG_ERR, "%s: Expected OFF, RIG, or POLL, got '%s'\n", __func__, + buf); ret = -RIG_EINVAL; } @@ -2468,7 +2487,7 @@ static int netrigctl_get_trn(RIG *rig, int *trn) #endif static int netrigctl_mW2power(RIG *rig, float *power, unsigned int mwpower, - freq_t freq, rmode_t mode) + freq_t freq, rmode_t mode) { char cmdbuf[32]; char buf[BUF_MAX]; @@ -2491,7 +2510,7 @@ static int netrigctl_mW2power(RIG *rig, float *power, unsigned int mwpower, static int netrigctl_power2mW(RIG *rig, unsigned int *mwpower, float power, - freq_t freq, rmode_t mode) + freq_t freq, rmode_t mode) { char cmdbuf[32]; char buf[BUF_MAX]; diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 2f76c30e..94356c98 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -4499,6 +4499,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) &ack_len); rs->rigport.retry = retry_save; + if (retval == RIG_OK) // then we're done!! { *tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2); diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 3ad2842a..a6dcc95e 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -337,7 +337,9 @@ transaction_write: int skip = strncmp(cmdstr, "RX", 2) == 0; skip |= strncmp(cmdstr, "RU", 2) == 0; skip |= strncmp(cmdstr, "RD", 2) == 0; - if (skip) { + + if (skip) + { goto transaction_quit; } } @@ -1784,11 +1786,13 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) // by getting current rit we can determine how to handle change // we just use curr_rit - rit to determine how far we need to move // No need to zero out rit - retval = kenwood_get_rit(rig,RIG_VFO_CURR,&curr_rit); + retval = kenwood_get_rit(rig, RIG_VFO_CURR, &curr_rit); + if (retval != RIG_OK) { RETURNFUNC(retval); } + #if 0 // no longer needed if diff can be done retval = kenwood_transaction(rig, "RC", NULL, 0); @@ -1796,6 +1800,7 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) { RETURNFUNC(retval); } + #endif if (rit == 0 && curr_rit == 0) @@ -1806,15 +1811,18 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) if (priv->has_rit2) { diff = rit - curr_rit; - rig_debug(RIG_DEBUG_TRACE, "%s: rit=%ld, curr_rit=%ld, diff=%d\n", __func__, rit, curr_rit, diff); + rig_debug(RIG_DEBUG_TRACE, "%s: rit=%ld, curr_rit=%ld, diff=%d\n", __func__, + rit, curr_rit, diff); snprintf(buf, sizeof(buf), "R%c%05d", (diff > 0) ? 'U' : 'D', abs((int) diff)); retval = kenwood_transaction(rig, buf, NULL, 0); } else { snprintf(buf, sizeof(buf), "R%c", (rit > 0) ? 'U' : 'D'); - diff = labs(((curr_rit - rit) + (curr_rit - rit) >= 0 ? 5 : -5) / 10); // round to nearest 10Hz - rig_debug(RIG_DEBUG_TRACE, "%s: rit=%ld, curr_rit=%ld, diff=%d\n", __func__, rit, curr_rit, diff); + diff = labs(((curr_rit - rit) + (curr_rit - rit) >= 0 ? 5 : -5) / + 10); // round to nearest 10Hz + rig_debug(RIG_DEBUG_TRACE, "%s: rit=%ld, curr_rit=%ld, diff=%d\n", __func__, + rit, curr_rit, diff); rig_debug(RIG_DEBUG_TRACE, "%s: rit change loop=%d\n", __func__, diff); for (i = 0; i < diff; i++) diff --git a/rigs/kenwood/tmd710.c b/rigs/kenwood/tmd710.c index 5e794e56..40187b08 100644 --- a/rigs/kenwood/tmd710.c +++ b/rigs/kenwood/tmd710.c @@ -1236,6 +1236,7 @@ static int tmd710_find_dcs_index(tone_t code, uint32_t *dcs_index) // we only allow exact matches here tone_t *dcs_list = common_dcs_list; + while (code != dcs_list[i]) { if (dcs_list[i] == 0) diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 8ab25d76..a18237dc 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -86,7 +86,8 @@ #define TOK_LEVEL_DIGITAL_NOISE_LIMITER TOKEN_BACKEND(111) #define TOK_FUNC_CW_IF_FOR_SSB_RX TOKEN_BACKEND(112) -int ts480_ext_tokens[] = { +int ts480_ext_tokens[] = +{ TOK_FUNC_NOISE_REDUCTION_2, TOK_FUNC_FILTER_WIDTH_DATA, TOK_FUNC_TX_AUDIO_FROM_DATA_INPUT, TOK_LEVEL_DSP_RX_EQUALIZER, TOK_LEVEL_DSP_TX_EQUALIZER, TOK_LEVEL_DSP_TX_BANDWIDTH, TOK_LEVEL_BEEP_VOLUME, TOK_LEVEL_TX_SIDETONE_VOLUME, @@ -219,7 +220,9 @@ static int ts480_get_ex_menu(RIG *rig, int number, int value_len, int *value) snprintf(buf, 20, "EX%03d0000", number); - retval = kenwood_safe_transaction(rig, buf, ackbuf, sizeof(ackbuf), 9 + value_len); + retval = kenwood_safe_transaction(rig, buf, ackbuf, sizeof(ackbuf), + 9 + value_len); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -238,14 +241,17 @@ static int ts480_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) switch (func) { - case RIG_FUNC_MON: - snprintf(buf, sizeof(buf), "ML00%c", (status == 0) ? '0' : '1'); - RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0)); - case RIG_FUNC_LOCK: - snprintf(buf, sizeof(buf), "LK%c%c", (status == 0) ? '0' : '1', (status == 0) ? '0' : '1'); - RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0)); - default: - return kenwood_set_func(rig, vfo, func, status); + case RIG_FUNC_MON: + snprintf(buf, sizeof(buf), "ML00%c", (status == 0) ? '0' : '1'); + RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0)); + + case RIG_FUNC_LOCK: + snprintf(buf, sizeof(buf), "LK%c%c", (status == 0) ? '0' : '1', + (status == 0) ? '0' : '1'); + RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0)); + + default: + return kenwood_set_func(rig, vfo, func, status); } } @@ -258,29 +264,35 @@ static int ts480_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) switch (func) { - case RIG_FUNC_MON: { - int raw_value; - retval = kenwood_safe_transaction(rig, "ML", buf, sizeof(buf), 5); - if (retval != RIG_OK) - { - RETURNFUNC(retval); - } - sscanf(buf, "ML%d", &raw_value); + case RIG_FUNC_MON: + { + int raw_value; + retval = kenwood_safe_transaction(rig, "ML", buf, sizeof(buf), 5); - *status = (raw_value > 0); - break; + if (retval != RIG_OK) + { + RETURNFUNC(retval); } - case RIG_FUNC_LOCK: - retval = kenwood_safe_transaction(rig, "LK", buf, sizeof(buf), 4); - if (retval != RIG_OK) - { - RETURNFUNC(retval); - } - *status = buf[2] != '0' || buf[3] != '0'; - break; - default: - return kenwood_get_func(rig, vfo, func, status); + sscanf(buf, "ML%d", &raw_value); + + *status = (raw_value > 0); + break; + } + + case RIG_FUNC_LOCK: + retval = kenwood_safe_transaction(rig, "LK", buf, sizeof(buf), 4); + + if (retval != RIG_OK) + { + RETURNFUNC(retval); + } + + *status = buf[2] != '0' || buf[3] != '0'; + break; + + default: + return kenwood_get_func(rig, vfo, func, status); } RETURNFUNC(RIG_OK); @@ -355,34 +367,42 @@ int kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) break; case RIG_LEVEL_PREAMP: - if (val.i != 12 && val.i != 0) { + if (val.i != 12 && val.i != 0) + { RETURNFUNC(-RIG_EINVAL); } + sprintf(levelbuf, "PA%c", (val.i == 12) ? '1' : '0'); break; case RIG_LEVEL_ATT: - if (val.i != 12 && val.i != 0) { + if (val.i != 12 && val.i != 0) + { RETURNFUNC(-RIG_EINVAL); } + sprintf(levelbuf, "RA%02d", (val.i == 12) ? 1 : 0); break; case RIG_LEVEL_METER: switch (val.i) { - case RIG_METER_SWR: - kenwood_val = 1; - break; - case RIG_METER_COMP: - kenwood_val = 2; - break; - case RIG_METER_ALC: - kenwood_val = 3; - break; - default: - RETURNFUNC(-RIG_EINVAL); + case RIG_METER_SWR: + kenwood_val = 1; + break; + + case RIG_METER_COMP: + kenwood_val = 2; + break; + + case RIG_METER_ALC: + kenwood_val = 3; + break; + + default: + RETURNFUNC(-RIG_EINVAL); } + sprintf(levelbuf, "RM%d", kenwood_val); break; @@ -434,14 +454,18 @@ static int ts480_read_meters(RIG *rig, int *swr, int *comp, int *alc) if (retval != expected_len) { - rig_debug(RIG_DEBUG_ERR, "%s: expected %d bytes, got %d in '%s'\n", __func__, expected_len, retval, ackbuf); + rig_debug(RIG_DEBUG_ERR, "%s: expected %d bytes, got %d in '%s'\n", __func__, + expected_len, retval, ackbuf); RETURNFUNC(-RIG_EPROTO); } retval = sscanf(ackbuf, "RM1%d;RM2%d;RM3%d;", swr, comp, alc); + if (retval != 3) { - rig_debug(RIG_DEBUG_ERR, "%s: expected 3 meter values to parse, got %d in '%s'\n", __func__, retval, ackbuf); + rig_debug(RIG_DEBUG_ERR, + "%s: expected 3 meter values to parse, got %d in '%s'\n", __func__, retval, + ackbuf); RETURNFUNC(-RIG_EPROTO); } @@ -548,6 +572,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) default: return -RIG_EPROTO; } + return RIG_OK; case RIG_LEVEL_STRENGTH: @@ -559,39 +584,48 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return kenwood_get_level(rig, vfo, level, val); - case RIG_LEVEL_MONITOR_GAIN: { + case RIG_LEVEL_MONITOR_GAIN: + { int raw_value; retval = kenwood_safe_transaction(rig, "ML", ackbuf, sizeof(ackbuf), 5); + if (retval != RIG_OK) { RETURNFUNC(retval); } + sscanf(ackbuf, "ML%d", &raw_value); val->f = (float) raw_value / 9.0f; break; } - case RIG_LEVEL_NB: { + case RIG_LEVEL_NB: + { int raw_value; retval = kenwood_safe_transaction(rig, "NL", ackbuf, sizeof(ackbuf), 5); + if (retval != RIG_OK) { RETURNFUNC(retval); } + sscanf(ackbuf, "NL%d", &raw_value); val->f = (float) raw_value / 10.0f; break; } - case RIG_LEVEL_NR: { + case RIG_LEVEL_NR: + { int raw_value; retval = kenwood_safe_transaction(rig, "RL", ackbuf, sizeof(ackbuf), 4); + if (retval != RIG_OK) { RETURNFUNC(retval); } + sscanf(ackbuf, "RL%d", &raw_value); val->f = (float) raw_value / 9.0f; @@ -600,59 +634,72 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_PREAMP: retval = kenwood_safe_transaction(rig, "PA", ackbuf, sizeof(ackbuf), 4); + if (retval != RIG_OK) { RETURNFUNC(retval); } + val->i = ackbuf[2] == '1' ? 12 : 0; break; case RIG_LEVEL_ATT: retval = kenwood_safe_transaction(rig, "RA", ackbuf, sizeof(ackbuf), 6); + if (retval != RIG_OK) { RETURNFUNC(retval); } + val->i = ackbuf[3] == '1' ? 12 : 0; break; - case RIG_LEVEL_METER: { + case RIG_LEVEL_METER: + { int raw_value; // TODO: Read all meters at the same time: RM10000;RM20000;RM30000; retval = kenwood_safe_transaction(rig, "RM", ackbuf, sizeof(ackbuf), 7); + if (retval != RIG_OK) { RETURNFUNC(retval); } sscanf(ackbuf, "RM%1d", &raw_value); + switch (raw_value) { - case 1: - val->i = RIG_METER_SWR; - break; - case 2: - val->i = RIG_METER_COMP; - break; - case 3: - val->i = RIG_METER_ALC; - break; - default: - val->i = RIG_METER_NONE; + case 1: + val->i = RIG_METER_SWR; + break; + + case 2: + val->i = RIG_METER_COMP; + break; + + case 3: + val->i = RIG_METER_ALC; + break; + + default: + val->i = RIG_METER_NONE; } + break; } case RIG_LEVEL_SWR: case RIG_LEVEL_COMP_METER: - case RIG_LEVEL_ALC: { + case RIG_LEVEL_ALC: + { int swr; int comp; int alc; retval = ts480_read_meters(rig, &swr, &comp, &alc); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -660,30 +707,36 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) switch (level) { - case RIG_LEVEL_SWR: - if (rig->caps->swr_cal.size) - { - val->f = rig_raw2val_float(swr, &rig->caps->swr_cal); - } - else - { - val->f = (float) swr / 2.0f; - } - break; - case RIG_LEVEL_COMP_METER: - val->f = (float) comp; // Maximum value is 20dB - break; - case RIG_LEVEL_ALC: - // Maximum value is 20, so have the max at 5 just to be on the range where other rigs report ALC - val->f = (float) alc / 4.0f; - break; - default: - return -RIG_ENAVAIL; + case RIG_LEVEL_SWR: + if (rig->caps->swr_cal.size) + { + val->f = rig_raw2val_float(swr, &rig->caps->swr_cal); + } + else + { + val->f = (float) swr / 2.0f; + } + + break; + + case RIG_LEVEL_COMP_METER: + val->f = (float) comp; // Maximum value is 20dB + break; + + case RIG_LEVEL_ALC: + // Maximum value is 20, so have the max at 5 just to be on the range where other rigs report ALC + val->f = (float) alc / 4.0f; + break; + + default: + return -RIG_ENAVAIL; } + break; } - case RIG_LEVEL_RFPOWER_METER: { + case RIG_LEVEL_RFPOWER_METER: + { int raw_value; if (rig->state.cache.ptt == RIG_PTT_OFF) @@ -693,6 +746,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } retval = kenwood_safe_transaction(rig, "SM0", ackbuf, sizeof(ackbuf), 7); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -704,9 +758,11 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; } - case RIG_LEVEL_CWPITCH: { + case RIG_LEVEL_CWPITCH: + { int raw_value; retval = ts480_get_ex_menu(rig, 34, 2, &raw_value); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -740,13 +796,16 @@ static int ts480_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) // RC clear command cannot be executed if RIT/XIT is not enabled retval = kenwood_get_func(rig, vfo, RIG_FUNC_RIT, &rit_enabled); + if (retval != RIG_OK) { RETURNFUNC(retval); } + if (!rit_enabled) { retval = kenwood_get_func(rig, vfo, RIG_FUNC_XIT, &xit_enabled); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -756,6 +815,7 @@ static int ts480_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) if (!rit_enabled && !xit_enabled) { retval = kenwood_set_func(rig, vfo, RIG_FUNC_RIT, 1); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -763,6 +823,7 @@ static int ts480_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) } retval = kenwood_transaction(rig, "RC", NULL, 0); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -771,6 +832,7 @@ static int ts480_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) if (!rit_enabled && !xit_enabled) { retval = kenwood_set_func(rig, vfo, RIG_FUNC_RIT, 0); + if (retval != RIG_OK) { RETURNFUNC(retval); @@ -825,37 +887,45 @@ static int ts480_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) switch (token) { - case TOK_FUNC_NOISE_REDUCTION_2: - if (status < 0 || status > 1) - { - RETURNFUNC(-RIG_EINVAL); - } - snprintf(cmdbuf, sizeof(cmdbuf), "NR%d", status ? 2 : 0); - retval = kenwood_transaction(rig, cmdbuf, NULL, 0); - break; - case TOK_FUNC_CW_IF_FOR_SSB_RX: - if (status < 0 || status > 1) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 17, 1, status); - break; - case TOK_FUNC_FILTER_WIDTH_DATA: - if (status < 0 || status > 1) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 45, 1, status); - break; - case TOK_FUNC_TX_AUDIO_FROM_DATA_INPUT: - if (status < 0 || status > 1) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 60, 1, status); - break; - default: + case TOK_FUNC_NOISE_REDUCTION_2: + if (status < 0 || status > 1) + { RETURNFUNC(-RIG_EINVAL); + } + + snprintf(cmdbuf, sizeof(cmdbuf), "NR%d", status ? 2 : 0); + retval = kenwood_transaction(rig, cmdbuf, NULL, 0); + break; + + case TOK_FUNC_CW_IF_FOR_SSB_RX: + if (status < 0 || status > 1) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 17, 1, status); + break; + + case TOK_FUNC_FILTER_WIDTH_DATA: + if (status < 0 || status > 1) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 45, 1, status); + break; + + case TOK_FUNC_TX_AUDIO_FROM_DATA_INPUT: + if (status < 0 || status > 1) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 60, 1, status); + break; + + default: + RETURNFUNC(-RIG_EINVAL); } RETURNFUNC(retval); @@ -870,31 +940,37 @@ static int ts480_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) switch (token) { - case TOK_FUNC_NOISE_REDUCTION_2: { - int value; - - retval = kenwood_safe_transaction(rig, "NR", ackbuf, sizeof(ackbuf), 3); - if (retval != RIG_OK) - { - RETURNFUNC(retval); - } + case TOK_FUNC_NOISE_REDUCTION_2: + { + int value; - sscanf(ackbuf, "NR%d", &value); + retval = kenwood_safe_transaction(rig, "NR", ackbuf, sizeof(ackbuf), 3); - *status = (value == 2) ? 1 : 0; - break; + if (retval != RIG_OK) + { + RETURNFUNC(retval); } - case TOK_FUNC_CW_IF_FOR_SSB_RX: - retval = ts480_get_ex_menu(rig, 17, 1, status); - break; - case TOK_FUNC_FILTER_WIDTH_DATA: - retval = ts480_get_ex_menu(rig, 45, 1, status); - break; - case TOK_FUNC_TX_AUDIO_FROM_DATA_INPUT: - retval = ts480_get_ex_menu(rig, 60, 1, status); - break; - default: - RETURNFUNC(-RIG_EINVAL); + + sscanf(ackbuf, "NR%d", &value); + + *status = (value == 2) ? 1 : 0; + break; + } + + case TOK_FUNC_CW_IF_FOR_SSB_RX: + retval = ts480_get_ex_menu(rig, 17, 1, status); + break; + + case TOK_FUNC_FILTER_WIDTH_DATA: + retval = ts480_get_ex_menu(rig, 45, 1, status); + break; + + case TOK_FUNC_TX_AUDIO_FROM_DATA_INPUT: + retval = ts480_get_ex_menu(rig, 60, 1, status); + break; + + default: + RETURNFUNC(-RIG_EINVAL); } RETURNFUNC(retval); @@ -909,65 +985,82 @@ static int ts480_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) switch (token) { - case TOK_LEVEL_DIGITAL_NOISE_LIMITER: - if (val.i < 0 || val.i > 3) - { - RETURNFUNC(-RIG_EINVAL); - } - snprintf(cmdbuf, sizeof(cmdbuf), "DL%d%02d", val.i != 0 ? 1 : 0, val.i > 0 ? val.i - 1 : 0); - retval = kenwood_transaction(rig, cmdbuf, NULL, 0); - break; - case TOK_LEVEL_DSP_RX_EQUALIZER: - if (val.i < 0 || val.i > 7) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 18, 1, val.i); - break; - case TOK_LEVEL_DSP_TX_EQUALIZER: - if (val.i < 0 || val.i > 7) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 19, 1, val.i); - break; - case TOK_LEVEL_DSP_TX_BANDWIDTH: - if (val.i < 0 || val.i > 1) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 20, 1, val.i); - break; - case TOK_LEVEL_BEEP_VOLUME: - if (val.f < 0 || val.f > 9) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 12, 1, (int) val.f); - break; - case TOK_LEVEL_TX_SIDETONE_VOLUME: - if (val.f < 0 || val.f > 9) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 13, 1, (int) val.f); - break; - case TOK_LEVEL_AF_INPUT_LEVEL: - if (val.f < 0 || val.f > 9) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 46, 1, (int) val.f); - break; - case TOK_LEVEL_AF_OUTPUT_LEVEL: - if (val.f < 0 || val.f > 9) - { - RETURNFUNC(-RIG_EINVAL); - } - retval = ts480_set_ex_menu(rig, 47, 1, (int) val.f); - break; - default: + case TOK_LEVEL_DIGITAL_NOISE_LIMITER: + if (val.i < 0 || val.i > 3) + { RETURNFUNC(-RIG_EINVAL); + } + + snprintf(cmdbuf, sizeof(cmdbuf), "DL%d%02d", val.i != 0 ? 1 : 0, + val.i > 0 ? val.i - 1 : 0); + retval = kenwood_transaction(rig, cmdbuf, NULL, 0); + break; + + case TOK_LEVEL_DSP_RX_EQUALIZER: + if (val.i < 0 || val.i > 7) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 18, 1, val.i); + break; + + case TOK_LEVEL_DSP_TX_EQUALIZER: + if (val.i < 0 || val.i > 7) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 19, 1, val.i); + break; + + case TOK_LEVEL_DSP_TX_BANDWIDTH: + if (val.i < 0 || val.i > 1) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 20, 1, val.i); + break; + + case TOK_LEVEL_BEEP_VOLUME: + if (val.f < 0 || val.f > 9) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 12, 1, (int) val.f); + break; + + case TOK_LEVEL_TX_SIDETONE_VOLUME: + if (val.f < 0 || val.f > 9) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 13, 1, (int) val.f); + break; + + case TOK_LEVEL_AF_INPUT_LEVEL: + if (val.f < 0 || val.f > 9) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 46, 1, (int) val.f); + break; + + case TOK_LEVEL_AF_OUTPUT_LEVEL: + if (val.f < 0 || val.f > 9) + { + RETURNFUNC(-RIG_EINVAL); + } + + retval = ts480_set_ex_menu(rig, 47, 1, (int) val.f); + break; + + default: + RETURNFUNC(-RIG_EINVAL); } RETURNFUNC(retval); @@ -983,57 +1076,68 @@ static int ts480_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) switch (token) { - case TOK_LEVEL_DIGITAL_NOISE_LIMITER: { - int enabled; - int level; - - retval = kenwood_safe_transaction(rig, "DL", ackbuf, sizeof(ackbuf), 5); - if (retval != RIG_OK) - { - RETURNFUNC(retval); - } + case TOK_LEVEL_DIGITAL_NOISE_LIMITER: + { + int enabled; + int level; - sscanf(ackbuf, "DL%1d%2d", &enabled, &level); + retval = kenwood_safe_transaction(rig, "DL", ackbuf, sizeof(ackbuf), 5); - val->i = enabled ? level + 1 : 0; - break; + if (retval != RIG_OK) + { + RETURNFUNC(retval); } - case TOK_LEVEL_DSP_RX_EQUALIZER: - retval = ts480_get_ex_menu(rig, 18, 1, &value); - val->i = value; - break; - case TOK_LEVEL_DSP_TX_EQUALIZER: - retval = ts480_get_ex_menu(rig, 19, 1, &value); - val->i = value; - break; - case TOK_LEVEL_DSP_TX_BANDWIDTH: - retval = ts480_get_ex_menu(rig, 20, 1, &value); - val->i = value; - break; - case TOK_LEVEL_BEEP_VOLUME: - retval = ts480_get_ex_menu(rig, 12, 1, &value); - val->f = value; - break; - case TOK_LEVEL_TX_SIDETONE_VOLUME: - retval = ts480_get_ex_menu(rig, 13, 1, &value); - val->f = value; - break; - case TOK_LEVEL_AF_INPUT_LEVEL: - retval = ts480_get_ex_menu(rig, 46, 1, &value); - val->f = value; - break; - case TOK_LEVEL_AF_OUTPUT_LEVEL: - retval = ts480_get_ex_menu(rig, 47, 1, &value); - val->f = value; - break; - default: - RETURNFUNC(-RIG_EINVAL); + + sscanf(ackbuf, "DL%1d%2d", &enabled, &level); + + val->i = enabled ? level + 1 : 0; + break; + } + + case TOK_LEVEL_DSP_RX_EQUALIZER: + retval = ts480_get_ex_menu(rig, 18, 1, &value); + val->i = value; + break; + + case TOK_LEVEL_DSP_TX_EQUALIZER: + retval = ts480_get_ex_menu(rig, 19, 1, &value); + val->i = value; + break; + + case TOK_LEVEL_DSP_TX_BANDWIDTH: + retval = ts480_get_ex_menu(rig, 20, 1, &value); + val->i = value; + break; + + case TOK_LEVEL_BEEP_VOLUME: + retval = ts480_get_ex_menu(rig, 12, 1, &value); + val->f = value; + break; + + case TOK_LEVEL_TX_SIDETONE_VOLUME: + retval = ts480_get_ex_menu(rig, 13, 1, &value); + val->f = value; + break; + + case TOK_LEVEL_AF_INPUT_LEVEL: + retval = ts480_get_ex_menu(rig, 46, 1, &value); + val->f = value; + break; + + case TOK_LEVEL_AF_OUTPUT_LEVEL: + retval = ts480_get_ex_menu(rig, 47, 1, &value); + val->f = value; + break; + + default: + RETURNFUNC(-RIG_EINVAL); } RETURNFUNC(retval); } -static struct kenwood_filter_width ts480_filter_width[] = { +static struct kenwood_filter_width ts480_filter_width[] = +{ { RIG_MODE_CW | RIG_MODE_CWR, 50, 50 }, { RIG_MODE_CW | RIG_MODE_CWR, 80, 80 }, { RIG_MODE_CW | RIG_MODE_CWR, 100, 100 }, @@ -1058,7 +1162,8 @@ static struct kenwood_filter_width ts480_filter_width[] = { { RIG_MODE_NONE, -1, -1 }, }; -static struct kenwood_slope_filter ts480_slope_filter_high[] = { +static struct kenwood_slope_filter ts480_slope_filter_high[] = +{ { RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_RTTY | RIG_MODE_RTTYR, 0, 0, 1000 }, { RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_RTTY | RIG_MODE_RTTYR, 0, 1, 1200 }, { RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_RTTY | RIG_MODE_RTTYR, 0, 2, 1400 }, @@ -1083,7 +1188,8 @@ static struct kenwood_slope_filter ts480_slope_filter_high[] = { { RIG_MODE_NONE, 0, -1, -1 }, }; -static struct kenwood_slope_filter ts480_slope_filter_low[] = { +static struct kenwood_slope_filter ts480_slope_filter_low[] = +{ { RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_RTTY | RIG_MODE_RTTYR, 0, 0, 0 }, { RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_RTTY | RIG_MODE_RTTYR, 0, 1, 50 }, { RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_RTTY | RIG_MODE_RTTYR, 0, 2, 100 }, @@ -1126,6 +1232,7 @@ int ts480_init(RIG *rig) rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); retval = kenwood_init(rig); + if (retval != RIG_OK) { return retval; diff --git a/src/iofunc.c b/src/iofunc.c index 0e58e217..b42318c1 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -481,7 +481,7 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count) return -RIG_EIO; } - if (p->write_delay > 0) hl_usleep(p->write_delay * 1000); + if (p->write_delay > 0) { hl_usleep(p->write_delay * 1000); } } } else diff --git a/src/rig.c b/src/rig.c index aece5b8b..358c1441 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1005,6 +1005,7 @@ int HAMLIB_API rig_open(RIG *rig) * trigger state->current_vfo first retrieval */ TRACE; + if (rig_get_vfo(rig, &rs->current_vfo) == RIG_OK) { rs->tx_vfo = rs->current_vfo; @@ -1744,10 +1745,13 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_freq due to VFO twiddling\n", __func__); - if (vfo != vfo_save && vfo != RIG_VFO_CURR) { + + if (vfo != vfo_save && vfo != RIG_VFO_CURR) + { TRACE; rig_set_vfo(rig, vfo_save); } + RETURNFUNC( RIG_OK); // would be better as error but other software won't handle errors } @@ -1814,10 +1818,13 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_freq due to VFO twiddling\n", __func__); - if (vfo != vfo_save && vfo != RIG_VFO_CURR) { + + if (vfo != vfo_save && vfo != RIG_VFO_CURR) + { TRACE; rig_set_vfo(rig, vfo_save); } + RETURNFUNC( RIG_OK); // would be better as error but other software won't handle errors } @@ -1862,7 +1869,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) set_cache_freq(rig, vfo, freq_new); - if (vfo != vfo_save && vfo != RIG_VFO_CURR) { + if (vfo != vfo_save && vfo != RIG_VFO_CURR) + { TRACE; rig_set_vfo(rig, vfo_save); } @@ -1914,7 +1922,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) vfo = vfo_fixup(rig, vfo); - if (vfo == RIG_VFO_CURR) vfo = curr_vfo; + if (vfo == RIG_VFO_CURR) { vfo = curr_vfo; } // we ignore get_freq for the uplink VFO for gpredict to behave better if ((rig->state.uplink == 1 && vfo == RIG_VFO_SUB) @@ -3950,7 +3958,9 @@ int HAMLIB_API rig_set_split_mode(RIG *rig, } else { - rig_debug(RIG_DEBUG_WARN, "%s: rig does not have set_vfo or vfo_op. Assuming mode already set\n", __func__); + rig_debug(RIG_DEBUG_WARN, + "%s: rig does not have set_vfo or vfo_op. Assuming mode already set\n", + __func__); RETURNFUNC(RIG_OK); } @@ -6209,11 +6219,11 @@ const char *HAMLIB_API rig_get_info(RIG *rig) */ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) { - vfo_t vfoA,vfoB; - freq_t freqA,freqB; - rmode_t modeA,modeB; + vfo_t vfoA, vfoB; + freq_t freqA, freqB; + rmode_t modeA, modeB; char *modeAstr, *modeBstr; - pbwidth_t widthA,widthB; + pbwidth_t widthA, widthB; split_t split; int satmode; int ret; @@ -6222,30 +6232,42 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) vfoA = vfo_fixup(rig, RIG_VFO_A); vfoB = vfo_fixup(rig, RIG_VFO_B); - ret = rig_get_vfo_info(rig, vfoA, &freqA, &modeA, &widthA, &split, &satmode); - if (ret != RIG_OK) RETURNFUNC(ret); + ret = rig_get_vfo_info(rig, vfoA, &freqA, &modeA, &widthA, &split, &satmode); + + if (ret != RIG_OK) { RETURNFUNC(ret); } + // we need both vfo and mode targtable to avoid vfo swapping - if ((rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)) + if ((rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) + && (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)) { - ret = rig_get_vfo_info(rig, vfoB, &freqB, &modeB, &widthB, &split, &satmode); - if (ret != RIG_OK) RETURNFUNC(ret); + ret = rig_get_vfo_info(rig, vfoB, &freqB, &modeB, &widthB, &split, &satmode); + + if (ret != RIG_OK) { RETURNFUNC(ret); } } else { // we'll use cached info instead of doing the vfo swapping int cache_ms_freq, cache_ms_mode, cache_ms_width; - rig_get_cache(rig, vfoB, &freqB, &cache_ms_freq, &modeB, &cache_ms_mode, &widthB, + rig_get_cache(rig, vfoB, &freqB, &cache_ms_freq, &modeB, &cache_ms_mode, + &widthB, &cache_ms_width); } - modeAstr = (char*)rig_strrmode(modeA); - modeBstr = (char*)rig_strrmode(modeB); - if (modeAstr[0]==0) modeAstr="None"; - if (modeBstr[0]==0) modeBstr="None"; + + modeAstr = (char *)rig_strrmode(modeA); + modeBstr = (char *)rig_strrmode(modeB); + + if (modeAstr[0] == 0) { modeAstr = "None"; } + + if (modeBstr[0] == 0) { modeBstr = "None"; } + rxa = 1; txa = split == 0; rxb = !rxa; txb = split == 1; - snprintf(response,max_response_len,"VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB), freqB, modeBstr, (int)widthB, rxb, txb, split, satmode); + snprintf(response, max_response_len, + "VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", + rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB), + freqB, modeBstr, (int)widthB, rxb, txb, split, satmode); RETURNFUNC(RIG_OK); } @@ -6281,7 +6303,7 @@ int HAMLIB_API rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, //if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } - vfo = vfo_fixup(rig,vfo); + vfo = vfo_fixup(rig, vfo); // we can't use the cached values as some clients may only call this function // like Log4OM which mostly does polling TRACE; diff --git a/tests/rigctl.c b/tests/rigctl.c index d3777f56..caa89bfa 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -524,17 +524,21 @@ int main(int argc, char *argv[]) { // if rigctld then we need to open to get the rig caps - if (my_model == RIG_MODEL_NETRIGCTL) { + if (my_model == RIG_MODEL_NETRIGCTL) + { int ret; rig_set_debug(verbose); my_rig = rig_init(my_model); - if((ret=rig_open(my_rig)) != RIG_OK) + + if ((ret = rig_open(my_rig)) != RIG_OK) { - fprintf(stderr,"Unable to open rigctld: %s\n", rigerror(ret)); + fprintf(stderr, "Unable to open rigctld: %s\n", rigerror(ret)); exit(1); } + rig_close(my_rig); } + dumpcaps(my_rig, stdout); rig_cleanup(my_rig); /* if you care about memory */ exit(0); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index a3f2064c..63ca1793 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2221,8 +2221,10 @@ declare_proto_rig(get_rig_info) int ret; ENTERFUNC; ret = rig_get_rig_info(rig, buf, sizeof(buf)); - if (ret != RIG_OK) RETURNFUNC(ret); - fprintf(fout,"%s\n", buf); + + if (ret != RIG_OK) { RETURNFUNC(ret); } + + fprintf(fout, "%s\n", buf); RETURNFUNC(RIG_OK); } @@ -4354,20 +4356,24 @@ declare_proto_rig(dump_state) fprintf(fout, "has_mW2power=%d\n", rig->caps->mW2power != NULL); fprintf(fout, "timeout=%d\n", rig->caps->timeout); fprintf(fout, "ctcss_list="); + for (i = 0; i < CTCSS_LIST_SIZE && rig->caps->ctcss_list[i] != 0; i++) { fprintf(fout, - " %u.%1u", - rig->caps->ctcss_list[i] / 10, rig->caps->ctcss_list[i] % 10); + " %u.%1u", + rig->caps->ctcss_list[i] / 10, rig->caps->ctcss_list[i] % 10); } + fprintf(fout, "\n"); fprintf(fout, "dcs_list="); + for (i = 0; i < DCS_LIST_SIZE && rig->caps->dcs_list[i] != 0; i++) { fprintf(fout, - " %u", - rig->caps->dcs_list[i]); + " %u", + rig->caps->dcs_list[i]); } + fprintf(fout, "\n"); fprintf(fout, "done\n"); ----------------------------------------------------------------------- Summary of changes: rigs/dummy/netrigctl.c | 61 ++++-- rigs/icom/icom.c | 1 + rigs/kenwood/kenwood.c | 18 +- rigs/kenwood/tmd710.c | 1 + rigs/kenwood/ts480.c | 581 +++++++++++++++++++++++++++++-------------------- src/iofunc.c | 2 +- src/rig.c | 64 ++++-- tests/rigctl.c | 10 +- tests/rigctl_parse.c | 18 +- 9 files changed, 462 insertions(+), 294 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-04-29 22:20:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 604516ed8f839e4927ecca34340f9e1f88576a58 (commit) via 697a194752904a3fe245de779c7b0155017996ef (commit) via 386b08dc4f529876f5c22fb36131b5fba73b064a (commit) via 4e60ebf1d6928bd8c7d3b485c6f4d045a75e7af7 (commit) from 5473249e9ad75a302839804a0811039245f13c04 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 604516ed8f839e4927ecca34340f9e1f88576a58 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 29 17:16:51 2021 -0500 Clean up mingw compiler warning for tones.h https://github.com/Hamlib/Hamlib/issues/659 diff --git a/rigs/kenwood/tmd710.c b/rigs/kenwood/tmd710.c index 846de326..5e794e56 100644 --- a/rigs/kenwood/tmd710.c +++ b/rigs/kenwood/tmd710.c @@ -1219,7 +1219,8 @@ int tmd710_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code) if (fo_struct.dcs) { - *code = common_dcs_list[fo_struct.dcs_val]; + tone_t *dcs_list = common_dcs_list; + *code = dcs_list[fo_struct.dcs_val]; } else { @@ -1234,9 +1235,10 @@ static int tmd710_find_dcs_index(tone_t code, uint32_t *dcs_index) int i = 0; // we only allow exact matches here - while (code != common_dcs_list[i]) + tone_t *dcs_list = common_dcs_list; + while (code != dcs_list[i]) { - if (common_dcs_list[i] == 0) + if (dcs_list[i] == 0) { return -RIG_EINVAL; } @@ -1889,7 +1891,8 @@ int tmd710_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) if (me_struct.dcs) { - chan->dcs_sql = common_dcs_list[me_struct.dcs_val]; + tone_t *dcs_list = common_dcs_list; + chan->dcs_sql = dcs_list[me_struct.dcs_val]; } else { diff --git a/src/tones.h b/src/tones.h index 1e6288dd..76f10254 100644 --- a/src/tones.h +++ b/src/tones.h @@ -37,12 +37,10 @@ 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \ 0, -#if 1 static const tone_t static_full_ctcss_list[] = { FULL_CTCSS_LIST }; -#endif #define FULL_CTCSS_LIST_COUNT 52 @@ -62,12 +60,10 @@ static const tone_t static_full_ctcss_list[] = 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \ 0, -#if 1 static const tone_t static_common_ctcss_list[] = { COMMON_CTCSS_LIST }; -#endif #define COMMON_CTCSS_LIST_COUNT 50 @@ -87,12 +83,10 @@ static const tone_t static_common_ctcss_list[] = 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \ 0, -#if 1 static const tone_t static_common_dcs_list[] = { COMMON_DCS_LIST }; -#endif #define COMMON_DCS_LIST_COUNT 104 @@ -111,12 +105,10 @@ static const tone_t static_common_dcs_list[] = 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \ 0, -#if 1 static const tone_t static_full_dcs_list[] = { FULL_DCS_LIST }; -#endif #define FULL_DCS_LIST_COUNT 106 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 01892211..a3f2064c 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4344,6 +4344,9 @@ declare_proto_rig(dump_state) fprintf(fout, "has_get_freq=%d\n", rig->caps->get_freq != NULL); fprintf(fout, "has_set_conf=%d\n", rig->caps->set_conf != NULL); fprintf(fout, "has_get_conf=%d\n", rig->caps->get_conf != NULL); + fprintf(fout, "has_set_parm=%d\n", rig->caps->set_parm != NULL); + fprintf(fout, "has_get_parm=%d\n", rig->caps->get_parm != NULL); + fprintf(fout, "parm_gran=0x%x\n", rig->caps->parm_gran); // for the future // fprintf(fout, "has_set_trn=%d\n", rig->caps->set_trn != NULL); // fprintf(fout, "has_get_trn=%d\n", rig->caps->get_trn != NULL); commit 697a194752904a3fe245de779c7b0155017996ef Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 29 17:06:45 2021 -0500 Fix mingw warnings from new ctcss_list definition https://github.com/Hamlib/Hamlib/issues/659 diff --git a/src/tones.h b/src/tones.h index 204b66f7..1e6288dd 100644 --- a/src/tones.h +++ b/src/tones.h @@ -37,7 +37,7 @@ 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \ 0, -#if 0 +#if 1 static const tone_t static_full_ctcss_list[] = { FULL_CTCSS_LIST @@ -62,7 +62,7 @@ static const tone_t static_full_ctcss_list[] = 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \ 0, -#if 0 +#if 1 static const tone_t static_common_ctcss_list[] = { COMMON_CTCSS_LIST @@ -87,7 +87,7 @@ static const tone_t static_common_ctcss_list[] = 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \ 0, -#if 0 +#if 1 static const tone_t static_common_dcs_list[] = { COMMON_DCS_LIST @@ -111,7 +111,7 @@ static const tone_t static_common_dcs_list[] = 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \ 0, -#if 0 +#if 1 static const tone_t static_full_dcs_list[] = { FULL_DCS_LIST @@ -125,10 +125,10 @@ static const tone_t static_full_dcs_list[] = * because DLL's vars don't have constant address. */ #if (defined(_WIN32) || defined(__CYGWIN__)) // && !defined(IN_HAMLIB) -#define common_ctcss_list static_common_ctcss_list -#define full_ctcss_list static_full_ctcss_list -#define full_dcs_list static_full_dcs_list -#define common_dcs_list static_common_dcs_list +#define common_ctcss_list (tone_t*)static_common_ctcss_list +#define full_ctcss_list (tone_t*)static_full_ctcss_list +#define full_dcs_list (tone_t*)static_full_dcs_list +#define common_dcs_list (tone_t*)static_common_dcs_list #else commit 386b08dc4f529876f5c22fb36131b5fba73b064a Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 29 10:49:29 2021 -0500 Add ctcss_list and dcs_list to rigctld so rigcctld caps reflects the connected rig https://github.com/Hamlib/Hamlib/issues/659 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index ffb08df7..1f1c781e 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -214,6 +214,8 @@ typedef struct s_rig RIG; * * Digitally-Coded Squelch codes are simple direct integers. */ +#define CTCSS_LIST_SIZE 60 +#define DCS_LIST_SIZE 128 typedef unsigned int tone_t; @@ -1639,8 +1641,8 @@ struct rig_caps { const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c */ int *ext_tokens; /*!< Extension token list */ - const tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */ - const tone_t *dcs_list; /*!< DCS code list, zero ended */ + tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */ + tone_t *dcs_list; /*!< DCS code list, zero ended */ int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index 20c7cd50..e23f1055 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -41,7 +41,7 @@ #include "dummy.h" #define CMD_MAX 64 -#define BUF_MAX 96 +#define BUF_MAX 1024 #define CHKSCN1ARG(a) if ((a) != 1) return -RIG_EPROTO; else do {} while(0) @@ -198,6 +198,48 @@ static int netrigctl_cleanup(RIG *rig) return RIG_OK; } +int parse_array_int(const char *s, const char *delim, int *array, int array_len) +{ + char *p; + char *dup = strdup(s); + char *rest = dup; + int n=0; + ENTERFUNC; + while((p = strtok_r(rest, delim, &rest))) + { + if (n == array_len) { // too many items + return n; + } + array[n] = atoi(p); + //printf("%d\n", array[n]); + ++n; + } + free(dup); + return n; +} + +int parse_array_double(const char *s, const char *delim, double *array, int array_len) +{ + char *p; + char *dup = strdup(s); + char *rest = dup; + int n=0; + ENTERFUNC; + while((p = strtok_r(rest, delim, &rest))) + { + if (n == array_len) { // too many items + return n; + } + array[n] = atof(p); + //printf("%f\n", array[n]); + ++n; + } + free(dup); + return n; +} + + + static int netrigctl_open(RIG *rig) { int ret, len, i; @@ -576,7 +618,7 @@ static int netrigctl_open(RIG *rig) do { - char setting[32], value[256]; + char setting[32], value[1024]; ret = read_string(&rig->state.rigport, buf, BUF_MAX, "\n", 1); strtok(buf, "\r\n"); // chop the EOL @@ -587,7 +629,7 @@ static int netrigctl_open(RIG *rig) if (strncmp(buf, "done", 4) == 0) { return RIG_OK; } - if (sscanf(buf, "%31[^=]=%255[^\t\n]", setting, value) == 2) + if (sscanf(buf, "%31[^=]=%1024[^\t\n]", setting, value) == 2) { if (strcmp(setting, "vfo_ops") == 0) { @@ -679,7 +721,7 @@ static int netrigctl_open(RIG *rig) if (!has) { rig->caps->power2mW = NULL; } } - else if (strcmp(setting, "has_mw2power") == 0) + else if (strcmp(setting, "has_mW2power") == 0) { int has = strtol(value, NULL, 0); @@ -692,6 +734,26 @@ static int netrigctl_open(RIG *rig) rig_debug(RIG_DEBUG_TRACE, "%s: timeout value = '%s', final timeout=%d\n", __func__, value, rig->caps->timeout); } + else if (strcmp(setting, "ctcss_list") == 0) + { + int i; + int n; + double ctcss[CTCSS_LIST_SIZE]; + rig->caps->ctcss_list = calloc(CTCSS_LIST_SIZE, sizeof(tone_t)); + n = parse_array_double(value, " \n\r", ctcss, CTCSS_LIST_SIZE); + for(i=0;i<CTCSS_LIST_SIZE && ctcss[i] != 0;++i) rig->caps->ctcss_list[i] = ctcss[i]*10; + if (n < CTCSS_LIST_SIZE) rig->caps->ctcss_list[n] = 0; + } + else if (strcmp(setting,"dcs_list") == 0) + { + int i; + int n; + int dcs[DCS_LIST_SIZE+1]; + rig->caps->dcs_list = calloc(DCS_LIST_SIZE, sizeof(tone_t)); + n = parse_array_int(value, " \n\r", dcs, DCS_LIST_SIZE); + for(i=0;i<DCS_LIST_SIZE && dcs[i] != 0; i++) rig->caps->dcs_list[i] = dcs[i]; + if (n < DCS_LIST_SIZE) rig->caps->dcs_list[n] = 0; + } else { // not an error -- just a warning for backward compatibility diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index c39cbf5c..3ad2842a 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -157,7 +157,7 @@ rmode_t kenwood_mode_table[KENWOOD_MODE_TABLE_MAX] = /* * 38 CTCSS sub-audible tones */ -const tone_t kenwood38_ctcss_list[] = +tone_t kenwood38_ctcss_list[] = { 670, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 1318, @@ -170,7 +170,7 @@ const tone_t kenwood38_ctcss_list[] = /* * 42 CTCSS sub-audible tones */ -const tone_t kenwood42_ctcss_list[] = +tone_t kenwood42_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 1318, @@ -184,7 +184,7 @@ const tone_t kenwood42_ctcss_list[] = * * See enum rig_conf_e and struct confparams in rig.h */ -const struct confparams kenwood_cfg_params[] = +struct confparams kenwood_cfg_params[] = { { TOK_FINE, "fine", "Fine", "Fine step mode", diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index abe0829a..76b6436d 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -50,7 +50,7 @@ #define TOK_FUNC_FILTER_WIDTH_DATA TOKEN_BACKEND(6) // Data communications mode that affects SL/SH/FW commands /* Token structure assigned to .cfgparams in rig_caps */ -extern const struct confparams kenwood_cfg_params[]; +extern struct confparams kenwood_cfg_params[]; /* @@ -173,8 +173,8 @@ struct kenwood_priv_data extern rmode_t kenwood_mode_table[KENWOOD_MODE_TABLE_MAX]; -extern const tone_t kenwood38_ctcss_list[]; -extern const tone_t kenwood42_ctcss_list[]; +extern tone_t kenwood38_ctcss_list[]; +extern tone_t kenwood42_ctcss_list[]; int kenwood_transaction(RIG *rig, const char *cmdstr, char *data, size_t datasize); int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, diff --git a/rigs/kenwood/pihpsdr.c b/rigs/kenwood/pihpsdr.c index 05830c13..3136e1dc 100644 --- a/rigs/kenwood/pihpsdr.c +++ b/rigs/kenwood/pihpsdr.c @@ -130,8 +130,8 @@ const struct rig_caps pihpsdr_caps = .parm_gran = {}, .vfo_ops = PIHPSDR_VFO_OP, .scan_ops = PIHPSDR_SCAN_OP, - .ctcss_list = static_common_ctcss_list, - .dcs_list = static_common_dcs_list, + .ctcss_list = common_ctcss_list, + .dcs_list = common_dcs_list, .preamp = { 20, RIG_DBLST_END, }, /* FIXME: real preamp? */ .attenuator = { 20, RIG_DBLST_END, }, .max_rit = kHz(20), diff --git a/rigs/kenwood/thf6a.c b/rigs/kenwood/thf6a.c index 9fc73e53..d7eb1513 100644 --- a/rigs/kenwood/thf6a.c +++ b/rigs/kenwood/thf6a.c @@ -71,7 +71,7 @@ .dcs_sql=1, /* CTCSS 01..42 */ -static const tone_t thf6_ctcss_list[] = +static tone_t thf6_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, diff --git a/rigs/kenwood/thf7.c b/rigs/kenwood/thf7.c index 68a8d5f5..eda15a8d 100644 --- a/rigs/kenwood/thf7.c +++ b/rigs/kenwood/thf7.c @@ -65,7 +65,7 @@ .dcs_sql=1, /* CTCSS 01..42 */ -static const tone_t thf7_ctcss_list[] = +static tone_t thf7_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c index 60615366..87c9b0ee 100644 --- a/rigs/kenwood/ts2000.c +++ b/rigs/kenwood/ts2000.c @@ -65,7 +65,7 @@ static int ts2000_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan); /* * 38 CTCSS sub-audible tones + 1750 tone */ -const tone_t ts2000_ctcss_list[] = +tone_t ts2000_ctcss_list[] = { 670, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 1318, @@ -79,7 +79,7 @@ const tone_t ts2000_ctcss_list[] = /* * 103 available DCS codes */ -static const tone_t ts2000_dcs_list[] = +tone_t ts2000_dcs_list[] = { 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, diff --git a/rigs/pcr/pcr.c b/rigs/pcr/pcr.c index 8352987f..8add36da 100644 --- a/rigs/pcr/pcr.c +++ b/rigs/pcr/pcr.c @@ -76,7 +76,7 @@ * Don't even touch a single bit! indexes will be used in the protocol! * 51 tones, the 60.0 Hz tone is missing. */ -const tone_t pcr_ctcss_list[] = +tone_t pcr_ctcss_list[] = { 670, 693, 710, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, @@ -91,7 +91,7 @@ const tone_t pcr_ctcss_list[] = * Don't even touch a single bit! indexes will be used in the protocol! * 104 codes */ -const tone_t pcr_dcs_list[] = +tone_t pcr_dcs_list[] = { 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, diff --git a/rigs/pcr/pcr.h b/rigs/pcr/pcr.h index 25516ca1..89714f1f 100644 --- a/rigs/pcr/pcr.h +++ b/rigs/pcr/pcr.h @@ -81,8 +81,8 @@ struct pcr_priv_caps #define pcr_caps(rig) ((struct pcr_priv_caps *)(rig)->caps->priv) -extern const tone_t pcr_ctcss_list[]; -extern const tone_t pcr_dcs_list[]; +extern tone_t pcr_ctcss_list[]; +extern tone_t pcr_dcs_list[]; int pcr_init(RIG *rig); int pcr_cleanup(RIG *rig); diff --git a/rigs/uniden/bc898.c b/rigs/uniden/bc898.c index bfaa4f6b..dd55beac 100644 --- a/rigs/uniden/bc898.c +++ b/rigs/uniden/bc898.c @@ -53,7 +53,7 @@ { 255, 60 }, \ } } -static const tone_t bc898_ctcss_list[] = +static tone_t bc898_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, diff --git a/rigs/uniden/uniden.c b/rigs/uniden/uniden.c index 68ecf9da..bdd81e9a 100644 --- a/rigs/uniden/uniden.c +++ b/rigs/uniden/uniden.c @@ -55,7 +55,7 @@ uniden_id_string_list[] = }; -const tone_t uniden_ctcss_list[] = +tone_t uniden_ctcss_list[] = { 670, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, @@ -64,7 +64,7 @@ const tone_t uniden_ctcss_list[] = 2418, 2503, 0 }; -const tone_t uniden_dcs_list[] = +tone_t uniden_dcs_list[] = { 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, diff --git a/rigs/uniden/uniden.h b/rigs/uniden/uniden.h index ed3eea64..97d5f329 100644 --- a/rigs/uniden/uniden.h +++ b/rigs/uniden/uniden.h @@ -51,11 +51,11 @@ { 255, 60 }, \ } } -extern const tone_t uniden_ctcss_list[]; -extern const tone_t uniden_dcs_list[]; +extern tone_t uniden_ctcss_list[]; +extern tone_t uniden_dcs_list[]; int uniden_transaction (RIG *rig, const char *cmdstr, int cmd_len, - const char *replystr, char *data, size_t *datasize); +const char *replystr, char *data, size_t *datasize); int uniden_set_freq(RIG *rig, vfo_t vfo, freq_t freq); int uniden_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); int uniden_get_freq_2(RIG *rig, vfo_t vfo, freq_t *freq); diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index da0a018c..52b18a8b 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -120,7 +120,7 @@ static const yaesu_cmd_set_t ncmd[] = }; -static const tone_t ft100_ctcss_list[] = +static tone_t ft100_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, \ 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, \ @@ -129,7 +129,7 @@ static const tone_t ft100_ctcss_list[] = 2503, 0 }; -static const tone_t ft100_dcs_list[] = +static tone_t ft100_dcs_list[] = { 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, \ 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, \ diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 0d59d7eb..814f6b59 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -157,7 +157,7 @@ static const yaesu_cmd_set_t ncmd[] = /** * 33 CTCSS sub-audible tones */ -static const tone_t ft1000mp_ctcss_list[] = +static tone_t ft1000mp_ctcss_list[] = { 670, 719, 770, 825, 885, 948, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, diff --git a/rigs/yaesu/ft736.c b/rigs/yaesu/ft736.c index a406431b..ec4a023e 100644 --- a/rigs/yaesu/ft736.c +++ b/rigs/yaesu/ft736.c @@ -80,7 +80,7 @@ static int ft736_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone); /* Some tones are present twice, the second value is * higher Q (80), according to manual. */ -static const tone_t ft736_ctcss_list[] = +static tone_t ft736_ctcss_list[] = { 670, 719, 770, 825, 885, 948, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 1318, 1365, 1413, 1462, 1514, 1567, diff --git a/rigs/yaesu/ft767gx.c b/rigs/yaesu/ft767gx.c index 9ddad66b..290f4a6d 100644 --- a/rigs/yaesu/ft767gx.c +++ b/rigs/yaesu/ft767gx.c @@ -249,7 +249,7 @@ struct ft767_priv_data unsigned char ack_cmd[5]; }; -const tone_t static_767gx_ctcss_list[] = +tone_t static_767gx_ctcss_list[] = { CTCSS_TONE_LIST }; diff --git a/rigs/yaesu/ft847.c b/rigs/yaesu/ft847.c index 9ac8e081..da42a36d 100644 --- a/rigs/yaesu/ft847.c +++ b/rigs/yaesu/ft847.c @@ -193,7 +193,7 @@ static const yaesu_cmd_set_t ncmd[] = * 39 CTCSS sub-audible tones * c.f. ft847_set_ctcss_tone() */ -static const tone_t ft847_ctcss_list[] = +static tone_t ft847_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, diff --git a/src/tones.c b/src/tones.c index bb3ec009..d5c2ff8b 100644 --- a/src/tones.c +++ b/src/tones.c @@ -44,7 +44,7 @@ /** * 52 CTCSS sub-audible tones */ -const tone_t full_ctcss_list[] = { FULL_CTCSS_LIST }; +tone_t full_ctcss_list[] = { FULL_CTCSS_LIST }; /** * 50 CTCSS sub-audible tones, from 67.0Hz to 254.1Hz @@ -53,17 +53,17 @@ const tone_t full_ctcss_list[] = { FULL_CTCSS_LIST }; * backends depend on it. If you need to, create a copy for your * own caps. --SF */ -const tone_t common_ctcss_list[] = { COMMON_CTCSS_LIST }; +tone_t common_ctcss_list[] = { COMMON_CTCSS_LIST }; /** * 104 DCS codes */ -const tone_t common_dcs_list[] = { COMMON_DCS_LIST }; +tone_t common_dcs_list[] = { COMMON_DCS_LIST }; /** * 106 DCS codes */ -const tone_t full_dcs_list[] = { FULL_DCS_LIST }; +tone_t full_dcs_list[] = { FULL_DCS_LIST }; #endif diff --git a/src/tones.h b/src/tones.h index 85255433..204b66f7 100644 --- a/src/tones.h +++ b/src/tones.h @@ -37,10 +37,12 @@ 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \ 0, +#if 0 static const tone_t static_full_ctcss_list[] = { FULL_CTCSS_LIST }; +#endif #define FULL_CTCSS_LIST_COUNT 52 @@ -60,10 +62,12 @@ static const tone_t static_full_ctcss_list[] = 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \ 0, +#if 0 static const tone_t static_common_ctcss_list[] = { COMMON_CTCSS_LIST }; +#endif #define COMMON_CTCSS_LIST_COUNT 50 @@ -83,10 +87,12 @@ static const tone_t static_common_ctcss_list[] = 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \ 0, +#if 0 static const tone_t static_common_dcs_list[] = { COMMON_DCS_LIST }; +#endif #define COMMON_DCS_LIST_COUNT 104 @@ -105,10 +111,12 @@ static const tone_t static_common_dcs_list[] = 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \ 0, +#if 0 static const tone_t static_full_dcs_list[] = { FULL_DCS_LIST }; +#endif #define FULL_DCS_LIST_COUNT 106 @@ -124,10 +132,10 @@ static const tone_t static_full_dcs_list[] = #else -extern const HAMLIB_EXPORT_VAR(tone_t) full_ctcss_list[]; -extern const HAMLIB_EXPORT_VAR(tone_t) common_ctcss_list[]; -extern const HAMLIB_EXPORT_VAR(tone_t) full_dcs_list[]; -extern const HAMLIB_EXPORT_VAR(tone_t) common_dcs_list[]; +extern HAMLIB_EXPORT_VAR(tone_t) full_ctcss_list[]; +extern HAMLIB_EXPORT_VAR(tone_t) common_ctcss_list[]; +extern HAMLIB_EXPORT_VAR(tone_t) full_dcs_list[]; +extern HAMLIB_EXPORT_VAR(tone_t) common_dcs_list[]; #endif diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 2e6813b4..01892211 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4350,6 +4350,23 @@ declare_proto_rig(dump_state) fprintf(fout, "has_power2mW=%d\n", rig->caps->power2mW != NULL); fprintf(fout, "has_mW2power=%d\n", rig->caps->mW2power != NULL); fprintf(fout, "timeout=%d\n", rig->caps->timeout); + fprintf(fout, "ctcss_list="); + for (i = 0; i < CTCSS_LIST_SIZE && rig->caps->ctcss_list[i] != 0; i++) + { + fprintf(fout, + " %u.%1u", + rig->caps->ctcss_list[i] / 10, rig->caps->ctcss_list[i] % 10); + } + fprintf(fout, "\n"); + fprintf(fout, "dcs_list="); + for (i = 0; i < DCS_LIST_SIZE && rig->caps->dcs_list[i] != 0; i++) + { + fprintf(fout, + " %u", + rig->caps->dcs_list[i]); + } + fprintf(fout, "\n"); + fprintf(fout, "done\n"); } commit 4e60ebf1d6928bd8c7d3b485c6f4d045a75e7af7 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 29 09:00:59 2021 -0500 Fix rig_get_vfo_info in rig.swg https://github.com/Hamlib/Hamlib/commit/6c13951da8928e8201cc59f9db3ff1dbfe71db9b#commitcomment-50159464 diff --git a/bindings/rig.swg b/bindings/rig.swg index 0d1c05fd..e34168e6 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -449,7 +449,7 @@ typedef channel_t * const_channel_t_p; METHOD1VGET(get_xit, shortfreq_t) METHOD1VGET(get_ts, shortfreq_t) extern void get_ant(ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value_t * OUTPUT, ant_t ant, vfo_t vfo = RIG_VFO_CURR); - extern void get_vfo_info (split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo = RIG_VFO_CURR); + extern void get_vfo_info (int *satmode, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo = RIG_VFO_CURR); METHOD1VGET(get_mem, int) METHOD1GET(get_powerstat, powerstat_t) METHOD1GET(get_trn, int) @@ -605,9 +605,9 @@ void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value { self->error_status = rig_get_ant(self->rig, vfo, ant, option, ant_curr, ant_tx, ant_rx); } -void Rig_get_vfo_info (Rig *self, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo) +void Rig_get_vfo_info (Rig *self, int *satmode, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo) { - self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split); + self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split, satmode); } ----------------------------------------------------------------------- Summary of changes: bindings/rig.swg | 6 ++--- include/hamlib/rig.h | 6 +++-- rigs/dummy/netrigctl.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++--- rigs/kenwood/kenwood.c | 6 ++--- rigs/kenwood/kenwood.h | 6 ++--- rigs/kenwood/pihpsdr.c | 4 +-- rigs/kenwood/thf6a.c | 2 +- rigs/kenwood/thf7.c | 2 +- rigs/kenwood/tmd710.c | 11 +++++--- rigs/kenwood/ts2000.c | 4 +-- rigs/pcr/pcr.c | 4 +-- rigs/pcr/pcr.h | 4 +-- rigs/uniden/bc898.c | 2 +- rigs/uniden/uniden.c | 4 +-- rigs/uniden/uniden.h | 6 ++--- rigs/yaesu/ft100.c | 4 +-- rigs/yaesu/ft1000mp.c | 2 +- rigs/yaesu/ft736.c | 2 +- rigs/yaesu/ft767gx.c | 2 +- rigs/yaesu/ft847.c | 2 +- src/tones.c | 8 +++--- src/tones.h | 16 ++++++------ tests/rigctl_parse.c | 20 +++++++++++++++ 23 files changed, 140 insertions(+), 53 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |