Wykres commitów

91 Commity (6bac8422f39002855eab5c59c3cd456b68187838)

Autor SHA1 Wiadomość Data
Michael Black W9MDB 6c369109e6 Add debug time stamps via -Z and --debug-time-stamps 2018-04-15 15:06:52 -05:00
Bill Somerville 489564a1af Make rig_open() call in rigctld lazy and add graceful termination
Because some  rigs lock their  front panel when  opened for CAT  it is
helpful  to   call  rig_close()  in   rigctld  when  no   clients  are
connected. This change does that.

A  CTRL+C handler  is also  added to  allow rig_close()  to be  called
during exit.
2018-03-12 19:47:45 +00:00
Nate Bargmann b692fb22ef Formatted tests/ to final coding guidelines 2017-10-06 18:58:42 -05:00
Nate Bargmann d489b8bcb5 Apply formatting to 'tests/' directory
Format per style guide.
2017-08-10 05:46:12 -05:00
Michael Black W9MDB cab7eb1647 Fix FT-891/991 behavior with WSJT-X
Separate FT-891 features
Fix rigctl and rigctld to not abort on function not available
Change Yaesu detection of FA length to automatic method instead of rig specific
2017-06-27 16:48:44 +01:00
Jeroen Vreeken 1bf736d650 Add support for GPIO PTT. 2016-05-28 16:00:03 +02:00
Bill Somerville fcb93b98fa Switch to POSIXLY_CORRECT mode for getopt_long()
This  makes the  first non-option  argument end  getopt_long() parsing
stop rather  than shuffling non-option  arguments to the end.  This is
necessary  so that  rig/rotator command  language arguments  can start
with a  '-' character and  also it enables  the '-' pseudo  command to
switch to reading commands from stdin work correctly.

The change  also make checking for  the '-', switch to  stdin, command
stricter in that it must be where a command is expected and it must be
a word containing exactly a single '-' character.

Overall this allows the following styles of use:

$ rigctl R -

$ rigctl - <<EOF
>R -
>EOF

R -

$ echo "R -" | rigctl -

R -
$ rigctl -m 1 M CW -1

$ rigctl F 434000000 - <<EOF
>M FM 15000
>f m
>EOF

M FM 15000
f 145000000

m FM
15000

$

as well  as the command  line interpreter operation where  no commands
nor '-' are provided:

$ rigctl

Rig command: R -

Rig command: r
Rptr Shift: -

Rig command: f
Frequency: 145000000

Rig command: m
Mode: FM
Passband: 15000

Rig command: F 434000000

Rig command: f
Frequency: 434000000

Rig command: q

$
2016-04-19 21:52:02 -05:00
Bill Somerville aebe52a45e Add a new command line option '--no-restore-ai' ('-n') to rigctl
As Hamlib now restores the rig auto information state (AI) on exit
there is now a need to disable that functionality so that rigctl can
be used to set/reset AI mode on the rig explicitly.

A new  public API  function 'rig_no_restore_ai()'  is also  added that
allows any  client to  disable this auto  AI restore  functionality if
required. Most  clients should do nothing  as restoring AI state  is a
good thing.
2015-12-04 00:22:01 +00:00
Nate Bargmann fafbb772c5 rigctl.c/rotctl.c: fix closing brace placement
A closing brace was improperly placed before a pair of CPP #endif
directives rather than between them.  Caught by a cppcheck audit.
2014-03-07 05:55:54 -06:00
Nate Bargmann 9f342cfd23 rigctl.c: Add options to save/read command history
As commands from a previous session may not be desired, make reading the
history file at rigctl start and writing to it at rigctl close optional
by use of the -i/--read_history or -I/--save-history options.
Compilation is conditional on having Readline and Readline History
support detected at build system configuration time.

History is stored in '$HOME/.rigctl_history' by default.  An alternate
path may be specified by setting the RIGCTL_HIST_DIR environment
variable:

$ RIGCTL_HIST_DIR=~/.rigctl rigctl -iI

will temporarily set the history directory to /home/USER/.rigctl and
create .rigctl_history if it does not exist.  If the file cannot be read
or written a warning message will be given on stderr.
2013-02-22 21:06:30 -06:00
Nate Bargmann 978a269689 rigctl_parse.c: Implement history recall
Implement first cut at storing and recalling history.  At this point
history is retained for the current session only.

