Wykres commitów

59 Commity (dad55ef1481cb82a93bac73d7d5793b7bfe4cdf5)

Autor SHA1 Wiadomość Data
Mike Black W9MDB dad55ef148 astyle files getting ready for WSJT-x-2.7.0rc1 2023-05-08 07:37:13 -05:00
Mike Black W9MDB 1e9ecb079a Fix RT21 2nd device for elevation
https://github.com/Hamlib/Hamlib/issues/1257
https://github.com/Hamlib/Hamlib/issues/1258
2023-04-30 17:04:34 -05:00
Mike Black W9MDB 57b7cd1860 Fix spelling error in rotctl.c help and add offset settings to rotctl.1 2023-03-16 16:41:35 -05:00
Daniele Forsi IU5HKX 3f90086991 [tests] Fix includes 2023-02-16 19:08:24 +01:00
Mike Black W9MDB 853806b978 Fix rotctld dumpcaps to expose client rot_type instead of Other
https://github.com/Hamlib/Hamlib/issues/1035
2022-11-10 17:53:21 -06:00
Daniele Forsi IU5HKX 7a132e2703 Remove unused includes
Removes includes of stdio.h stdlib.h string.h unistd.h
2022-07-24 17:08:57 +02:00
Daniele Forsi IU5HKX 4dfe46edbb Remove unused includes related to times and dates
Removes includes of time.h sys/time.h hamlibdatetime.h
2022-07-23 18:12:10 +02:00
Mike Black W9MDB 68e121d82c Change all to remove HAVE_CONFIG dependency and include <hamlib/config.h> by default
This is necessary to keep alignment between the client view of rig->state and the shared libarary view
Including PTHREAD functions in rig->state necessitated this as HAVE_PTHREAD only defined during hamlib compilation.
Clients including hamlib/rig.h did not pick up all the HAVE* config variable that control what gets included
https://github.com/Hamlib/Hamlib/issues/947
2022-02-04 07:41:36 -06:00
Mike Black W9MDB c2cb94e412 Change sprintf to snprint in tests
https://github.com/Hamlib/Hamlib/issues/857
2022-01-11 00:00:44 -06:00
Mike Black W9MDB fa10d10e38 Add -R --rot_file2 option to rotctl and rotctld for 2nd rotator controller for RT21
https://github.com/Hamlib/Hamlib/issues/747
2021-07-23 23:28:02 -05:00
Michael Black W9MDB 6eee309b56 Improve rig_get_version and hamlib_version2 information to include commit information
https://github.com/Hamlib/Hamlib/issues/617
2021-03-19 22:56:18 -05:00
Michael Black W9MDB 1fcb9404b9 More changes to support macro renaming 2021-03-06 14:59:57 -06:00
Bill Somerville f38ee5c6f1
Ensure old hamlibdatetime.h headers in the source dir are ignored 2020-10-17 02:31:17 +01:00
Michael Black W9MDB f454cff0b7 Add check for -s switch on all utils to ensure integer is entered 2020-07-01 08:52:44 -05:00
Michael Black W9MDB 677ccac4bc astyle files 2020-05-27 12:23:08 -05:00
Michael Black W9MDB fb68d9f561 Add better version info to utilities 2020-05-23 10:58:25 -05:00
Michael Black ee87d5e6df Fix buffer overrun in all utilities
Change MAXCONFLEN to 1024 bytes for some future proofing
2020-04-01 14:51:50 -05:00
Michael Black 5646eb3fe4
Move hist_dir_stat 2020-01-15 15:58:04 -06:00
Michael Black bd2149bd8a
Fix cppcheck warning in rotctl.c 2019-12-23 23:14:55 -06:00
Michael Black fb73e5abd7
Fix some cppcheck warnings
Fix declarations after statements
Remove some !rig checks...we either don't need them or need them everywhere with a new error code
If you pass a NULL rig you get what you deserve :-)
2019-12-09 17:12:13 -06:00
Michael Black a7335595de
Add az and el offset to rotctl & rotctld 2019-12-02 23:30:08 -06:00
Michael Black 6bf3b00c4f
astyle all files 2019-11-30 10:19:08 -06:00
Michael Black 2f4d62709e
Added a dummy snprintf to rig_debug to allow gcc to check format strings
This found tons of errors in rig_debug statements
So this patch cleans up all the files that were producing warnings or errors
This should fix a few segfaults when running with debug turned on
2019-11-30 10:04:31 -06:00
Bill Somerville 8028663ef9
Simplify unnecessary persistence of extended response state
The \chk_vfo  command to  rigctl_parse() accepts an  extended response
prefix but  does not act  upon it, instead it  is held over  until the
next command.  This seems unnecessary  as an extended  response prefix
can just as  easily be added to the following  command if required. By
removing this  carried over  state the processing  of commands  can be
greatly simplified as per this commit.
2019-08-29 14:27:22 +01:00
Bill Somerville d931bd4e18
Move unnecessary global and file static variables to the stack 2019-08-29 00:39:39 +01:00
Michael Black 3dce8b01d1
Make rigctld thread safe for vfo_mode and ext_resp and change other globals to thread_local for future reference 2019-07-31 16:03:46 -05:00
Nate Bargmann b0ebeaeda4 Quell gcc 8.2.0 defined but not used warning
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warning:

  CC       rigctl.o
