Commit graph

12988 commits

Author SHA1 Message Date
Nate Bargmann
7bbde194b4
Merge GitHub PR #2128 2026-08-10 14:53:00 -05:00
Nate Bargmann
8c0070e0b5
Merge GitHub PR #2119 2026-08-10 11:53:58 -05:00
David Christle
5bc6deefe1
refactor(tests): split test registration into stable lists
Share directly executed tests and generated wrappers between Automake primaries. Keep entries one per line to reduce conflicts when independent changes add coverage.
2026-08-02 10:41:57 -07:00
Nate Bargmann
148feba986
Merge GitHub PR #2118 2026-08-02 09:07:30 -05:00
Nate Bargmann
b897a7bed5
Merge GitHub PR #2117 2026-08-02 08:28:18 -05:00
Nate Bargmann
e08e3978f3
Update NEWS for dummy string values copying fix 2026-08-01 21:56:16 -05:00
Nate Bargmann
06d19e6c92
Merge GitHub PR #2115 2026-08-01 08:28:29 -05:00
Nate Bargmann
8ac832885c
Merge GitHub PR #2114 2026-08-01 06:39:17 -05:00
Nate Bargmann
80940e56b4
Merge pull request #2127 from dchristle/docs/correct-news-attribution
docs(news): correct my surname
2026-08-01 06:07:13 -05:00
David Christle
eff25c9472
fix(dummy): copy string parameter values
The Dummy backend retained caller-owned string pointers in its parameter
array, leaving BANDSELECT and KEYERTYPE dangling after the caller returned.

Deep-copy string parameters, release replacements during cleanup, and add
set/get ownership regressions for both string-valued parameters.
2026-07-31 21:27:17 -07:00
David Christle
04fbd9d230
docs(news): correct my surname 2026-07-31 21:01:03 -07:00
Nate Bargmann
568b6c1cde
Merge GitHub PR #2113 2026-07-31 13:02:48 -05:00
Nate Bargmann
26b00c2067
Update NEWS for new ATS Mini backend/model 2026-07-31 12:56:14 -05:00
Nate Bargmann
cc6bbf70cc
Merge GitHub PR #2089 2026-07-31 12:36:48 -05:00
Nate Bargmann
1f88c4b64d
Update NEWS for PRs applied to master only 2026-07-31 12:33:01 -05:00
Miao Wang
2d1974a748 ftx1: handle WFM mode quirk (FM-in-WFM-band returns mode '0')
On the FTX-1, WFM is a bit special: Inside the 76-108 MHz WFM band the
radio is set to WFM by sending the normal FM mode code (MD...4), and
when read back the MD reply carries P2='0', which newcat_get_mode cannot
map and so returns -RIG_EPROTO. Override get_mode/set_mode with ftx1
wrappers:

- ftx1_get_mode: on -RIG_EPROTO with mode '0', verify the current VFO
  frequency falls in a WFM rx range (rx_range_list), and if so report
  RIG_MODE_WFM instead of the protocol error.
- ftx1_set_mode: when asked for RIG_MODE_WFM, reject it (-RIG_EINVAL)
  outside the WFM range, and inside the range translate it to
  RIG_MODE_FM with RIG_PASSBAND_NOCHANGE (let the radio apply its WFM
  bandwidth).
- ftx1_check_freq_wfm(): helper scanning rx_range_list for a WFM-typed
  entry covering the given frequency.
2026-07-30 12:55:53 +08:00
Miao Wang
1944a6736e ftx1: include WFM in the frequency table
This commit includes WFM (Wide Frequency Modulation) in the frequency
table for the Yaesu FTX-1 rig. The frequency ranges are updated to
reflect the correct modes for each range, ensuring that WFM is properly
recognized and handled by the rig's capabilities. This change also
adds filter bandwidth information for WFM.
2026-07-30 12:38:08 +08:00
Nate Bargmann
04f13b4a01
Merge GitHub PR #2112 2026-07-29 21:24:30 -05:00
Nate Bargmann
9415c552b0
Merge GitHub PR #2111 2026-07-29 20:53:12 -05:00
Nate Bargmann
ab4e40ab39
Merge GitHub PR #2110 2026-07-29 12:46:11 -05:00
Nate Bargmann
bec2437947
Merge GitHub PR #2109 2026-07-29 12:25:47 -05:00
KJ5HST
335820ad0a ftx1: round repeater offset to nearest menu step, reject negative
ftx1_set_rptr_offs() converted the requested offset into the EX menu's
step count with a truncating integer division, so any offset that was
not an exact multiple of the step was silently programmed as a smaller
one, with nothing returned to tell the caller it had been changed.