History is stored as complete command lines even if values are entered
at separate prompts.  Readline allows editing and even deleting recalled
history lines.
2013-02-22 17:26:32 -06:00
Nate Bargmann d54d737ba5 rigctl_parse.c: Implement readline interactive mode
Initial implementation of Readline input handling.  Only if 'configure'
finds Readline will it be enabled and when enabled it will only be used
by rigctl in interactive mode.  Passing rig commands from the rigctl
command line and rigctld use the original input handling which has not
been modified.
2013-02-22 17:26:32 -06:00
Nate Bargmann 7e9f628648 rigctld/rotctld: Remove -e|--end-marker option
Remove support for deprecated "End Marker" protocol in rigctld and
rotctld.
2013-02-05 14:40:41 -06:00
Nate Bargmann 417cb98d2e Tidy up rigctl --list output
Implemented hash table to temporarily store and sort the rig models by ID
to print the --list by model numbers.  Hash is implemented using
uthash.h, see http://uthash.sourceforge.net/

Suppressed rig backend register output by setting rig_debug_level to 0
for list output.

Removed riglist definition of RPC backend.
2012-02-13 15:28:42 -06:00
Andrew Errington 1a77ef9eb9 Initial support for CM108 GPIO contorl of PTT
Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2012-01-11 06:16:51 -06:00
Nate Bargmann b54932ec96 Assure NULL terminated strings in rigctl/rigctld
The -r, -p , and -d options could result in a port pathname that is
not a NULL terminated string as the allowed string length is the same
size as the buffer per the strncpy manual page.  This is corrected by
assuring that the allowed length is FILPATHLEN - 1.
2012-01-06 23:11:35 -06:00
Nate Bargmann 0882cd696d Update GPL/LGPL header in tests source files.
TNX to Lucian Laga, YO6PLB, for the notification.
2011-08-22 21:38:37 -05:00
Stéphane Fillod, F8CFE 8690fb0594 Implement exit status according to manual page:
1 if there was an invalid command line option or argument;
  2 if an error was returned by Hamlib.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3009 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-12-01 21:41:55 +00:00
