hamlib/rigs
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
..
adat Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
alinco Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
anytone Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
aor Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
barrett Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
codan Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
commradio Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
dorji Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
drake Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
dummy fix(dummy): prevent get_level buffer overflow 2026-07-25 13:00:53 -05:00
elad Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
flexradio Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
gomspace Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
guohetec fix(guohetec): initialize fallback filter width 2026-07-31 13:14:18 -05:00
harris Fix ambiguous syntax of includes 2026-05-21 22:56:10 +02:00
icmarine Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
icom IC-7610, IC-7760: Implement SYNC 2026-07-24 19:20:32 -05:00
jrc Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
kachina Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
kenwood fix(kenwood): validate Elecraft SWR responses 2026-07-29 21:08:14 -05:00
kit Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
lowe Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
mds Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
motorola Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
pcr Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
prm80 Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
racal Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
rft Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
rs Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
simplecat Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
skanti Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
tapr Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
tentec Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
tuner Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
uniden Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
winradio Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
wj Remove old-fashioned and buggy Android.mk build system 2026-05-21 11:55:23 -05:00
yaesu ftx1: round repeater offset to nearest menu step, reject negative 2026-08-10 14:30:33 -05:00
hamlib_voice_cw_memory_4.6.0.xlsx Remove the executable bit from source files and documents 2025-08-17 22:38:25 +02:00