Round to the nearest step instead.

Also reject a negative offset up front. The offset is a magnitude --
direction comes from set_rptr_shift -- and truncation towards zero
meant a small negative value was accepted as "no offset" rather than
rejected, while a larger one failed later in the menu range check.

Verified on an FTX-1 (Optima) on 144 MHz, with #2110 applied so the
step is the correct 50 kHz:

  set_rptr_offs 625000  -> 650000  (exactly half a step, rounds up)
  set_rptr_offs 630000  -> 650000
  set_rptr_offs 620000  -> 600000
  set_rptr_offs 624999  -> 600000
  set_rptr_offs 600000  -> 600000  (exact, unchanged)
  set_rptr_offs -600000 -> -RIG_EINVAL, menu value left untouched

The truncation is present independently of #2110 -- that PR only makes
it easier to hit by correcting the 144/430 MHz step to 50 kHz.
2026-07-29 12:18:38 -04:00
David Christle
faefdac4ab
fix(rotctl): bound escaped command parsing
Stop parsing when an escape is missing or consumes no input, and count only successfully decoded bytes. This avoids the extra strtol call beyond the command terminator while preserving valid raw commands.
2026-07-29 10:39:38 -05:00
David Christle
1f804d4da7
fix(ftx1): validate S-meter response framing
Require the response command, VFO selector, numeric payload, and terminator to match the requested S-meter frame. Reject malformed or mismatched replies without changing the output value.
2026-07-29 10:38:05 -05:00
David Christle
489ca77a04
fix(core): return generic band for missing metadata
Band-name callers treat successful lookups as printable strings. Return BANDGEN when granularity metadata has no band list instead of propagating NULL into formatting paths.
2026-07-29 10:31:51 -05:00
Miao Wang
3f3e4becb3 ftx1: Fix CTCSS/DCS tone handling and add CSQL support
Correct several issues in the FTX-1 CTCSS/DCS implementation:

* Add DCS code table (ftx1_dcs_codes[]) and index<->code conversion
  helpers (ftx1_code_to_dcs_num/ftx1_dcs_num_to_code). Previously
  set_dcs_code/get_dcs_code passed the raw DCS code value (e.g. 023)
  directly to the CN command, which expects a 0-based table index
  (000-103). The code value is now converted to/from the index on
  set/get respectively.

* Fix CN command parameter documentation. P1 is the VFO selector
  (0=Main/1=Sub), not a TX/RX selector as previously stated.

* Simplify set/get_ctcss_sql to delegate to set/get_ctcss_tone, and
  set/get_dcs_sql to delegate to set/get_dcs_code. The FTX-1 does not
  support separate TX/RX tones or DCS codes, so the previous
  CN10/CN11 (Sub VFO) usage was incorrect.

* Add RIG_FUNC_CSQL support in set_func/get_func and rig caps,
  mapping it to the CT3 (DCS) mode via FTX1_CTCSS_MODE_DCS.
