The FTX-1 driver delegates mode handling to newcat_set_mode /
newcat_get_mode, which previously had no FTX-1 branch in the
bandwidth helpers. Effects:
* rig_get_mode always returned passband=0 for the FTX-1
* rig_set_mode silently dropped the width argument
Add dedicated is_ftx1 branches to newcat_set_rx_bandwidth and
newcat_get_rx_bandwidth, and extend the SH command-string builder
to emit the 7-char SH00NN; form for FTX-1.
The bandwidth table is per FTX-1 CAT Operation Reference Manual
Table 5 (doc 2508-C). It is deliberately kept separate from the
FT-710 / FTDX10 branch because the SSB column diverges at codes
12/13/14: FTX-1 uses 2250/2400/2450 Hz where FT-710 uses
2200/2300/2400 Hz. Sharing the branch would silently misreport
2400 Hz on the FTX-1 -- exactly the canonical SSB filter.
PSK is included in the CW/DATA/RTTY case group because Table 5
groups it there, and live probing of firmware v1.12 confirmed PSK
mode defaults to SH code 19 (the DATA default) rather than an SSB
code.
Verified end-to-end against a live FTX-1 (fw v1.12) at 115200 bps:
USB 2400/2700/2250/2450/3000, CW 500/2400, PKTUSB 3000, AM 9000,
FM 16000 all round-trip correctly through rig_set_mode /
rig_get_mode, with raw-CAT SH reads confirming the corrected code
mapping (2250->SH12, 2400->SH13, 2450->SH14).
(cherry picked from commit b429b2a35b)
As reported by Tom, W2YF:
https://sourceforge.net/p/hamlib/mailman/message/59309943/
In low power mode, <= 12 Watts, the power was incorrectly reported too
high by a factor of 10.
Also use a lower value of divisor to achieve a reported power level
closer to the actual value.
Try a few shots in the dark for issues #2021 & #2024
Acknowledge that the FT-710 does NOT have an "RF" command.
Don't call newcat_set_roofing_filter_for_width() if there are
no roofing filters available.
Fix runaway search for matching roofing filters; use count as there
are no end entries the filter table.
I really can't test these(no hardware), but just looking at the code
and the traces from the issues above it's evident that these things
are broken. This may not fix everything, and may even break in new ways,
but it may make the actual problems a bit easier to find.
(cherry picked from commit 1fa3444884)
Add Android.mk.
Add header files to Makefile.am
Replace .rig_model member with RIG_MODEL() macro in prc138_caps
structure.
(cherry picked from commit 452544e08c)
Since the individual attenuator steps are checked in newcat.c, let
the max value through rig_check_level. Fixes issue #2023
Also noticed a typo in the kludge for reinitializing structure data. This
meant there was no LVL_KEYSPD data for Yaesu rigs for over a year.
(cherry picked from commit 30d0be546b)
Add clock set/get to both rigs.
Add custom extcmds for IC-905
Fix RIG_LEVEL_USB_AF for IC-705 so it sets AF gain, not IF gain.
Make local data items static.
(cherry picked from commit 3d68d50a5b)
Relies or new structure in priv_caps to find values of 0x1A 0x05
subcommands for date, time, and offset data.
Also sets offset first, so later values are stored relative to the new one,
not whatever was there before.
(cherry picked from commit 1512278872)
MinGW generated the following warning:
Making install in rigs/simplecat
CC simplecat.lo
simplecat.c: In function 'simplecat_transaction':
simplecat.c:94:17: warning: the comparison will always evaluate as 'true' for the address of 'state' will never be NULL [-Waddress]
94 | if (!rig || !STATE(rig))
| ^
In file included from simplecat.c:27:
../../include/hamlib/rig.h:2672:22: note: 'state' declared here
2672 | struct rig_state state; /*!< Rig state */
| ^~~~~
CCLD libhamlib-simplecat.la
This warning is due to the changes to the state structure in Hamlib 5+.
See 'rigs/simplecat/SIMPLE_CAT_PROTOCOL.md' for the protocol spec.
Notes:
- Memory correctness checks were done using Valgrind.
- Tested with wsjtx-3.1.0_improved_PLUS_260228.tgz (with mods) and
Bunzee Labs' DDX HF Digital Transceiver
https://bunzee-labs.com/products/ddx
Tested on:
- Ubuntu Linux
- macOS Tahoe
- Windows 11
(cherry picked from commit debe6fcaf9)
Per mailing list discussion opened by Tom, W2YF, this addresses the
report that SWR readout is missing on the K4. I confirmed it is also
missing on the K3 and this patch enables it in WSJT-X Improved 3.1.0
Plus as packaged for Debian Stable backports.
George, N3GB, suggested that K3_LEVEL_ALL did not include RIG_LEVEL_SWR
and indeed that was the bug that prevented the SWR value from being read
in WSJT-X. Tom confirmed that the K4 also works correctly with WSJT-X.
gcc-16 adds warnings about using strncpy() to copy into a buffer with
size equal to the max count, possibly creating an unterminated string.
Since we don't care about the contents here and both buffers are the
same size, just do a byte copy.
(cherry picked from commit b6a25c8a83)
The CF command requires both RX and TX CLAR enables in one write.
Previously, set_rx_clar read TX state then wrote both, creating a
window where an external actor could change TX between read and write.
Same pattern in set_tx_clar with RX state.
Fix: cache both RX/TX CLAR enable states in newcat_priv_data. The get
functions refresh the cache on every read. The set functions use the
cached sibling state instead of reading from the radio, eliminating the
race window. Cold-start fallback reads from radio if no cache exists.
(cherry picked from commit 12ef996131)
Replace naive /100.0f divisor with rig_raw2val_float() using the
FTX1_SWR_CAL and FTX1_ALC_CAL calibration tables added in the
previous commit. This matches how newcat handles meter values for
other Yaesu radios and produces correct SWR ratios and 0.0-1.0
normalized ALC values from raw 0-255 RM readings.
(cherry picked from commit 280664b02e)
Uses Yaesu default values as initial calibration data. Tables are
defined explicitly in ftx1.h so they can be replaced with FTX-1-specific
values after hardware verification.
(cherry picked from commit 6127d79f7b)
The MS command comment had wrong type codes (claimed 0=S-meter, but CAT
manual p.20 shows 0=PO, 1=COMP, 2=ALC, 3=VDD, 4=ID, 5=SWR). More
critically, set/get were passing raw CAT codes instead of translating
to/from Hamlib RIG_METER_* bitmask values. Added ftx1_meter_to_cat()
and ftx1_cat_to_meter() conversion functions matching the FTX-1's
unique ordering (differs from FT-891/991 newcat mapping).
(cherry picked from commit 55c3c08541)
HW-1: SH (Width) command is read-write per CAT manual Table 5, not
read-only as previously commented. Width codes are mode-dependent.
HW-2: NR level range is 00-10 per CAT manual p.23, not 00-15. This
changes the float scaling (0.0-1.0 now maps to 0-10 radio levels).
(cherry picked from commit 7fee722032)
- Gap 3: Remove RIG_LEVEL_COMP intercept from get_level — was returning
RM3 meter reading instead of PL setting. Falls through to newcat now.
- Gap 1: Wire send_voice_mem callback to newcat_send_voice_mem (PB cmd)
- Gap 2: Wire set_clock/get_clock callbacks to newcat (DT cmd)
- Gap 4: Add RIG_LEVEL_BKIN_DLYMS to rig_caps and dispatchers, using
existing ftx1_set_cw_delay_ms/ftx1_get_cw_delay_ms helpers
(cherry picked from commit 0cb408cb68)
These read-only meter levels (RM5=PO, RM3=COMP) were missing from
has_get_level. The get_level dispatcher already falls through to
newcat's RM handler. Also wire up rfpower_meter_cal so the FTX-1
specific calibration table is used instead of the Yaesu default.
(cherry picked from commit 53f3e56598)
These read-only meter levels (RM7=ID, RM8=VDD) were in the original
driver but got dropped from has_get_level during the refactor into
the ftx1/ subdirectory. The get_level dispatcher already falls through
to newcat's handler which sends the correct RM commands.
(cherry picked from commit 43e62fc448)
BI command is binary (0=off, 1=on) with no mode parameter. The
distinction between semi and full break-in is determined by the SD
delay value: SD00 (30ms) = full/QSK, higher = semi.
Previously FBKIN set passed mode=2 to ftx1_set_breakin() which always
rejected it (-RIG_EINVAL), and FBKIN get checked mode==2 which never
matched since BI only returns 0 or 1.
Fix: add ftx1_set_cw_delay_ms()/ftx1_get_cw_delay_ms() helpers that
work directly in milliseconds. FBKIN enables break-in and sets minimum
delay (QSK). SBKIN enables break-in and bumps delay to 250ms if
currently at QSK. Get path reads both BI state and SD delay to
determine which mode is active.
(cherry picked from commit dcf65df72a)
SD command uses the same non-linear 00-33 codes as VD. Added lookup
table and closest-code search in ftx1_cw.c. Set/get now convert via
milliseconds using dot10ths_to_millis/millis_to_dot10ths with the
current keyspeed (WPM). Updated level granularity to {30, 3000, 1}
matching standard Yaesu convention.
(cherry picked from commit 61df5612f7)
Add lookup table for FTX-1 VD command's non-linear code-to-millisecond
mapping. Set path converts tenths-of-seconds to ms and finds closest VD
code. Get path converts VD code to ms then to tenths-of-seconds. Update
level granularity from raw 0-33 to Hamlib units 0-300.
(cherry picked from commit 111c865513)