Nate Bargmann, N0NB 1f6604b188 Complete addition of Extended Response Protocol to rigctld
Update and synchronize rig and rot ctl(d) man pages
Update testctld.pl for ERp.



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2837 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-02-18 00:18:54 +00:00
Nate Bargmann, N0NB 14841cf118 Removed -b|--block option in favor of using '+' prepended to a command
from the client to request Extended Response protocol.



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2827 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-02-08 23:37:07 +00:00
Nate Bargmann, N0NB 52a87d096c Added initial support for Block protocol in rigctld and documented same.
Rewrote testctld.pl for new block protocol and included it with 
source distribution.



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2813 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-01-24 23:24:20 +00:00
Stéphane Fillod, F8CFE 025c1f4dd1 flexible command termination for send_cmd
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2557 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-01-04 14:49:17 +00:00
Stéphane Fillod, F8CFE 6686489197 fix 'vfo_mode stuck to 0' bug found by Zhang Bo
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2496 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-12-10 08:37:35 +00:00
Stéphane Fillod, F8CFE f541b221fe new netrigctl/netrotctl protocol with return value
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2428 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-10-27 22:23:36 +00:00
Stéphane Fillod, F8CFE dbb8c50555 new command dump_conf from rigctl
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2364 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-05-23 14:26:09 +00:00
Nate Bargmann, N0NB 6ff8d83364 Added info about `ldconfig' to INSTALL.
Removed unneeded variable in rigctl_parse.c as the prompt variable
already served the role needed to send the END command.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2287 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-01-12 00:36:58 +00:00
Nate Bargmann, N0NB c649181f37 Implement and document rigctld protocol and provide a compatible test.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2283 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-01-10 03:42:35 +00:00
Stéphane Fillod, F8CFE 109af84b52 make dumpcaps also through rigctld
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2276 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-01-05 18:13:12 +00:00
Stéphane Fillod, F8CFE a0755abe0c code factorized in rigctl_parse.c
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2243 7ae35d74-ebe9-4afe-98af-79ac388436b8
2007-11-11 23:04:22 +00:00
Spaceman Spiff 7abb9a638d Added several letters to the interactive commands to implement more test functions.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2191 7ae35d74-ebe9-4afe-98af-79ac388436b8
2007-02-28 08:55:07 +00:00
Alexandru Csete OZ9AEC 20ec2ce78c Fixed type mismatches that caused compile warnings.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2131 7ae35d74-ebe9-4afe-98af-79ac388436b8
2006-10-07 19:24:56 +00:00
Nate Bargmann, N0NB e2110f298e 20060922:
Update:
		Applied July 30, 2006 patches from Kent Hill, AD7AI


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2114 7ae35d74-ebe9-4afe-98af-79ac388436b8
2006-09-22 14:31:19 +00:00
Nate Bargmann, N0NB c85dcd5105 20060718:
Update:
		Committing patches received from AD7AI for several Icom
		models including IC-746, IC-756, and IC-7800.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2111 7ae35d74-ebe9-4afe-98af-79ac388436b8
2006-07-18 22:51:43 +00:00
Stéphane Fillod, F8CFE 3e22a1156c line-up
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2023 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-04-20 13:29:43 +00:00
Stéphane Fillod, F8CFE f2477fbc2c added special \send_cmd(w), fixed ARG_IN_LINE parsing, started coding set_channel(WIP), some tab reformat and reshuffled test_table for better alignment
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2009 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-04-11 22:11:28 +00:00
Stéphane Fillod, F8CFE c9a4c4c735 tab reformat
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2007 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-04-10 22:32:54 +00:00
Stéphane Fillod, F8CFE ec94dde189 send_morse takes a whole line, including spaces
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1940 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-03-13 17:55:47 +00:00
Stéphane Fillod, F8CFE cccf1318ce second pass at getting rid of "ll" immediate literal format (64bit int)
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1904 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-01-25 00:22:14 +00:00
Stéphane Fillod, F8CFE 23369a0c25 * abstract 64bit int format type to cope with portability issues.
introduce PRIll (printf format) and SCNll (scanf) in misc.h.
  This needs to have config.h included beforehand.
* do likewise with freq_t type (double) in rig.h
  FREQFMT is deprecated.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1903 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-01-24 23:04:35 +00:00
Stéphane Fillod, F8CFE f805bab257 only print argument name if it is an input
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1859 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-10-02 10:33:21 +00:00
Stéphane Fillod, F8CFE bf3ee98315 powerstat & send_morse commands
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1750 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-06-06 21:59:54 +00:00
Stéphane Fillod, F8CFE 66360b4f14 Prefixed misc str* and parse_* calls with rig_ to export them in rig.h
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1738 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-05-17 21:09:45 +00:00
Stéphane Fillod, F8CFE 72ae118f85 rigctl -l reformating
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1678 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-02-08 20:25:36 +00:00
Stéphane Fillod, F8CFE 916a21ad52 moved some sprintf's out of library into dumpcap application.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1594 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-11-16 17:34:00 +00:00
Stéphane Fillod, F8CFE 91df9591f4 Prepare eventual move from freq_t as a "long long" to a "double" type.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1569 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-10-20 22:15:02 +00:00
Stéphane Fillod, F8CFE 788d8a49b8 typo
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1530 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-25 22:45:10 +00:00
Stéphane Fillod, F8CFE ce1e20cdd3 strange longlong portability(win32) fix
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1528 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-25 22:38:08 +00:00
Stéphane Fillod, F8CFE 343deb6f59 Support for pipelined tuning, including DCD on CD line.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1510 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-17 22:39:07 +00:00
Stéphane Fillod, F8CFE f8135d52df Implemented emulation of rig transceive mode using polling (based on SIGALRM),
moved all transceive and event related functions from rig.c to event.c.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1468 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-05-03 13:17:25 +00:00
Stéphane Fillod, F8CFE a07a4a336e Adopt new split_vfo handling. Basically, rename set_split/get_split
to set_split_vfo/get_split_vfo, and take an extra transmit vfo arg.
Ascending compatibility is retained at the API frontend level.
NOTE: only function name has changed. The backends do not implement
necessarily the new semantic (the extra tx vfo is just ignored).


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1425 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-04-06 18:40:36 +00:00