Wykres commitów

3608 Commity (master)

Autor SHA1 Wiadomość Data
Daniele Forsi IU5HKX 31fc48c145 [dummy] Add code to get_conf static_data 2025-09-03 20:32:09 +02:00
Nate Bargmann 4c520571df
Merge GitHub PR #1876 2025-08-31 20:11:12 -05:00
Daniele Forsi IU5HKX 39e155efe7 Fix include config.h
It should be included, with its path, before any hamlib include
and before any #ifdef that uses the symbols that it defines.
2025-08-30 11:18:51 +02:00
George Baltz N3GB df65ceee67 Start removing conditional pthreads use.
We can treat HAVE_PTHREAD and HAVE_PTHREAD_H as equivalent. But using
_PTHREAD_H is a real kludge.
2025-08-24 19:53:44 -04:00
aa5sh b953141b0f Bug Fixes for FTX1
Needed to adjust one of the timeouts.  Was causing issues on Windows.  Also made some changes due to IF command response size being 30, it was erroring out.  And last band mapping  was a little different on this rig for 2m, 70cm, 4m and Air Band.
2025-08-21 22:54:31 -05:00
Nate Bargmann e2ced58a14
Merge GitHub PR #1855 2025-08-19 13:23:37 -05:00
Nate Bargmann cde3a59432
Merge GitHub PR #1851 2025-08-19 12:59:51 -05:00
Daniele Forsi IU5HKX 7746d59438 Implement get_agc for flrig 2.0.06+
Test case:
run: flrig configured for the rig in use
run: tests/rigctl -m 4 get_level AGC
expected: should print an enum agc_level_e (an integer in range 0..10)

Part of issue #1376.
2025-08-19 09:08:28 +02:00
Daniele Forsi IU5HKX 250d661a2a
[rigs] Remove uneeded EXTRA_DIST files 2025-08-18 09:01:36 -05:00
Daniele Forsi IU5HKX b57f092236 Remove the executable bit from source files and documents 2025-08-17 22:38:25 +02:00
Daniele Forsi IU5HKX caf7346fc0 Fix typos 2025-08-16 11:52:55 +02:00
Nate Bargmann ee03370cdf
Merge GitHub PR #1846 2025-08-14 08:11:27 -05:00
Daniele Forsi IU5HKX ff5500b2d9 Avoid segfaulting when val.cs is NULL
This is the case for BANDSELECT and KEYERTYPE.
Use SNPRINTF() which deals with NULLs printing (null) and it is
used with the other datatypes..

Steps to reproduce:
tests/rigctl -m 1 set_parm KEYERTYPE '?'
tests/rigctl -m 1 set_parm BANDSELECT 1

Fixes:
 Thread 1 "rigctl" received signal SIGSEGV, Segmentation fault.
 __strcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:302
 warning: 302    ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: File o directory non esistente
 (gdb) bt
 #0  __strcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:302
 #1  0x00007f8ab4d0b7ab in dummy_set_parm (rig=0x55d19b6cab20, parm=2048, val=...) at dummy.c:1704
 #2  0x000055d175b8c03d in rigctl_set_parm (rig=0x55d19b6cab20, fout=0x7f8ab4bf25c0 <_IO_2_1_stdout_>, fin=<optimized out>, interactive=<optimized out>, prompt=<optimized out>, vfo_opt=<optimized out>, send_cmd_term=13 '\r', ext_resp=0,
     resp_sep=10 '\n', cmd=0x55d175ba9000 <test_list+1440>, vfo=536870912, arg1=0x7ffd730281e0 "KEYERTYPE", arg2=0x7ffd730283e0 "'?'", arg3=0x55d175b9fce8 "") at rigctl_parse.c:3828
 #3  0x000055d175b93756 in rigctl_parse (my_rig=<optimized out>, fin=<optimized out>, fout=<optimized out>, argv=argv@entry=0x7ffd7302a3a8, argc=argc@entry=3, sync_cb=sync_cb@entry=0x0, interactive=<optimized out>, prompt=<optimized out>,
     vfo_opt=<optimized out>, send_cmd_term=<optimized out>, ext_resp_ptr=<optimized out>, resp_sep_ptr=<optimized out>, use_password=<optimized out>) at rigctl_parse.c:1847
 #4  0x000055d175b7dadc in main (argc=<optimized out>, argv=0x7ffd7302a3a8) at rigctl.c:801
