feat(cat): distinct Elecraft K3/K4 backend in the rig list

The Elecraft handling was buried in the Kenwood "data mode" option, so users
couldn't find it. Add "Elecraft K3/K4" as its own entry in the CAT backend
selector. It reuses the Kenwood-dialect transport and the Kenwood USB/network
settings (the K3 emulates the Kenwood command set — a separate transport would be
a near-total duplicate), with an `elecraft` flag on the client that forces
digital modes to DATA A (MD6+DT0) — no data-mode dropdown needed. RigState still
reports Backend "kenwood" so the CW-over-CAT keyer capability keeps working.
This commit is contained in:
2026-08-08 14:15:55 +02:00
parent 626edca8ba
commit 9c757e5175
5 changed files with 56 additions and 15 deletions
+15
View File
@@ -13140,6 +13140,21 @@ func (a *App) reloadCAT() {
kw.SetDataMode(s.KenwoodDataMode)
a.cat.Start(kw)
}
case "elecraft":
// Elecraft K3/K4: the Kenwood-dialect client with the Elecraft specifics on
// (digital modes → DATA A via MD6+DT0). Reuses the Kenwood port/baud/host
// settings — the K3 emulates the Kenwood command set, so a separate transport
// would be a near-total duplicate.
if h := strings.TrimSpace(s.KenwoodHost); h != "" {
kw := cat.NewKenwoodTCP(h, s.DigitalDefault)
kw.SetElecraft(true)
a.cat.Start(kw)
} else {
kw := cat.NewKenwood(s.KenwoodPort, s.KenwoodBaud, s.DigitalDefault)
kw.SetLowerLines(s.KenwoodLowLines)
kw.SetElecraft(true)
a.cat.Start(kw)
}
case "icom":
// Native Icom CI-V over the radio's USB serial port (local control).
// Same civ protocol the network backend reuses for remote.