../../hamlib/tests/rigctl.c:125:18: warning: ‘have_rl’ defined but not used [-Wunused-const-variable=]
 static const int have_rl = 0;
                  ^~~~~~~

and:

  CC       rotctl.o
../../hamlib/tests/rotctl.c:113:18: warning: ‘have_rl’ defined but not used [-Wunused-const-variable=]
 static const int have_rl = 0;
                  ^~~~~~~

Turns out I didn't have the readline-dev package installed.  As the have_rl
variable is wrapped in CPP macros, it indeed is not used when readline is not
available.
2018-10-25 18:26:25 -05:00
Michael Black W9MDB abca0653fd Fix compile warnings for tests 2018-04-22 18:38:16 -05:00
Michael Black W9MDB 6c369109e6 Add debug time stamps via -Z and --debug-time-stamps 2018-04-15 15:06:52 -05: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
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
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 275acd2a60 rotctl.c: Add options to save/read command history
As commands from a previous session may not be desired, make reading the
history file at rotctl start and writing to it at rotctl 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/.rotctl_history' by default.  An alternate
path may be specified by setting the ROTCTL_HIST_DIR environment
variable:

$ ROTCTL_HIST_DIR=~/.rotctl rotctl -iI

will temporarily set the history directory to /home/USER/.rotctl and
create .rotctl_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 e34a94ad66 rotctl_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 21:06:30 -06:00
Nate Bargmann e549fee11a rotctl_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 rotctl in interactive mode.  Passing rotator commands from the rotctl
command line and rotctld use the original input handling which has not
been modified.
2013-02-22 21:06:30 -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 c3bc66eafc Tidy up rotctl --list output
Implemented hash table to temporarily store and sort the rot models by ID
to print the --list by model numbers.  Hash is implemented using
uthash.h, see http://uthash.sourceforge.net/

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

Removed rotlist definition of RPC backend.
2012-02-13 15:28:03 -06:00
Nate Bargmann 1229a0a42a Assure NULL terminated strings in tests programs.
Various strncpy operations 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-07 20:36:50 -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
Stéphane Fillod, F8CFE ecda326342 - allow litteral command for \move
- added dump-caps option to rotctl


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2895 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-04-25 17:29:53 +00:00
Nate Bargmann, N0NB e6f311cdd0 Really set rotctl/rotctld to follow debug level set on command line.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2835 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-02-14 23:58:54 +00:00
Nate Bargmann, N0NB cba52fadf5 Remove default verbose setting of 2, call it when needed.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2834 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-02-14 23:41:19 +00:00
Nate Bargmann, N0NB 121f4a996b Implement and document Extended Response Protocol for rotctld
New test program, testrotctld.pl for rotctld
Implemented locator.c functions in rotctl and rotctld



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2831 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-02-14 22:18:00 +00:00
Stéphane Fillod, F8CFE bef812b7e4 report hamlib version upon startup
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2637 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-02-17 08:03:22 +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 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 4cbfe38c1d initial rotctld release (same idea as rigctld)
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2382 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-09-12 22:55:10 +00:00
Nate Bargmann, N0NB 6fb48baf21 Many man page updates to provide needed information and (hopefully)
improve readability.  Also, tried to keep the man pages as consistent
as possible.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2189 7ae35d74-ebe9-4afe-98af-79ac388436b8
2007-02-24 20:24:34 +00:00