2025-08-13 16:58:26 +02:00
George Baltz N3GB 74558224a9 More cppcheck style hints 2025-08-13 09:30:59 -04:00
George Baltz N3GB 2e5696b7e3 Fix an analyzer complaint 2025-08-13 09:30:59 -04:00
Nate Bargmann 84fbe1df4a
Merge GitHub PR #1842 2025-08-12 07:50:53 -05:00
Daniele Forsi IU5HKX 9e6ff6edcc Fix segfault when executing the dump_caps command
Need to convert the level number 0..63 to the level bit mask.
Steps to reproduce
tests/rigctld -m 1 &
tests/rigctl -m 2 dump_caps

Fixes:
 Thread 1 "rigctl" received signal SIGSEGV, Segmentation fault.
 [..]
 (gdb) bt
 #0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-sse2.S:174
 #1  0x00007f532c46e300 in __printf_buffer (buf=buf@entry=0x7ffc320ad970, format=0x7f532c8aba22 "%s(%s) ", ap=0x7ffc320ada30, mode_flags=0) at ./stdio-common/vfprintf-process-arg.c:435
 #2  0x00007f532c491daf in __vsnprintf_internal (string=<optimized out>, maxlen=<optimized out>, format=<optimized out>, args=args@entry=0x7ffc320ada30, mode_flags=mode_flags@entry=0) at ./libio/vsnprintf.c:96
 #3  0x00007f532c469642 in __GI___snprintf (
     s=s@entry=0x7ffc320aec94 "BANDSELECT(00000..0.000000/0.000000) NR(0.000000..0.000000/0.000000) PBT_IN(0.000000..0.000000/0.000000) PBT_OUT(0.000000..0.000000/0.000000) CWPITCH(0..0/10) RFPOWER(0.050000..1.000000/0.001957) MICG"...,
     maxlen=maxlen@entry=3948, format=format@entry=0x7f532c8aba22 "%s(%s) ") at ./stdio-common/snprintf.c:31
 #4  0x00007f532c6dc14a in rig_sprintf_parm_gran (
     str=str@entry=0x7ffc320aec00 "ANN(0..0/0) APO(0..0/0) BACKLIGHT(0..0/0) BEEP(0..1316880384/1315832322) TIME(0..0/0) BAT(0..0/0) KEYLIGHT(0..0/0) SCREENSAVER(0..4/0) AFIF(0..0/0) BANDSELECT(00000..0.000000/0.000000) NR(0.000000..0."...,
     nlen=nlen@entry=4096, parm=9223372036854775807, gran=gran@entry=0x55f1f3cac338) at sprintflst.c:646
 #5  0x000055f1eb6cd487 in dumpstate (rig=rig@entry=0x55f1f3ca5b20, fout=fout@entry=0x7f532c5f25c0 <_IO_2_1_stdout_>) at dumpstate.c:408
 #6  0x000055f1eb6b4b81 in rigctl_dump_caps (rig=0x55f1f3ca5b20, fout=0x7f532c5f25c0 <_IO_2_1_stdout_>, fin=<optimized out>, interactive=<optimized out>, prompt=<optimized out>, vfo_opt=<optimized out>, send_cmd_term=13 '\r', ext_resp=0,
     resp_sep=10 '\n', cmd=0x55f1eb6dc0e0 <test_list+5760>, vfo=536870912, arg1=0x0, arg2=0x55f1eb6d1ce8 "", arg3=0x55f1eb6d1ce8 "") at rigctl_parse.c:4622
 #7  0x000055f1eb6c65f6 in rigctl_parse (my_rig=<optimized out>, fin=<optimized out>, fout=<optimized out>, argv=argv@entry=0x7ffc320b2138, argc=argc@entry=3, sync_cb=sync_cb@entry=0x0, interactive=<optimized out>, prompt=<optimized out>,
     vfo_opt=<optimized out>, send_cmd_term=<optimized out>, ext_resp_ptr=<optimized out>, resp_sep_ptr=<optimized out>, use_password=<optimized out>) at rigctl_parse.c:1847
 #8  0x000055f1eb6b0adc in main (argc=<optimized out>, argv=0x7ffc320b2138) at rigctl.c:801