2026-07-28 22:51:28 +08:00
David Christle
951ff93651
fix(guohetec): initialize fallback filter width
PMR-171 and Q900 can return the private filter width when a mode query
falls back to cached state. Initialize it to RIG_PASSBAND_NORMAL during
backend setup.
2026-07-28 00:50:57 -05:00
David Christle
439f91fa28
fix(core): terminate empty hexadecimal output
to_hex() left non-empty destination buffers untouched when the source
length was zero. Initialize the output string before returning and cover
the empty conversion in testbcd.
2026-07-28 00:50:52 -05:00
David Christle
7e53a7da31
fix(expert): validate status antenna fields
Validate input and transmit-antenna digits against each model's declared capabilities before constructing antenna masks. Return a protocol error for malformed status fields.
2026-07-27 23:33:13 -05:00
David Christle
560a44d844
fix(ampctl): bound escaped command parsing
Stop binary command decoding at the documented escape boundary and use the conversion endpoint to advance. This avoids reading beyond a terminated command while preserving valid escaped bytes.
2026-07-27 23:33:13 -05:00
David Christle
3afe2133a1
refactor(ftx1): simplify S-meter parsing
Suppress the unused P1 conversion result while retaining the response-digit validation performed by the conversion.
2026-07-27 23:33:13 -05:00
David Christle
5293dbb855
test(parsers): add boundary regressions
Exercise command stream failures, hexadecimal byte formats, backend truncation and framing, metadata absence, and physical-device reply boundaries with focused valid and malformed cases. Ignore the generated test binaries and harness logs.
2026-07-27 23:33:09 -05:00
David Christle
d60beb2e63
fix(ftx1): validate physical-device replies
Require exact clarifier and extended-menu response structure, validate numeric conversions and terminators, and reject signed or out-of-range meter values.
2026-07-27 23:33:03 -05:00
David Christle
86dcae5fd6
fix(core): handle missing band metadata
Check for the BANDSELECT opening delimiter before advancing into the band list in both numeric and string lookup paths.
2026-07-27 23:33:03 -05:00
David Christle
b9b972378f
fix(backends): validate bounded parser fields
Stop Icom tuning-step lookup at each table sentinel and bound Gemini status fields without letting truncated scans cancel valid matches. Parse GS100 newline-delimited response lines until its exact non-terminated prompt while enforcing response and line-count limits.
2026-07-27 23:33:00 -05:00
David Christle
c0adbb27bb
fix(ctl): bound command parser inputs
Reject stream read errors instead of synthesizing empty commands, validate raw hexadecimal command syntax without reading past its terminator, and keep fixed-size command and description inputs within their actual capacities.
2026-07-27 23:32:48 -05:00
Miao Wang
e0c8de6936 FTX-1: fix get/set_rptr_offs to use correct unit
The raw value of frequency offset for 144 MHz and 430 MHz band is in
50 kHz unit, and the available range is from 0 to 100 MHz.

Tested on real hardware.

Fixes: 2c0ba29d53 ("FTX-1: Fix capability gaps - DCD, CWPITCH, RPTR_OFFS, BAND_UP/DOWN")
Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
2026-07-28 03:59:43 +08:00
David Christle
900c4d354e
fix(kenwood): validate Elecraft SWR responses
Malformed K3/K3S SW and K4 TM replies could leave parsed meter
fields uninitialized. The K4 SWR path also discarded helper failures.

Reject incomplete conversions with RIG_EPROTO and return K4 transaction
and parse errors to callers.
2026-07-27 02:42:13 -05:00
Jon Snow
379cf42746
Merge branch 'Hamlib:master' into master 2026-07-26 22:17:16 -04:00
Jon Snow
d0805c935e fix type warnings 2026-07-26 22:17:01 -04:00
Jon Snow
1db9187c0a disable truncation warnings 2026-07-26 22:16:38 -04:00
Nate Bargmann
c7fb0fa148
Merge GitHub PR #2108 2026-07-25 12:36:52 -05:00
Jon Snow
6cbc4f5a70 fix formatting 2026-07-25 12:54:02 -04:00
David Christle
b4516bb12e
fix(rig): make Morse busy hint accesses atomic
The Morse worker and getter cache decisions raced on morse_busy.

Use relaxed atomic operations because the hint publishes no other state.
2026-07-25 02:28:27 -05:00
David Christle
ee57b43282
fix(dummy): prevent get_level buffer overflow
dummy_get_level() copied a full value_t into result pointers even when
rig_get_strength() passed an int-sized buffer, overflowing the caller.

Copy only the integer or float member selected by the level while
retaining memcpy() for targets with weaker alignment.

Fixes: 5805de6e1e ("dummy/dummy.c: Fix unaligned access in dummy_get_level()")
2026-07-25 01:45:24 -05:00
David Christle
e80cc8fd82 fix: prevent network AGC parser overflow
NET rigctl and Quisk reused an old loop index while parsing
peer-provided AGC levels, which could write past the fixed array.

Use a shared bounded parser that truncates the list to the array
capacity and ignores malformed fields without failing the connection.

Fixes: 652e12a446 ("Fix cppcheck style")
2026-07-25 00:03:53 -05:00
Jon Snow
00ce86d038
Merge branch 'Hamlib:master' into master 2026-07-24 21:38:46 -04:00
Nate Bargmann
36b4503872
Merge GitHub PR #2105 2026-07-24 20:29:51 -05:00
Nate Bargmann
616c1ff953
Merge GitHub PR #2098 2026-07-24 19:03:16 -05:00
Nate Bargmann
82db1d2d09
Merge GitHub PR #2092 2026-07-24 18:23:31 -05:00