George Baltz N3GB
07d0d91a44
Yet more cppcheck messages silenced.
2025-06-15 13:52:09 -04:00
George Baltz N3GB
49e65de203
Get rid of spurious messages from \dump_caps
...
rig_sprintf_func() outputs a RIG_DEBUG_ERR message for each
function that the rig does not support.
2025-06-14 19:17:23 -04:00
Nate Bargmann
bddd3ace00
Revert 17b404a6c7
...
These changes were unnecessary as the real bug is that the incorrect
function was being called in meade.c.
Closes GitHub issue #268 .
Fix testloc.c
2025-06-14 11:42:45 -05:00
George Baltz N3GB
39a1a367e1
Get rid of a few more style infractions.
...
Update NEWS.
2025-06-08 03:42:33 -04:00
George Baltz N3GB
5087894d71
Check off a few more cppcheck carps.
2025-06-07 10:46:31 -04:00
Nate Bargmann
7b60cb586d
Merge GitHub PR #1751
2025-06-07 07:56:07 -05:00
Daniele Forsi IU5HKX
10180a6dc2
Fix sign of error return values
...
All RIG_E* constants should be negated when returned or compared.
Fixed with:
perl -pe 's/return RIG_E/return -RIG_E/' -i $(grep -lEr "return RIG_E" --include=*.{c,h})
perl -pe 's/= RIG_E/= -RIG_E/g' -i $(grep -lEr "= RIG_E" --include=*.{c,h})
2025-06-07 12:07:44 +02:00
Daniele Forsi IU5HKX
721b81d9be
Fix sign of return values Doxygen comments
...
All RIG_E* constants are negated when returned.
Fied with:
perl -pe 's/return RIG_E/return -RIG_E/' -i src/vent.c
perl -pe 's/retval RIG_E/retval -RIG_E/g' -i $(grep -lEr "retval RIG_E" --include=*.{c,h})
2025-06-07 10:54:34 +02:00
Daniele Forsi IU5HKX
ae9556462a
Fix debug messages shown even from disabled levels
...
Messages from ENTERFUNC and RETURNFUNC where stored in an internal buffer
even whe debug_level wasn't TRACE and were returned when calling rigerror().
2025-06-07 09:14:32 +02:00
Daniele Forsi IU5HKX
ea5a5ac312
Fix Doxygen tags
2025-06-07 00:07:00 +02:00
George Baltz N3GB
1532432236
Move more rig_cache infrastructure to cache.[ch]
...
Macros from rig.h, routines from misc.c
Add some error checks and comments
2025-06-03 12:07:27 -04:00
George Baltz N3GB
3bdfdebacb
Simplify elapsed time computation
...
Do as much of the arithmetic in integers as possible.
Convert both parts to final units(msec) and add.
The casts are actually unneeded, but show when the conversions are done.
And drop an unreachable break.
2025-06-03 12:07:27 -04:00
George Baltz N3GB
f5eb8f19e9
Add utility routine to release all allocated buffers, including rig itself.
...
One stop shopping for all your rig data cleanup needs.
2025-06-03 12:07:27 -04:00
George Baltz N3GB
1fca93a5a2
Deprecate rig_cache definition in rig.h
...
Add new rig_cache definition in cache.h
2025-06-03 12:07:27 -04:00
George Baltz N3GB
6f8bf81514
Allocate separate storage for cache buffer
...
Add address to rig_struct, change CACHE() macro to use it.
Free it when done.
Issue #1420
2025-06-03 12:07:27 -04:00
George Baltz N3GB
7d28822273
Add '#include "cache.h"' to all files that reference cache structure.
...
Issue #1420
2025-06-03 12:07:27 -04:00
George Baltz N3GB
7fa0c863f2
Don't start async_data_handler until rig is fully opened.
...
Let the <model>_rig_open() finish its setup before trying to read status.
2025-05-30 12:39:29 -04:00
George Baltz N3GB
b74bd31b40
Quiet a few more cppcheck gripes.
...
Making these functions static also reduces the possibilities of
collisions with app names and may shorten load time.
And I can finally make meter_type1 and meter_type2 const, like I
tried to do in the beginning.
2025-05-29 05:41:39 -04:00
George Baltz N3GB
b5df48d8d9
Add locking around get/set levels
2025-05-24 20:20:10 -04:00
Daniele Forsi IU5HKX
da60d2d383
Replace non-portable make rule with one that is also easier to understand
...
Fixes:
warning: '%'-style pattern rules are a GNU make extension
2025-05-09 21:08:42 +02:00
Daniele Forsi IU5HKX
de01821c51
Fix typo
2025-05-08 23:51:47 +02:00
Daniele Forsi IU5HKX
1e7b1a628e
Fix error return values
...
All constant error values RIG_E* should be negated when returned.
Found with:
grep -nrE RETURNFUNC.?.RIG_E.+ --include=*.{c,h} | grep -v \-
2025-05-08 23:51:47 +02:00
Daniele Forsi IU5HKX
5c05881e0e
Add rules to build dependencies of libhamlib.la in other directories
...
This makes it possible to run "make -C src/" or "make -C tests/ rigctl"
or "make -C bindings/ check" (and so on) in a clean tree, but it doesn't
rebuild those targets if libhamlib.la is changed; for this run make from
the top directory as usual, to rebuild all SUBDIRS if needed.
2025-05-08 23:51:47 +02:00
Daniele Forsi IU5HKX
0b68dc5885
Also check the "name" parameter
...
Avoids a segfault if calling strtol(NULL, NULL, 0).
2025-05-08 23:11:21 +02:00
Daniele Forsi IU5HKX
dda30532b5
Add cross references hash mark for Doxygen
2025-04-30 19:36:20 +02:00
Daniele Forsi IU5HKX
c1788e2cf8
Fix names of parameters in Doxygen comments
2025-04-30 19:36:20 +02:00
Daniele Forsi IU5HKX
8feb174711
Fix typos
2025-04-30 19:34:47 +02:00
Daniele Forsi IU5HKX
24eafbd2a4
Fix Doxygen comment
...
The description of hamlib_version was attached to hamlib_license
and hamlib_license was missing the description.
2025-04-30 19:34:47 +02:00
George Baltz N3GB
a3e23e79cd
Minor cleanups/fixes
...
Return status from rig_send_morse
Remove duplicate include and some dead code
Avoid future NULL dereference in error cases
2025-03-04 21:32:34 -05:00
George Baltz N3GB
5caa22b79a
Add locking to rig_stop_morse
...
and rig_wait_morse
2025-03-04 17:20:41 -05:00
Michael Black W9MDB
7269ba6264
Merge branch 'master' of github.com:Hamlib/Hamlib
2025-03-04 14:42:32 -06:00
Michael Black W9MDB
701d6bf477
Hopefully fix CODAN NGS set_freq/get_freq
2025-03-04 14:41:31 -06:00
George Baltz N3GB
0147da5a3c
Replace rs->multicast->mutex with a dedicated mutex for the API.
...
Use PTHREAD_MUTEX_RECURSIVE and change LOCK() to always call rig_lock().
Still needs a reliable way to determine availability.
2025-02-28 05:29:44 -05:00
George Baltz N3GB
439bd96b5d
Fix the easy parts of missing thread locks
...
- Fix depth initialization so LOCK() at least calls rig_lock()
- Add message showing why rig_lock() does nothing
- Add missing LOCK(0)s
2025-02-27 06:22:30 -05:00
Michael Black W9MDB
98a0184680
Remote -w451 flag -- not available in all versions of gcc
2025-02-18 09:10:26 -06:00
Michael Black W9MDB
a0df573df7
Reduce good news about serial port to verbose
2025-02-04 11:45:56 -06:00
Michael Black W9MDB
5ecc1934fc
Add IC910 to Icom exceptions in rig.c
2025-01-30 22:59:01 -06:00
Michael Black W9MDB
198c14818a
Reduce error message level in rig_set_freq...left over from debugging
2025-01-20 16:54:16 -06:00
Michael Black W9MDB
a985b50eea
Fix IC9100 rigctld startup where it was starting on VFOA and ending up on VFOB
...
https://github.com/Hamlib/Hamlib/issues/1656
2025-01-15 08:11:02 -06:00
Michael Black W9MDB
f2a9f091d0
Change rig_list_foreach back to using const argument -- was breaking many C++ application builds
...
https://github.com/Hamlib/Hamlib/issues/1647
2024-12-29 08:42:24 -06:00
Michael Black W9MDB
028e8f38cd
Improve error message when windows serial port is already in use
2024-12-28 15:59:43 -06:00
George Baltz N3GB
8589d5c6bc
Fix unbalanced ENTERFUNC/RETURNFUNC pairs in icom.c
...
Also tweak comments/formats to eliminate false positives in code base
(except for the Catch-22 ones in tests/func_chk.c itself)
2024-12-22 16:48:56 -05:00
Michael Black W9MDB
f9185d1d24
Print error on bufferoverflow and astyle sprintflst.c
2024-12-22 15:19:38 -06:00
Michael Black W9MDB
e262fb82c2
Fix several potential overflows in sprintflst.c
2024-12-22 12:27:43 -06:00
Michael Black W9MDB
45cc53a526
Fix potential overflow in sprintflst.c
2024-12-22 11:36:45 -06:00
Michael Black W9MDB
65832ecf53
Fix compile warnings
2024-12-02 07:24:00 -06:00
Michael Black W9MDB
890ed18c43
Change morse_data_handler from LOCK to rig_lock as it needs to always use it
2024-12-02 07:20:42 -06:00
Michael Black W9MDB
711a351353
Merge branch 'master' of github.com:Hamlib/Hamlib
2024-12-01 22:41:04 -06:00
Michael Black W9MDB
5219ef2b26
Put a heavier LOCK around send_morse when clearing the buffer
2024-12-01 16:44:22 -06:00
Daniele Forsi IU5HKX
e480bc7479
Fix typos
2024-12-01 21:59:11 +01:00