2025-08-12 14:07:23 +02:00
Nate Bargmann c51357388c
Merge GitHub PR #1841 2025-08-12 07:04:50 -05:00
Daniele Forsi IU5HKX 65439c6719 Fix typo 2025-08-11 15:09:37 +02:00
Daniele Forsi IU5HKX 5e336b90c1 Improve Doxygen comments 2025-08-10 21:39:09 +02:00
Nate Bargmann c1aaeba5ac
Merge GitHub PR #1837 2025-08-09 18:43:57 -05:00
Daniele Forsi IU5HKX 221cc512bc Fix setting antenna number 3 for Yaesu FTDX3000
The argument ant_t ant is a bit mask, not a scalar.
Also use the defines instead of magic numbers.
2025-08-09 22:34:12 +02:00
Daniele Forsi IU5HKX e2214fd2f1 Change .ptt_type to RIG_PTT_RIG for RIG_MODEL_DUMMY
With the old value of RIG_PTT_NONE, dummy_get_ptt() and dummy_set_ptt()
were never called because rig_get_ptt() and rig_set_ptt() do check
.ptt_type and return -RIG_ENAVAIL in that case.

Do not change .ptt_type for RIG_MODEL_DUMMY_NOVFO so that both cases
can be tested if needed.
2025-08-09 15:57:45 +02:00
Daniele Forsi IU5HKX 3bc1cc8744 Implement remaining event callbacks
Implements:
rig_set_dcd_callback(), rig_set_freq_callback(), rig_set_mode_callback(),
rig_pltune_callback(), rig_set_ptt_callback(), rig_set_spectrum_callback(),
rig_set_vfo_callback()
2025-08-09 10:33:51 +02:00
Daniele Forsi IU5HKX 8324c85487 Implement the Python callback for freq_event
Fixes #481.
2025-08-09 10:33:17 +02:00
Daniele Forsi IU5HKX 2462ab0a13 Improve Doxygen comments
Adds missing cross-references. Fix tagging of comment blocks in "aor"
even if the rigs aren't included in the generated documentation.
2025-08-08 10:38:55 +02:00
George Baltz N3GB 70d50d0efb Fix one byte buffer overrun
All the pictures in manuals show message as 4 bytes, but they don't
include the major command (0x26).

Found by `gcc -fanalyzer`
2025-08-06 05:13:25 -04:00
George Baltz N3GB 1e5adb9fde Fix errors in error cases
Leak FDs in error exits, seg faults if RIG missing.
Found by `gcc -fanalyzer`
2025-08-06 04:56:02 -04:00
George Baltz N3GB c26113c5cc Fix more cppcheck messages
Suppress non-errors in rx331.c and rx340.c
Mark runflag(s) as volatile
2025-08-04 18:43:39 -04:00
George Baltz N3GB 8ce51d13aa Update Kenwood max CW message size. 2025-08-04 09:59:23 -04:00
Nate Bargmann c881bc7132
Merge GitHub PR #1827 2025-08-04 07:49:28 -05:00
jeremybox 8ccc197b7c ftx1: implement tuning step functionality and cleanup
- Add ftx1_get_ts() and ftx1_set_ts() functions using EX0306 commands
- Support mode-specific tuning step values:
  * SSB/CW & RTTY/PSK: 5Hz, 10Hz, 20Hz
  * FM: 5kHz, 6.25kHz, 10kHz, 12.5kHz, 20kHz, 25kHz, Auto
