Commit graph

12804 commits

Author SHA1 Message Date
Nate Bargmann
333143daf9
Update NEW for FTX-1 repeater offset fixes 2026-08-10 14:46:31 -05:00
KJ5HST
407de3c258
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.

(cherry picked from commit 335820ad0a)
2026-08-10 14:30:33 -05:00
Nate Bargmann
c2cebe86c2
Update NEWS for FTX-1 WFM quirk fix 2026-08-07 10:46:49 -05:00
Miao Wang
81ad01f52f
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.

(cherry picked from commit 2d1974a748)
2026-08-07 09:32:47 -05:00
Nate Bargmann
e5e1a080fd
Update NEWS for FTX-1 CTCSS/DCS tone handling 2026-08-02 09:03:00 -05:00
Miao Wang
4c27198e02
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.

(cherry picked from commit 3f3e4becb3)
2026-08-02 08:44:41 -05:00
Nate Bargmann
366d77f925
Update NEWS for terminate hex output fix 2026-08-01 08:25:32 -05:00
David Christle
113fbcdf3b
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.

(cherry picked from commit 439f91fa28)
2026-08-01 06:56:10 -05:00
Nate Bargmann
d0a984f37c
Update NEWS with correct surname of David Christle 2026-08-01 06:09:24 -05:00
Nate Bargmann
7b20a0a6cc
Update NEWS for Gouhetec filter fix 2026-07-31 13:56:14 -05:00
David Christle
ba0d6c83fe
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.

(cherry picked from commit 951ff93651)
2026-07-31 13:14:18 -05:00
Nate Bargmann
ebce0ed732
Update NEWS for K3/K4 SWR validate fix 2026-07-29 21:19:54 -05:00
David Christle
06b0bb863d
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.

(cherry picked from commit 900c4d354e)
2026-07-29 21:08:14 -05:00
Nate Bargmann
b491488bae
Update NEWS for FTX-1 repeater offset fix 2026-07-29 13:09:56 -05:00
Miao Wang
7fd7463a1b
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>
(cherry picked from commit e0c8de6936)
2026-07-29 12:58:21 -05:00
Nate Bargmann
abb6b2dd26
Update NEWS for dummy level overflow fix 2026-07-25 13:12:46 -05:00
David Christle
051c617814
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()")
(cherry picked from commit ee57b43282)
2026-07-25 13:00:53 -05:00
Nate Bargmann
fb08bc6edf
Update NEWS for debug history race fix 2026-07-25 12:32:54 -05:00
David Christle
141e1b19a0 fix(debug): prevent race in debug history capture
Concurrent calls to rig_debug() could use the same temporary buffer
and corrupt the saved debug history.

Give each call its own buffer and update the shared history under the
existing mutex.

(cherry picked from commit cf3fcc4b8a)
2026-07-25 00:43:52 -05:00
Nate Bargmann
fbaea0dd09
Update NEWS for IC-7610/7760 SYNC implementation 2026-07-24 19:37:58 -05:00
Christoph Berg
967661caf2
IC-7610, IC-7760: Implement SYNC
\set_func SYNC is called "Tracking" in the IC-7610 main menu.

(cherry picked from commit 3840e1ed84)
2026-07-24 19:20:32 -05:00
Nate Bargmann
6336ab8976
Update NEWS for FTX-1 fixes
Also update README.developer on LLM usage.
2026-07-24 19:00:47 -05:00
KJ5HST
7e5a32a8ec
ftx1: stop an ATAS tuner with AC120, not the rejected AC000
Hardware-verified on an FTX-1 + ATAS-120A: with an ATAS selected, the general
AC000 stop is rejected ('?'), and because newcat does not read the AC reply
that '?' leaked into the next command. Route RIG_FUNC_TUNER off by the active
antenna's tuner type — AC120 for ATAS, AC000 otherwise — matching rad-con.

(cherry picked from commit 9fe116a417)
2026-07-24 18:37:24 -05:00
KJ5HST
002f130208
ftx1: rework RIG_FUNC_TUNER to real AC status + add ATAS manual control
ftx1_set/get_tuner claimed "AC is status-only", gated everything behind
SPA-1, wrote 0/1 into EX030104 (the general select, not an on/off), and
returned ENIMPL for tune. Replace with the hardware-tested AC model:

