Wykres commitów

51 Commity (82f47afed0ba6ea88d2c978578d751bff52d7a91)

Autor SHA1 Wiadomość Data
Michael Black d0f114b178 Add macro_name to caps structures for rig, rot, and amp devices 2020-03-05 23:48:14 -06:00
Michael Black ff8ddf018c astyle all C files 2020-02-23 11:26:09 -06:00
Michael Black 16f85be147
More mingw32 fixes 2020-01-15 17:05:31 -06:00
Michael Black c437bbc4d1 Fix mingw32 build 2020-01-15 16:10:35 -06:00
Michael Black 0d304ecf53 Fix mingw32 build 2020-01-15 16:06:56 -06:00
Michael Black e50f552e0f Fix mingw32 build 2020-01-15 15:57:01 -06:00
Michael Black 4be4b7033b
Clean up HAVE_LIBREADLINE mods 2020-01-15 07:04:40 -06:00
Michael Black 297bf9aa6b
Fix cppcheck warnings 2020-01-14 23:36:01 -06:00
Michael Black 4cc80fa603
Fix up some cppcheck warnings in rotctl_parse.c 2020-01-14 14:18:47 -06:00
Michael Black 4e5e533248
Fix cppcheck warnings 2019-12-24 15:48:36 -06:00
Michael Black 57952c5927
Fix cppcheck warnings in rotctl_parse.c 2019-12-24 15:12:05 -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 c9ace18daa
Fix hash sort comparison for models 2019-12-06 12:13:38 -06:00
Michael Black 60cfecd5b4
Hopefully suppress arm compilation warning 2019-12-03 16:15:33 -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
Michael Black 46a9fff6ad
Fix rotctl C command 2019-11-23 23:11:27 -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
Michael Black ab7527d95a Fix compile warning in rotctl_parse.c 2019-05-22 11:15:30 -05:00
Nate Bargmann a915f1e69e Quell clang6 warning of format string not a literal
The warning was:

  CC       rotctl_parse.o
../../hamlib/tests/rotctl_parse.c:1012:50: warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
            snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
                                                 ^~~~~~~~~~~~~~~~~~~
../../hamlib/tests/rotctl_parse.c:1012:50: note: treat the string as an argument to avoid this
            snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
                                                 ^
                                                 "%s",
1 warning generated.
2018-11-05 20:07:34 -06:00
Nate Bargmann 478a7a25c1 Merge branch 'new_man_pages' 2018-07-29 22:11:31 -05:00
Nate Bargmann f9b2f27373 Correct the -l option output header text 2018-07-29 21:38:54 -05:00
Michael Black W9MDB cd1fdfe6ce Allow rotctld to continue operationg aftr tcp or serial rig disappears 2018-05-09 07:31:42 -05:00
Michael Black W9MDB 9ba1f1a972 Fix compile warning on strings in tests 2018-04-22 18:38:16 -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
Michael Black 35fda10dfd Fixed buffer overflow in rigctl_parse and rotctl_parse 2016-11-01 16:02:15 -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
Michael Black 95a99fa37d Quell clang warnings in tests directory
Remove unnecessary parentheses in memcsv.c.

Fix cfp->u.c.combostr as old check was always true since it's statically
allocated.

RRR
Mike W9MDB
2016-02-09 11:12:28 -06:00
Bill Somerville e939279c4c Add read commands from stdin and pause command features to rotctl.
The capability to read commands from  standard input and the new pause
command allow regression tests to be written for rotctl as well as for
rigctl.
2014-05-02 19:44:29 +01:00
Nate Bargmann 245ab86441 Quell compiler warnings on Cygwin
Quell mostly harmless warnings from the older GCC installed in Cygwin.
Produces a quiet compilation.
2013-05-09 22:06:39 -05: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 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
Kamal Mostafa, KA6MAL cf276991f2 Fix segfault on improper -C syntax
Avoid null pointer segfault when -C param is specified with no '=' e.g.
"rigctl -C foo".

Thanks to Charles Suprin <hamaa1vs@gmail.com> for the report.



git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3058 7ae35d74-ebe9-4afe-98af-79ac388436b8
2011-02-21 19:32:00 +00: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 a7c37f8a69 necessary stdout flushing in interactive mode with prompt, under win/wine
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2909 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-05-05 20:11: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
Stéphane Fillod, F8CFE d8d60cd2e7 error checking when parsing
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2867 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-04-05 10:15:36 +00:00
Nate Bargmann, N0NB b261cea22e Reserve '#' for comments in Extended Response Protocol
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2842 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-03-01 22:37:06 +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 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 be4c171328 fix send_cmd bug, patch by Rob Frohne, KL7NA
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2544 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-01-01 18:19:26 +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 257cdfc32c * dump_state for internal use by netrotctl backend
* factorize the "END" marker for rotctld, and proprer flushing/error handling


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2394 7ae35d74-ebe9-4afe-98af-79ac388436b8
2008-09-21 19:27:54 +00:00