- Remove unused functions: ftx1_handle_cat_error, ftx1_get_split, ftx1_set_split
- Remove unused variable in ftx1_set_freq
- Update header file to remove unused function declarations
- Fix format specifiers (%d -> %ld) for shortfreq_t type

Tested with real FTX-1 hardware using rigctl commands.
Tuning step functionality verified in LSB mode with 20Hz step.
2025-08-03 20:52:29 -04:00
jeremybox 182597ebc4 Clean up unused functions in FTX-1 driver
- Remove unused ftx1_handle_cat_error function
- Remove unused ftx1_get_split and ftx1_set_split functions
- Remove unused variable 'err' in ftx1_set_freq
- Remove corresponding function declarations from ftx1.h
- Eliminates all compiler warnings for clean build
2025-08-03 18:20:06 -04:00
Daniele Forsi IU5HKX 8d8d0328bf Fix typos 2025-08-03 10:49:23 +02:00
jeremybox bb070edfa3 Enhanced FTX-1 support with comprehensive improvements 2025-08-02 22:02:05 -04:00
Nate Bargmann 989623ec51
Merge GitHub PR #1824 2025-08-01 18:31:38 -05:00
Nate Bargmann b4eb1bdb12
Quell warning from clang
This warning was seen on MacOS and on Debian 12 and 13 using clang:

CC       kenwood.lo
kenwood.c:2293:9: warning: absolute value function 'abs' given an argument of type 'shortfreq_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
 2293 |     if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); }
      |         ^
kenwood.c:2293:9: note: use function 'labs' instead
 2293 |     if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); }
      |         ^~~
      |         labs
1 warning generated.

Closes issue #1806 on GitHub
2025-08-01 18:25:16 -05:00
Nate Bargmann a9ecd50329
Sanitize radio model names and manufacturers
Reference GitHub issue #1013.
2025-08-01 07:55:41 -05:00
Daniele Forsi IU5HKX 6af3b3a94e Remove DECLARE_INITRIG_BACKEND()
This code is uneeded.
2025-07-30 23:29:12 +02:00
Daniele Forsi IU5HKX 5f78c54bae Remove DECLARE_INITRIG_BACKEND()
Breaks rig_probe() for rigs probed later (eg. Kenwood).
2025-07-30 23:29:12 +02:00
George Baltz N3GB 1c36377480 Still more cppcheck tweaks 2025-07-29 13:10:28 -04:00
George Baltz N3GB 72bc62366d A few more cppcheck messages silenced 2025-07-28 19:31:20 -04:00
Nate Bargmann 66acf19efe
Merge GitHub PR #1818 2025-07-27 18:01:00 -05:00
George Baltz N3GB 20eeb96787 Deprecate rig_get_conf()
Define macro to set attribute, if compiler is capable
Add macro to rig_get_conf(), Rig::getConf() declarations
Fix internal uses of rig_get_conf()
2025-07-27 11:31:18 -04:00
George Baltz N3GB 6c372f981f Distinguish wanted from unwanted fall through instances
Compile with -Wimplicit-fallthrough; analyze the results.
Define macro to mark valid fall through constructs. Mark all of the good
 ones, and fix the bad.

Not available with all compilers - for those without the feature this commit
 does nothing.
2025-07-27 10:03:38 -04:00
Daniele Forsi IU5HKX bc25855f48 Check split argument in dummy_get_split_mode() and fix the test 2025-07-26 19:59:36 +02:00
Daniele Forsi IU5HKX df6ddedf63 Use a define instead of a magic number 2025-07-25 23:52:02 +02:00
Daniele Forsi IU5HKX f0efc558f6 Make Dummy Rig handle also RIG_ANT_5 2025-07-25 23:47:35 +02:00
Nate Bargmann 79f8b1cde8
Merge HitHub PR #1811 2025-07-22 22:11:06 -05:00
Daniele Forsi IU5HKX 0267068220 Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00