Commit Graph

70 Commits

Author SHA1 Message Date
Mike Black W9MDB
8fe190d622 Reduce error messages about RIG_VFO_OTHER which only applies to some rigs like Icom rigs with the 0x25 command
Add a flush_flag to read_string so that the new serial_flush will not produce a timeout value when flushing
https://github.com/Hamlib/Hamlib/issues/835
2021-11-01 23:43:45 -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
82126a4f09 Phase 1 of changing sprintflst functions to use buffer length
https://github.com/Hamlib/Hamlib/issues/580
2021-03-03 08:03:18 -06:00
Mikael Nousiainen
457211a7e3 Add get_status command for rotator status flags. Add missing rotator caps in dumpcaps output. 2020-12-03 21:40:34 +02:00
Mikael Nousiainen
bb315270bf Merge branch 'master' into rotator-speed-control-and-status 2020-12-02 21:46:23 +02:00
Mikael Nousiainen
a48f149955 Implement funcs, levels and parms + the ext variants for rotators. Add option to not change rotator speed when using the move command. Add rotator status flags. Work in progress. 2020-11-24 21:51:10 +02:00
Michael Black W9MDB
a475ebf017 Add debug to rotctlparse.c 2020-11-23 08:46:15 -06:00
Nonoo
2deeca86dc Fix decimal separators which sscanf can't handle
This is a workaround for some apps like Gpredict, which use comma as a decimal
separator (depending on locale settings), but sscanf in Hamlib can only handle
dots.
2020-11-14 08:56:37 +01:00
Michael Black W9MDB
fade1681fa Fix cppcheck errors and warnings 2020-09-02 16:56:11 -05:00
Michael Black W9MDB
e459d4edc2 astyle files 2020-09-01 09:06:46 -05:00
Daniele Forsi
d7b332c3f7 Fix spelling errors
Fixed using the following command:
codespell --write-changes --summary --skip=*.m4 --ignore-words-list="develope,get's,quitt,setts,som,ue,vektor"
codespell --write-changes --summary --skip=aclocal.m4,lib --ignore-words-list="develope,get's,quitt,setts,som,ue,vektor"

Codespell home page: https://github.com/codespell-project/codespell
2020-07-24 09:02:48 +02:00
Michael Black W9MDB
6f8100ffc0 Fix cppcheck warnings 2020-07-08 11:48:48 -05:00
Michael Black W9MDB
1be5c71e76 More conversions to rig_flush
https://github.com/Hamlib/Hamlib/issues/307
2020-06-23 08:39:11 -05:00
Michael Black W9MDB
f71c12da94 astyle files 2020-06-09 22:37:03 -05:00
Michael Black W9MDB
17b404a6c7 Add seconds to dmmm2dec
Change meade.c to support dmmm2dec seconds
https://github.com/Hamlib/Hamlib/issues/268
2020-06-03 22:33:56 -05:00
Michael Black
bda5feb1bd More cppcheck changes 2020-03-23 10:13:02 -05:00
Michael Black
98e1316f11 Fix -L printout for rotctl south_zero 2020-03-10 17:00:44 -05:00
Michael Black
f46067977a Fix rotctl set_conf 2020-03-10 08:43:42 -05:00
Michael Black
e704f7783c Fix rotctl state printout to show az_offset and el_offset 2020-03-10 07:07:21 -05:00
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