Wykres commitów

12397 Commity (ad8707c74cea2bea661ffd1a187db36dc269e06c)

Autor SHA1 Wiadomość Data
Daniele Forsi IU5HKX 2890da9d79 Split the tests
It makes it easier in future to conditionally run some tests(eg.
to not test PTT for receiver-only rigs), or to run tests in
isolation (after renaming them).
It makes it easier to look at failing tests because pytest prints
the code of the failing test up to the failure including any
function that called the failed test (in this case would print
everything from def test_with_open() up to the line with the
failed assert.
2025-08-09 15:57:45 +02:00
Daniele Forsi IU5HKX 8e4bcbcede Add another cross-reference in a Doxygen comment 2025-08-09 15:57:40 +02:00
Daniele Forsi IU5HKX 9e1c7b5ec1 Allocate zereod memory for struct python_callbacks
Otherwise Py_XDECREF() would randomly segfault trying to use
uninitialized memory that by chance is not zeroed.
2025-08-09 10:33:54 +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
Nate Bargmann 93a24356e5
Merge GitHub PR #1831 2025-08-07 07:26:47 -05:00
Daniele Forsi IU5HKX 891070941f Fix compiler warnings
Fixes:
simic905.c:108:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
simic910.c:112:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
2025-08-07 14:14:58 +02:00
Daniele Forsi IU5HKX 5b1517778e Replace "goto again" with "continue" (third case)
When the software on the other side of the pty closes the device,
the simulator would close and reopen its side  but it is unneeded
because it can continue to call read() without doing anything special.
2025-08-07 11:38:12 +02:00
Daniele Forsi IU5HKX 8887294cd8 Replace "goto again" with "continue" (second case)
Does the same thing with more structured control flow.
It also silences compiler warnings.
2025-08-07 11:22:44 +02:00
Daniele Forsi IU5HKX 5b87b38704 Replace "goto again" with "continue" (first case)
Does the same thing with more structured control flow.
It also silences compiler warnings.
2025-08-07 11:22:14 +02:00
Daniele Forsi IU5HKX 4251c50b7f Fix reading line when the client (eg. rigctl) closes
Fixes an infinite stream of debug output because it erroneously
appeared to have read 1 byte instead of 0:
n=1
00
Not 8 bytes?  bytes=1
Unknown cmd=00

Tested with:
tests/rigctl -m 37001 -r /dev/pts/6 f
(however it doesn't read the frequency because it looks like the
protocol is different or incomplete, rigs/anytone/d578.c is still
in beta)
2025-08-07 08:54:09 +02:00
Daniele Forsi IU5HKX 49c78edb80 Make code more uniform 2025-08-06 21:49:17 +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
Daniele Forsi IU5HKX 59acdb791e Fix compiler warning
Move both initialization outside of the conditional.

Fixes:
simyaesu.c:364:12: warning: ‘pbuf’ may be used uninitialized [-Wmaybe-uninitialized]
2025-08-06 09:34:04 +02:00
Daniele Forsi IU5HKX 032e78826e Fix BC and FO commands
The following command work from rigctl: get_freq get_ctcss_tone get_rig_info.
Uses the information from the manual linked at the top of rig/kenwood/tmd710.c.

Fixes:
simtmd710.c:64:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
simtmd710.c:68:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
2025-08-05 23:46:10 +02:00
Daniele Forsi IU5HKX d5c5eeff15 No need to use strlen() because the i variable counted the chars read 2025-08-05 22:40:17 +02:00
Daniele Forsi IU5HKX af4c6ec806 Make the output of simft990 more friendly 2025-08-05 22:40:17 +02:00
Daniele Forsi IU5HKX 9dd0009f9e Remove unused define 2025-08-05 22:22:50 +02:00
Daniele Forsi IU5HKX 816d6d9bef Replace magic number with a defined constant 2025-08-05 22:22:50 +02:00
Daniele Forsi IU5HKX 249a993633 Avoid spamming the terminal with 0's 2025-08-05 22:22:50 +02:00
Daniele Forsi IU5HKX 8064da8121 Avoid burning 100% CPU
Adds hl_usleep() like in the other version of getmyline().
2025-08-05 21:16:33 +02:00
Daniele Forsi IU5HKX d9532a9c62 Fix compiler warning
Fixes:
simft990.c:64:36: warning: pointer targets in passing argument 2 of ‘getmyline5’ differ in signedness [-Wpointer-sign]
2025-08-05 20:51:04 +02:00
Daniele Forsi IU5HKX f691a68c06 Fix compiler warning
Fixes:
simft990.c:39:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
2025-08-05 20:38:57 +02:00
Daniele Forsi IU5HKX 725fcee004 Fix compiler warning
Fixes:
simatd578.c:143:9: warning: ‘n’ may be used uninitialized [-Wmaybe-uninitialized]
2025-08-05 20:22:41 +02:00
George Baltz N3GB 96bc67d993 Fix FD leak in AESStringCrypt.c
Found by `gcc -fanalyzer`, which then spent the next 20+ minutes trying to
analyze md5.c, at which point I gave up.
2025-08-05 11:33:00 -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 c1132a77b5 Mark cache structure in rig_state as deprecated.
It is no longer being initialized or updated, so anyone referencing it
is being misled.
2025-08-04 10:24:15 -04:00
George Baltz N3GB c1e6dcf010 More cppcheck stuff in amplifiers/ and rotators/ 2025-08-04 09:59:23 -04:00
George Baltz N3GB 8ce51d13aa Update Kenwood max CW message size. 2025-08-04 09:59:23 -04:00
Nate Bargmann 1e310b7958
Merge GitHub PR #1828 2025-08-04 08:04:15 -05:00
Nate Bargmann c881bc7132
Merge GitHub PR #1827 2025-08-04 07:49:28 -05:00
Daniele Forsi IU5HKX 151549bb3b Remove disabled code
None of these simulators does multicast networking.
2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX 790820ab22 Refactor to remove code duplication of one version of getmyline() 2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX b809937395 Rename in preparation of conflicting changes 2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX 498b45f5b0 Rename in preparation of conflicting changes 2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX a5467f4033 Refactor to remove code duplication of one version of getmyline() 2025-08-04 11:34:00 +02:00
Daniele Forsi IU5HKX 10f6504897 Remove disabled code and change signature
Makes getmyline() identical to the other simulators.
2025-08-04 11:32:26 +02: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 f8881f9bb9 Remove disabled code
None of these simulators does multicast networking.
2025-08-03 22:09:04 +02:00
Daniele Forsi IU5HKX 9e51419ab8 Do not use relative paths for including rig.h
The Makefile adds all necessary include directories.
2025-08-03 16:09:51 +02:00
Daniele Forsi IU5HKX c26f033395 Do not use relative paths for including misc.h
The Makefile adds all necessary include directories.
2025-08-03 16:09:47 +02:00
Daniele Forsi IU5HKX fbe9803777 Fix initialization of comm_status
The function rig_init() doesn't touch the hardware, it's rig_open()
that initiates the connection and in fact the first use of comm_status
in rig_open() is when it gets the value RIG_COMM_STATUS_CONNECTING and
rig_close() sets it to RIG_COMM_STATUS_DISCONNECTED.
2025-08-03 13:34:36 +02:00
Daniele Forsi IU5HKX 8d8d0328bf Fix typos 2025-08-03 10:49:23 +02:00
Daniele Forsi IU5HKX 99df93067c Add a .gitignore for C++ tests 2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX f89ebfd226 Add include missed by IWYU 2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX df7fbbec9b Have IWYU fix the includes 2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX 3b2a95053b Refactor to remove code duplication of dumphex() 2025-08-03 09:35:03 +02:00