- get_tuner: read AC and report P3 != '0' (tune active), like rad-con
  Power.isTuning(); no SPA-1 gate.
- set_tuner: mode 0 -> AC000 (stop/bypass); mode 1 -> no-op (the FTX-1 has no
  persistent tuner-on toggle; select type via ext-parms, tune via RIG_OP_TUNE).
- Add ftx1_atas_ctrl() (AC120 stop / AC121 up / AC122 down / AC123 start),
  mirroring rad-con's AtasTunerProvider, exposed as the write-only ATAS_CTRL
  ext-parm (synthetic non-menu token, dispatched directly).

(cherry picked from commit af6165a8b2)
2026-07-24 18:37:09 -05:00
KJ5HST
6e85e79d6f
ftx1: correct the antenna-tuner menu model (EX030104 vs per-antenna type)
The driver conflated GENERAL TUNER SELECT (EX030104, 0=Option/1=ATAS) with
the per-antenna tuner type (EX030701/2, 0=INT/1=INT_FAST/2=EXT/3=ATAS) and
gated EXT/ATAS selection + HF antenna select behind SPA-1. On a field head
(or any head with an ATAS/EXT antenna) that wrongly blocked tuner setup.

- GEN_TUNER_SELECT: range 0-3 -> 0-1 (Option/ATAS), in both the menu table
  (set-time validation) and the ext-parm descriptor (caps.extparms).
- OPT_TUNER_ANT1/ANT2 + OPT_HF_ANT_SEL: drop FTX1_MENU_FLAG_SPA1 — EXT/ATAS
  tuning and antenna select work on any head; only INT/INT_FAST need SPA-1,
  which the radio enforces itself. Power-limit items (EX030705-11) stay gated.
- Fix the ftx1_ext.c guardrail (EX030104 no longer SPA-1-gated; the OPTION
  gate now applies only to power items >= 5) and the header/tuner_select docs.

Menu model hardware-verified on an FTX-1 + ATAS-120A: EX030704=ANT1,
EX030701=ATAS matched the physical setup.

(cherry picked from commit 771b5b3c3c)
2026-07-24 18:36:56 -05:00
KJ5HST
935b662c11
ftx1: fix RIG_OP_TUNE to send AC123 (ATAS)/AC103, not the rejected AC110
RIG_OP_TUNE sent AC110, which the radio rejects with '?;' (P3=0 is
off/stop, not a tune start) — so `vfo_op TUNE` never tuned. Verified on an
FTX-1 + ATAS-120A: AC110 -> '?;' while AC123 starts an ATAS auto-tune.

Send the tune form for the tuner type selected on the active antenna:
AC123 (P2=2 ATAS, P3=3 start) for ATAS, AC103 (external-port start) for
INT/INT_FAST/EXT, defaulting to AC103 on read failure. Drop the SPA-1 gate
here: EXT/ATAS tune on any head type; only INT/INT(FAST) need SPA-1, which
the radio enforces itself.

Add ftx1_get_effective_tuner_type() (active antenna EX030704 -> per-antenna
type EX030701/2), mirroring the hardware-tested rad-con model.

(cherry picked from commit 76427ee7b4)
2026-07-24 18:36:43 -05:00
Kai Pastor
df45642165
Update README.developer
Co-authored-by: Kai Pastor <dg0yt@darc.de>
(cherry picked from commit 083a748269)
2026-07-23 13:04:46 -05:00
Kai Pastor
892da0705a
Update README.developer
Co-authored-by: Kai Pastor <dg0yt@darc.de>
(cherry picked from commit dcb134c519)
2026-07-23 13:04:33 -05:00
Nate Bargmann
6b7bb8e6b2
Update LLM comments in README.developer
Other minor updates.

(cherry picked from commit 6da53aca1e)
2026-07-23 13:04:21 -05:00
Nate Bargmann
800e980107
Update NEWS for TS-790 split and cache fixes 2026-07-09 07:09:33 -05:00
George Baltz N3GB
1ba48b9840
Fix typo in cache invalidation logic
Misplaced close-paren in if statement caused "IF" command to be cached,
  even if rig settings were changed. Note that the last if-clause would
  never be evaluated as true due to the strlen() in the first clause.

(cherry picked from commit 1a46034995)
2026-07-07 07:41:42 -05:00
George Baltz N3GB
a3e18bf33d
Another place to treat TS-790 like TS-50 and TS-940
Add TS-790 to rigs needing change FR->FN, and make it mutually exclusive
  to addition of ";FT#".

Part of issue #2084

(cherry picked from commit d633ccf263)
2026-07-04 03:57:55 -05:00
George Baltz N3GB
ad2c5a06e2
Make TS-790 match TS-50 & TS-940
These rigs are of the same vintage, and the command set is very similar.

(cherry picked from commit 751ae294db)
2026-07-02 11:28:39 -05:00
Nate Bargmann
d37694efb1
Set up for 4.7.3 2026-06-23 10:52:53 -05:00
Nate Bargmann
40f63488fe
Release 4.7.2 2026-06-21 08:07:37 -05:00
Nate Bargmann
2e187d9006
Update NEWS for previous cherry-picks
Potential security fixes, GHSA-gpcq-c37x-pr4:

https://github.com/Hamlib/Hamlib/security/advisories/GHSA-gpcq-c37x-pr46

GHSA-f72v-7gmh-m9mj:

https://github.com/Hamlib/Hamlib/security/advisories/GHSA-f72v-7gmh-m9mj

X6100: Adjust X6100 S-meter Look Up Table.
2026-06-14 07:52:53 -05:00
Nannk
7b4ebd0380
Change x6100 S-meter LUT for v1.2.0 xiegu gui
(cherry picked from commit d5dd4d8150)
2026-06-14 07:22:30 -05:00
George Baltz N3GB
68e1458993
Make a padded copy of input so compare doesn't overread
Cleanup:
Fix typo and formatting
Move RIGCTLD_PASSWORDS from rig.h to rigctl_parse.h

(cherry picked from commit 11dbace230)
2026-06-12 09:05:06 -05:00
George Baltz N3GB
1eeed535ad
Turn passwords on again
(cherry picked from commit 039a4f8bfe)
2026-06-12 09:04:50 -05:00
George Baltz N3GB
d5ece94f0b
Move password status to connection specific data.
Fix memory leak in rigctld_password_check()

(cherry picked from commit cef2d9d3a9)
2026-06-12 09:04:38 -05:00
George Baltz N3GB
6d8eb8e31b
Infrastructure and setup for associating connection data with thread
Will allow rigctl_parse() routines access to connection data, without
  reworking all of the internal and external interfaces.

(cherry picked from commit b56f8d8f8a)
2026-06-12 09:04:27 -05:00
George Baltz N3GB
47a8c5eec0
Turn off passwords and their help text
Disable them until they work

(cherry picked from commit 7fc1389349)
2026-06-12 09:04:13 -05:00
George Baltz N3GB
f19ac5afc8
Fix unterminated string
Add debug print

(cherry picked from commit fa6ae2adba)
2026-06-12 09:04:01 -05:00
George Baltz N3GB
81bec0afc0
Don't return more than the caller expected
If more needed, call again.

(cherry picked from commit 7a35260b12)
2026-06-12 09:03:47 -05:00
George Baltz N3GB
47171005bf
Bend boundary->subscript conversion in the right direction.
Don't mess with binary data.

(cherry picked from commit a3a7f00d75)
2026-06-07 18:00:13 -05:00
George Baltz N3GB
3e3f78fc77
Only transfer relevant bytes.
(cherry picked from commit 587f7bb2c6)
2026-06-07 17:59:59 -05:00
Nate Bargmann
0ec99cbd47
Merge GitHub PR #2066 2026-05-31 10:31:41 -05:00
Nate Bargmann
01f9bbc0bf
Update NEWS for Xiegu X6100 power2mW fix 2026-05-29 20:52:38 -05:00
Johannes Schwab
3babb9b486
Fix power2mW for Xiegu X6100
(cherry picked from commit 1f054b2555)
2026-05-29 18:38:23 -05:00
Nate Bargmann
a5acb10b1c
Update NEWS for IC-705 power2mw fix 2026-05-29 17:56:56 -05:00