Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3704dbdd99 | ||
|
|
3cdf16b501 | ||
|
|
9a72afd467 | ||
|
|
e2bfe73bdb | ||
|
|
6e2e2cc3aa | ||
|
|
75d11a4069 | ||
|
|
cfe5d6f2a7 | ||
|
|
78c289d681 | ||
|
|
761f554ac0 | ||
|
|
4c1b4fd1a8 | ||
|
|
f2cc4f11cd | ||
|
|
faf084ddfc | ||
|
|
01dcd91253 | ||
|
|
3d603d34aa | ||
|
|
3d1602c4bd | ||
|
|
a10fb2413a | ||
|
|
bd8ca2e9de | ||
|
|
df56391eb8 | ||
|
|
82ce3353c4 | ||
|
|
20dc3e83a6 | ||
|
|
62cdabe114 | ||
|
|
9bfb44925b | ||
|
|
fb1af9b6a2 | ||
|
|
57a9bed145 | ||
|
|
fbd323af26 | ||
|
|
689d1cc902 | ||
|
|
67602fd485 |
@@ -52,6 +52,7 @@ import (
|
||||
"hamlog/internal/qso"
|
||||
"hamlog/internal/relaydev"
|
||||
"hamlog/internal/rigctld"
|
||||
"hamlog/internal/rotator/dcu1"
|
||||
"hamlog/internal/rotator/gs232"
|
||||
"hamlog/internal/rotator/pst"
|
||||
"hamlog/internal/rotgenius"
|
||||
@@ -236,6 +237,7 @@ const (
|
||||
keyMotorTXInhibit = "ultrabeam.tx_inhibit" // "1" → block Flex TX while the antenna is moving
|
||||
keyMotorFreqMin = "ultrabeam.freq_min" // SteppIR tunable range low edge (MHz); out-of-range = don't follow/inhibit
|
||||
keyMotorFreqMax = "ultrabeam.freq_max" // SteppIR tunable range high edge (MHz)
|
||||
keyMotorBands = "ultrabeam.bands" // CSV of bands the antenna covers (e.g. "40m,20m,17m,…"); the follow filter
|
||||
keyStationDevices = "station.devices" // JSON list of relay boards for the Station Control tab
|
||||
|
||||
// Antenna Genius (4O3A) antenna switch — Hardware → Antenna Genius. TCP
|
||||
@@ -569,7 +571,15 @@ type App struct {
|
||||
// Loaded once, appended to on each log, rebuilt after bulk changes.
|
||||
wcbm map[string]struct{}
|
||||
wcbmMu sync.RWMutex
|
||||
pota *pota.Cache
|
||||
// clusterStatusIdx caches the whole-logbook maps ClusterSpotStatuses colours
|
||||
// spots against (worked entities/calls/counties/POTA/prefixes). Building them
|
||||
// per spot batch re-scanned the entire logbook ~20×/second under an RBN
|
||||
// firehose — the dominant CPU cost on a large log. Built lazily, treated as an
|
||||
// immutable snapshot, and dropped on any logbook change (invalidateAwardStats)
|
||||
// or when a setting that shapes the maps flips.
|
||||
clusterStatusIdx *clusterStatusCache
|
||||
clusterStatusMu sync.Mutex
|
||||
pota *pota.Cache
|
||||
uls *uls.Store // US callsign→county/grid (offline FCC ULS), lazily opened
|
||||
awardRefs *awardref.Repo
|
||||
qslTemplates *qslcard.Repo
|
||||
@@ -642,6 +652,7 @@ type App struct {
|
||||
settingsScoped atomic.Bool // true once a.settings is scoped to the active profile — GetUIPref/SetUIPref (per-profile) must wait for it, else an early call reads the wrong scope and e.g. resets the theme
|
||||
dbPath string // settings/config database file (settings + profiles); may be a user-chosen location
|
||||
logbookPath string // default SQLite logbook file (QSOs), next to the settings db — used when a profile doesn't point elsewhere
|
||||
logDbPath string // resolved SQLite file actually backing logDb ("" on MySQL, or when the settings db serves as the logbook) — the file the backup snapshots
|
||||
logDb *sql.DB // QSO logbook connection — MySQL, a per-profile SQLite file, or the default logbook.db (never the settings db, except on fallback)
|
||||
dbBackend string // "sqlite" | "mysql" — the logbook backend actually opened at startup
|
||||
dbBackendErr string // non-empty when a configured MySQL backend failed and we fell back to SQLite
|
||||
@@ -1064,6 +1075,7 @@ func (a *App) startup(ctx context.Context) {
|
||||
applog.Printf("startup: logbook open failed (%v) — falling back to SQLite logbook", lerr)
|
||||
a.dbBackendErr = strings.TrimPrefix(lerr.Error(), "")
|
||||
logbookConn, backend = conn, "sqlite"
|
||||
a.logDbPath = "" // fell back to the settings db as the logbook — backup snapshots a.db
|
||||
}
|
||||
a.dbBackend = backend
|
||||
// db.Dialect describes the LOGBOOK backend — the only place SQL actually
|
||||
@@ -1521,14 +1533,9 @@ func (a *App) runBackupForShutdown() error {
|
||||
if done {
|
||||
return nil
|
||||
}
|
||||
if _, err := backup.Run(a.ctx, a.db, a.dbPath, folder, s.Rotation, s.Zip); err != nil {
|
||||
if _, err := a.runConfiguredBackup(folder, s.Rotation, s.Zip); err != nil {
|
||||
return err
|
||||
}
|
||||
if mysql {
|
||||
if _, err := a.backupLogADIF(folder, s.Rotation, s.Zip); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return a.settings.Set(a.ctx, keyBackupLast, time.Now().UTC().Format(time.RFC3339))
|
||||
}
|
||||
|
||||
@@ -2051,6 +2058,7 @@ func (a *App) connectLogbook(cfg profile.ProfileDB) (*sql.DB, string, error) {
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
a.logDbPath = "" // MySQL: no local file to snapshot (the log is exported to ADIF instead)
|
||||
return c, "mysql", nil
|
||||
}
|
||||
// SQLite logbook FILE, separate from the settings/config database. A profile
|
||||
@@ -2064,6 +2072,7 @@ func (a *App) connectLogbook(cfg profile.ProfileDB) (*sql.DB, string, error) {
|
||||
lp = a.logbookPath
|
||||
}
|
||||
if lp == "" {
|
||||
a.logDbPath = "" // settings db serves as the logbook (split failed) — backup snapshots a.db
|
||||
return a.db, "sqlite", nil
|
||||
}
|
||||
// Resolve against THIS install before opening. Without it, a profile carried
|
||||
@@ -2079,6 +2088,7 @@ func (a *App) connectLogbook(cfg profile.ProfileDB) (*sql.DB, string, error) {
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("open logbook %s: %w", lp, err)
|
||||
}
|
||||
a.logDbPath = lp // the SQLite file the backup snapshots for the contacts
|
||||
return c, "sqlite", nil
|
||||
}
|
||||
|
||||
@@ -4252,6 +4262,11 @@ func (a *App) invalidateAwardStats() {
|
||||
a.awardSnap = nil
|
||||
a.awardSnapRev = ""
|
||||
a.awardSnapMu.Unlock()
|
||||
// Drop the cluster worked-index snapshot too, so the Cluster tab's NEW/WORKED
|
||||
// colouring reflects the change on the next spot batch (it rebuilds lazily).
|
||||
a.clusterStatusMu.Lock()
|
||||
a.clusterStatusIdx = nil
|
||||
a.clusterStatusMu.Unlock()
|
||||
// Bulk QSO changes (import, delete, bulk edit) also land here — refresh the
|
||||
// worked-index so alert "needed" checks stay accurate. Async: never block the
|
||||
// mutation, and it's a single lightweight query.
|
||||
@@ -7773,6 +7788,11 @@ func (a *App) noteWorked(call, band, mode string) {
|
||||
}
|
||||
a.wcbm[wcbmKey(call, band, mode)] = struct{}{}
|
||||
a.wcbmMu.Unlock()
|
||||
// The cluster worked-index snapshot is now stale (this call/slot just became
|
||||
// worked) — drop it so the next spot batch recolours with the new QSO.
|
||||
a.clusterStatusMu.Lock()
|
||||
a.clusterStatusIdx = nil
|
||||
a.clusterStatusMu.Unlock()
|
||||
}
|
||||
|
||||
// isWorkedBandMode reports whether this exact call+band+mode is in the log,
|
||||
@@ -11813,6 +11833,33 @@ func (a *App) SaveBackupSettings(s BackupSettings) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// runConfiguredBackup writes the backup set to folder: the CONTACTS as the
|
||||
// primary "opslog-*" backup, plus a separate "opslogcfg-*" snapshot of the
|
||||
// settings/config db, so neither is lost. The contacts are what the user means
|
||||
// by "the log": on SQLite they live in the split-out logbook file (a.logDbPath),
|
||||
// NOT the settings db — the old code snapshotted a.db and so silently stopped
|
||||
// backing up the QSOs once the logbook was split out. On MySQL the contacts
|
||||
// aren't in a local file, so they're exported to ADIF instead. Returns the path
|
||||
// of the contacts backup.
|
||||
func (a *App) runConfiguredBackup(folder string, rotation int, zip bool) (string, error) {
|
||||
// Config snapshot (profiles, hardware, awards). Best-effort — a config-backup
|
||||
// failure must never stop the contacts from being protected.
|
||||
if _, err := backup.Run(a.ctx, a.db, a.dbPath, folder, rotation, zip, "opslogcfg"); err != nil {
|
||||
applog.Printf("backup: config snapshot failed: %v", err)
|
||||
}
|
||||
if a.dbBackend == "mysql" {
|
||||
// The live log is on MySQL; VACUUM INTO can't reach it — export to ADIF.
|
||||
return a.backupLogADIF(folder, rotation, zip)
|
||||
}
|
||||
// SQLite: snapshot the logbook file that holds the contacts. Fall back to the
|
||||
// settings db only when it doubles as the logbook (rare split-failure case).
|
||||
conn, path := a.logDb, a.logDbPath
|
||||
if conn == nil || path == "" {
|
||||
conn, path = a.db, a.dbPath
|
||||
}
|
||||
return backup.Run(a.ctx, conn, path, folder, rotation, zip, "opslog")
|
||||
}
|
||||
|
||||
// RunBackupNow forces an immediate backup using the persisted settings.
|
||||
// Returns the destination path of the file that was written.
|
||||
func (a *App) RunBackupNow() (string, error) {
|
||||
@@ -11824,20 +11871,10 @@ func (a *App) RunBackupNow() (string, error) {
|
||||
if folder == "" {
|
||||
folder = s.DefaultFolder
|
||||
}
|
||||
// Always snapshot the local SQLite (config + any pre-MySQL local QSOs).
|
||||
path, err := backup.Run(a.ctx, a.db, a.dbPath, folder, s.Rotation, s.Zip)
|
||||
path, err := a.runConfiguredBackup(folder, s.Rotation, s.Zip)
|
||||
if err != nil {
|
||||
return path, err
|
||||
}
|
||||
// On MySQL the live QSO log isn't in the local DB — export it to ADIF so the
|
||||
// contacts are actually protected. The ADIF path is the one we surface.
|
||||
if a.dbBackend == "mysql" {
|
||||
adiPath, aerr := a.backupLogADIF(folder, s.Rotation, s.Zip)
|
||||
if aerr != nil {
|
||||
return adiPath, aerr
|
||||
}
|
||||
path = adiPath
|
||||
}
|
||||
a.setSetting(keyBackupLast, time.Now().UTC().Format(time.RFC3339))
|
||||
return path, nil
|
||||
}
|
||||
@@ -11883,16 +11920,10 @@ func (a *App) maybeShutdownBackup() {
|
||||
if done {
|
||||
return
|
||||
}
|
||||
if _, err := backup.Run(a.ctx, a.db, a.dbPath, folder, s.Rotation, s.Zip); err != nil {
|
||||
if _, err := a.runConfiguredBackup(folder, s.Rotation, s.Zip); err != nil {
|
||||
fmt.Println("OpsLog: shutdown backup failed:", err)
|
||||
return
|
||||
}
|
||||
if mysql {
|
||||
if _, err := a.backupLogADIF(folder, s.Rotation, s.Zip); err != nil {
|
||||
fmt.Println("OpsLog: shutdown ADIF log backup failed:", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
a.setSetting(keyBackupLast, time.Now().UTC().Format(time.RFC3339))
|
||||
}
|
||||
|
||||
@@ -11987,11 +12018,10 @@ func (a *App) ultrabeamFollowNow(freqHz int64) {
|
||||
if !st.Connected {
|
||||
return
|
||||
}
|
||||
if st.FreqMin > 0 && st.FreqMax > 0 {
|
||||
mhz := freqHz / 1_000_000
|
||||
if mhz < int64(st.FreqMin) || mhz > int64(st.FreqMax) {
|
||||
return // outside the antenna's tunable range
|
||||
}
|
||||
if !motorBandAllowed(s.Bands, freqHz) {
|
||||
applog.Printf("ultrabeam: followNow %.3f MHz is %q — not in covered bands %v; no move",
|
||||
float64(freqHz)/1e6, bandForHz(freqHz), s.Bands)
|
||||
return // a band the antenna doesn't cover — leave it where it is
|
||||
}
|
||||
khz := int(freqHz / 1000)
|
||||
ref := st.Frequency
|
||||
@@ -13477,7 +13507,7 @@ type logicalRotor struct {
|
||||
|
||||
// normRotorType clamps a rotor type to a known backend.
|
||||
func normRotorType(t string) string {
|
||||
if t == "rotgenius" || t == "arco" {
|
||||
if t == "rotgenius" || t == "arco" || t == "dcu1" {
|
||||
return t
|
||||
}
|
||||
return "pst"
|
||||
@@ -13490,6 +13520,8 @@ func rotatorDefaultPort(typ string) int {
|
||||
return 9006 // 4O3A native default
|
||||
case "arco":
|
||||
return 4001 // placeholder — the real number is set in ARCO's LAN menu
|
||||
case "dcu1":
|
||||
return 4001 // only used with a serial-over-IP bridge; DCU-1 has no standard
|
||||
default:
|
||||
return 12000 // PstRotator UDP
|
||||
}
|
||||
@@ -13682,6 +13714,16 @@ func arcoClient(l rotorLink) *gs232.Client {
|
||||
return gs232.New(l.Host, l.Port)
|
||||
}
|
||||
|
||||
// dcu1Client builds the Hy-Gain DCU-1 client for a rotor's transport: the
|
||||
// controller's COM port (the usual case — RotorCard DXA, Green Heron, Rotor-EZ)
|
||||
// or a serial-over-IP bridge on TCP.
|
||||
func dcu1Client(l rotorLink) *dcu1.Client {
|
||||
if l.Transport == "serial" {
|
||||
return dcu1.NewSerial(l.ComPort, l.Baud)
|
||||
}
|
||||
return dcu1.New(l.Host, l.Port)
|
||||
}
|
||||
|
||||
// RotatorHeading is the live antenna heading for the status bar and compass.
|
||||
type RotatorHeading struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
@@ -13748,6 +13790,16 @@ func (a *App) GetRotatorHeading() RotatorHeading {
|
||||
base.Azimuth = az
|
||||
base.Raw = raw
|
||||
return base
|
||||
case "dcu1":
|
||||
az, raw, herr := dcu1Client(link).Heading()
|
||||
if herr != nil {
|
||||
base.Raw = herr.Error()
|
||||
return base
|
||||
}
|
||||
base.OK = true
|
||||
base.Azimuth = az
|
||||
base.Raw = raw
|
||||
return base
|
||||
default:
|
||||
az, raw, herr := pst.New(link.Host, link.Port).Heading()
|
||||
if herr != nil {
|
||||
@@ -13774,6 +13826,8 @@ func (a *App) RotatorGoTo(az int, el int) error {
|
||||
return rotgenius.New(link.Host, link.Port).GoTo(link.Num, az)
|
||||
case "arco":
|
||||
return arcoClient(link).GoTo(az)
|
||||
case "dcu1":
|
||||
return dcu1Client(link).GoTo(az)
|
||||
default:
|
||||
return pst.New(link.Host, link.Port).GoTo(az, link.HasElevation, el)
|
||||
}
|
||||
@@ -13791,6 +13845,8 @@ func (a *App) RotatorStop() error {
|
||||
return rotgenius.New(link.Host, link.Port).Stop()
|
||||
case "arco":
|
||||
return arcoClient(link).Stop()
|
||||
case "dcu1":
|
||||
return dcu1Client(link).Stop()
|
||||
default:
|
||||
return pst.New(link.Host, link.Port).Stop()
|
||||
}
|
||||
@@ -13809,6 +13865,8 @@ func (a *App) RotatorPark() error {
|
||||
return fmt.Errorf("park is a PstRotator feature; not available on the Rotator Genius")
|
||||
case "arco":
|
||||
return fmt.Errorf("park is a PstRotator feature; not available over the ARCO GS-232 link")
|
||||
case "dcu1":
|
||||
return fmt.Errorf("park is a PstRotator feature; not available over the DCU-1 link")
|
||||
default:
|
||||
return pst.New(link.Host, link.Port).Park()
|
||||
}
|
||||
@@ -13847,6 +13905,14 @@ func testRotorLink(l rotorLink) error {
|
||||
// GS-232 — without moving the antenna.
|
||||
_, _, err := arcoClient(l).Heading()
|
||||
return err
|
||||
case "dcu1":
|
||||
if l.Transport == "serial" && strings.TrimSpace(l.ComPort) == "" {
|
||||
return fmt.Errorf("select the DCU-1 controller's COM port first")
|
||||
}
|
||||
// A bearing query (AI1) proves the link and the DCU-1 command set without
|
||||
// moving the antenna.
|
||||
_, _, err := dcu1Client(l).Heading()
|
||||
return err
|
||||
default:
|
||||
return pst.New(l.Host, l.Port).GoTo(0, false, -1)
|
||||
}
|
||||
@@ -14147,7 +14213,17 @@ type motorAntenna interface {
|
||||
// ubAdapter / steppirAdapter wrap each concrete client to the shared interface,
|
||||
// translating only the status shape (both already use the same 0/1/2 direction
|
||||
// convention, so commands pass straight through).
|
||||
type ubAdapter struct{ c *ultrabeam.Client }
|
||||
type ubAdapter struct {
|
||||
c *ultrabeam.Client
|
||||
// Configured tunable range (MHz) from Settings → Antenna. The follow logic
|
||||
// uses this as a hard floor/ceiling: some controllers (e.g. an RCU-06 behind
|
||||
// an RS232-to-Ethernet bridge) answer with the short status frame that omits
|
||||
// FreqMax, which would disable the out-of-range guard and let OpsLog forward
|
||||
// an un-tunable frequency (80 m → the controller clamps the elements to its
|
||||
// lowest band, ~30 m). Trusting the operator's configured range instead keeps
|
||||
// the antenna put on bands it can't reach.
|
||||
freqMin, freqMax int
|
||||
}
|
||||
|
||||
func (a ubAdapter) Start() error { return a.c.Start() }
|
||||
func (a ubAdapter) Stop() { a.c.Stop() }
|
||||
@@ -14168,7 +14244,18 @@ func (a ubAdapter) Status() motorStatus {
|
||||
if err != nil || st == nil {
|
||||
return motorStatus{}
|
||||
}
|
||||
return motorStatus{Connected: st.Connected, Direction: st.Direction, Frequency: st.Frequency, Band: st.Band, Moving: st.MotorsMoving != 0, FreqMin: st.FreqMin, FreqMax: st.FreqMax}
|
||||
// Prefer the operator's configured range; fall back to whatever the controller
|
||||
// self-reported only when a bound is left unset. This guarantees BOTH bounds
|
||||
// are present so the follow guard actually engages — a controller that reports
|
||||
// FreqMin but not FreqMax (short status frame) would otherwise disable it.
|
||||
fmin, fmax := a.freqMin, a.freqMax
|
||||
if fmin <= 0 {
|
||||
fmin = st.FreqMin
|
||||
}
|
||||
if fmax <= 0 {
|
||||
fmax = st.FreqMax
|
||||
}
|
||||
return motorStatus{Connected: st.Connected, Direction: st.Direction, Frequency: st.Frequency, Band: st.Band, Moving: st.MotorsMoving != 0, FreqMin: fmin, FreqMax: fmax}
|
||||
}
|
||||
|
||||
type steppirAdapter struct {
|
||||
@@ -14210,10 +14297,15 @@ type UltrabeamSettings struct {
|
||||
Follow bool `json:"follow"` // re-tune the antenna to the rig's frequency
|
||||
StepKHz int `json:"step_khz"` // re-tune only when the freq moved this far (25/50/100)
|
||||
TXInhibit bool `json:"tx_inhibit"` // block Flex transmission while the elements are moving
|
||||
// SteppIR tunable range (MHz). The follow loop skips frequencies outside it —
|
||||
// no tune command AND no TX inhibit — so a band the antenna can't cover (e.g.
|
||||
// 30 m on a 20 m–6 m SteppIR) never traps TX. Ignored for the Ultrabeam, which
|
||||
// reports its own per-band coverage. 0 = defaults filled in on load for SteppIR.
|
||||
// Bands the antenna covers — the follow filter. The follow loop only re-tunes
|
||||
// (and only lets TX-inhibit trigger) on a band in this set; on any other band
|
||||
// the antenna is left where it is. Expressed as a set rather than a min/max
|
||||
// range so a single band can be dropped (e.g. 30 m without its extension) while
|
||||
// its neighbours stay. Applies to BOTH the Ultrabeam and the SteppIR.
|
||||
Bands []string `json:"bands"`
|
||||
// Legacy tunable range (MHz). Superseded by Bands; kept so an older config
|
||||
// migrates cleanly (the range is converted to a band set on load) and so the
|
||||
// value round-trips. Not used by the follow filter once Bands is set.
|
||||
FreqMinMHz int `json:"freq_min_mhz"`
|
||||
FreqMaxMHz int `json:"freq_max_mhz"`
|
||||
}
|
||||
@@ -14227,7 +14319,7 @@ func (a *App) GetUltrabeamSettings() (UltrabeamSettings, error) {
|
||||
return out, fmt.Errorf("db not initialized")
|
||||
}
|
||||
m, err := a.settings.GetMany(a.ctx, keyUltrabeamEnabled, keyUltrabeamHost, keyUltrabeamPort, keyUltrabeamFollow, keyUltrabeamStep,
|
||||
keyMotorType, keyMotorTransport, keyMotorCOM, keyMotorBaud, keyMotorTXInhibit, keyMotorFreqMin, keyMotorFreqMax)
|
||||
keyMotorType, keyMotorTransport, keyMotorCOM, keyMotorBaud, keyMotorTXInhibit, keyMotorFreqMin, keyMotorFreqMax, keyMotorBands)
|
||||
if err != nil {
|
||||
return out, err
|
||||
}
|
||||
@@ -14253,17 +14345,20 @@ func (a *App) GetUltrabeamSettings() (UltrabeamSettings, error) {
|
||||
}
|
||||
out.FreqMinMHz, _ = strconv.Atoi(m[keyMotorFreqMin])
|
||||
out.FreqMaxMHz, _ = strconv.Atoi(m[keyMotorFreqMax])
|
||||
// A SteppIR doesn't report its coverage, so default to the standard 20 m–6 m
|
||||
// range (13–54 MHz) when unset — the common model. Widen it (e.g. min 6 for a
|
||||
// 40 m-equipped SteppIR) in Settings. This is what lets the follow loop leave
|
||||
// TX alone on a band the antenna can't reach.
|
||||
if out.Type == "steppir" {
|
||||
if out.FreqMinMHz <= 0 {
|
||||
out.FreqMinMHz = 13
|
||||
}
|
||||
if out.FreqMaxMHz <= 0 {
|
||||
out.FreqMaxMHz = 54
|
||||
// Bands is the follow filter. If it was saved, use it verbatim. Otherwise this
|
||||
// is a config from before the band selector: migrate the legacy FreqMin/FreqMax
|
||||
// range into a band set so the effective coverage is unchanged (an unset range
|
||||
// on a SteppIR is treated as the standard 20 m–6 m; an unset range on the
|
||||
// Ultrabeam becomes the whole 40 m–6 m universe, which still excludes 80 m).
|
||||
if raw := strings.TrimSpace(m[keyMotorBands]); raw != "" {
|
||||
out.Bands = normMotorBands(strings.Split(raw, ","))
|
||||
}
|
||||
if len(out.Bands) == 0 {
|
||||
minMHz, maxMHz := out.FreqMinMHz, out.FreqMaxMHz
|
||||
if out.Type == "steppir" && minMHz <= 0 && maxMHz <= 0 {
|
||||
minMHz, maxMHz = 13, 54
|
||||
}
|
||||
out.Bands = motorBandsFromRange(minMHz, maxMHz)
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
@@ -14299,6 +14394,14 @@ func (a *App) SaveUltrabeamSettings(s UltrabeamSettings) error {
|
||||
if s.FreqMinMHz > 0 && s.FreqMaxMHz > 0 && s.FreqMinMHz > s.FreqMaxMHz {
|
||||
s.FreqMinMHz, s.FreqMaxMHz = s.FreqMaxMHz, s.FreqMinMHz
|
||||
}
|
||||
// Bands is the follow filter. Normalise to known bands in canonical order; an
|
||||
// empty selection would strand the antenna on every band, so fall back to the
|
||||
// full universe (which still excludes 80 m/160 m — outside a motor antenna's
|
||||
// reach) rather than persist "nothing".
|
||||
s.Bands = normMotorBands(s.Bands)
|
||||
if len(s.Bands) == 0 {
|
||||
s.Bands = motorBandNames()
|
||||
}
|
||||
for k, v := range map[string]string{
|
||||
keyUltrabeamEnabled: boolStr(s.Enabled),
|
||||
keyUltrabeamHost: strings.TrimSpace(s.Host),
|
||||
@@ -14312,6 +14415,7 @@ func (a *App) SaveUltrabeamSettings(s UltrabeamSettings) error {
|
||||
keyMotorTXInhibit: boolStr(s.TXInhibit),
|
||||
keyMotorFreqMin: strconv.Itoa(s.FreqMinMHz),
|
||||
keyMotorFreqMax: strconv.Itoa(s.FreqMaxMHz),
|
||||
keyMotorBands: strings.Join(s.Bands, ","),
|
||||
} {
|
||||
if err := a.settings.Set(a.ctx, k, v); err != nil {
|
||||
return err
|
||||
@@ -14339,7 +14443,7 @@ func newMotorClient(s UltrabeamSettings) motorAntenna {
|
||||
if strings.TrimSpace(s.Host) == "" {
|
||||
return nil
|
||||
}
|
||||
return ubAdapter{ultrabeam.New(s.Host, s.Port)}
|
||||
return ubAdapter{c: ultrabeam.New(s.Host, s.Port), freqMin: s.FreqMinMHz, freqMax: s.FreqMaxMHz}
|
||||
}
|
||||
|
||||
// startUltrabeam stops any existing client and starts a fresh one if the
|
||||
@@ -14375,15 +14479,110 @@ func (a *App) startUltrabeam() {
|
||||
if s.Follow {
|
||||
stop := make(chan struct{})
|
||||
a.ubFollowStop = stop
|
||||
go a.ultrabeamFollowLoop(a.motorAnt, s.StepKHz, stop)
|
||||
applog.Printf("ultrabeam: follow loop starting — covered bands %v, step %d kHz", s.Bands, s.StepKHz)
|
||||
go a.ultrabeamFollowLoop(a.motorAnt, s.StepKHz, s.Bands, stop)
|
||||
}
|
||||
if s.TXInhibit {
|
||||
stop := make(chan struct{})
|
||||
a.motorInhibStop = stop
|
||||
go a.motorTXInhibitLoop(a.motorAnt, stop)
|
||||
go a.motorTXInhibitLoop(a.motorAnt, s.Bands, stop)
|
||||
}
|
||||
}
|
||||
|
||||
// motorBands is the band universe a motorized HF/6 m antenna (Ultrabeam / SteppIR)
|
||||
// can cover, low to high. The follow filter is expressed as a SUBSET of these, so
|
||||
// an operator can drop a single band (e.g. 30 m, when the 30 m extension isn't
|
||||
// fitted) while keeping its neighbours — something a contiguous min/max range
|
||||
// can't express. nomMHz is a representative in-band frequency, used only to
|
||||
// migrate a legacy FreqMin/FreqMax range into a band set.
|
||||
var motorBands = []struct {
|
||||
name string
|
||||
nomMHz int
|
||||
}{
|
||||
{"40m", 7}, {"30m", 10}, {"20m", 14}, {"17m", 18},
|
||||
{"15m", 21}, {"12m", 24}, {"10m", 28}, {"6m", 50},
|
||||
}
|
||||
|
||||
// motorBandNames is the full ordered set (all bands enabled).
|
||||
func motorBandNames() []string {
|
||||
out := make([]string, len(motorBands))
|
||||
for i, b := range motorBands {
|
||||
out[i] = b.name
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// normMotorBands keeps only recognised motor bands, canonical low→high order,
|
||||
// de-duplicated.
|
||||
func normMotorBands(in []string) []string {
|
||||
want := map[string]bool{}
|
||||
for _, s := range in {
|
||||
want[strings.TrimSpace(strings.ToLower(s))] = true
|
||||
}
|
||||
out := []string{}
|
||||
for _, b := range motorBands {
|
||||
if want[b.name] {
|
||||
out = append(out, b.name)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// motorBandsFromRange derives the enabled-band set from a legacy FreqMin/FreqMax
|
||||
// range (MHz) — a one-time migration to the band selector. An empty/zero range
|
||||
// means "everything the antenna universe covers".
|
||||
func motorBandsFromRange(minMHz, maxMHz int) []string {
|
||||
if minMHz <= 0 && maxMHz <= 0 {
|
||||
return motorBandNames()
|
||||
}
|
||||
hi := maxMHz
|
||||
if hi <= 0 {
|
||||
hi = 9999
|
||||
}
|
||||
out := []string{}
|
||||
for _, b := range motorBands {
|
||||
if b.nomMHz >= minMHz && b.nomMHz <= hi {
|
||||
out = append(out, b.name)
|
||||
}
|
||||
}
|
||||
if len(out) == 0 { // a nonsensical range shouldn't strand the antenna on every band
|
||||
return motorBandNames()
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// motorBandAllowed reports whether the follow logic may retune the antenna for a
|
||||
// rig sitting at hz, given the operator's enabled-band list. A frequency outside
|
||||
// the motor band universe (e.g. 80 m / 160 m) is NEVER allowed, so OpsLog won't
|
||||
// push the antenna onto a band it physically can't reach. An empty list is
|
||||
// treated as "every band in the universe" (a safety fallback — the settings
|
||||
// loader normally fills the list).
|
||||
func motorBandAllowed(bands []string, hz int64) bool {
|
||||
b := bandForHz(hz)
|
||||
if b == "" {
|
||||
return false
|
||||
}
|
||||
inUniverse := false
|
||||
for _, m := range motorBands {
|
||||
if m.name == b {
|
||||
inUniverse = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !inUniverse {
|
||||
return false
|
||||
}
|
||||
if len(bands) == 0 {
|
||||
return true
|
||||
}
|
||||
for _, x := range bands {
|
||||
if x == b {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// ultrabeamFollowLoop re-tunes the antenna to the rig's current frequency
|
||||
// whenever it drifts at least stepKHz from what the antenna is set to — so the
|
||||
// elements track the band without the motors chasing every small QSY. Runs
|
||||
@@ -14421,7 +14620,7 @@ func (a *App) applyMotorInhibit(on bool) {
|
||||
// active; it errs toward SAFE — TX is inhibited while the status reports motion
|
||||
// OR within a grace window after a commanded move — and always releases the
|
||||
// inhibit when it stops (so a settings change / shutdown never leaves TX blocked).
|
||||
func (a *App) motorTXInhibitLoop(c motorAntenna, stop <-chan struct{}) {
|
||||
func (a *App) motorTXInhibitLoop(c motorAntenna, bands []string, stop <-chan struct{}) {
|
||||
const grace = 3 * time.Second // cover the poll latency at the very start of a move
|
||||
ticker := time.NewTicker(300 * time.Millisecond)
|
||||
defer ticker.Stop()
|
||||
@@ -14434,12 +14633,23 @@ func (a *App) motorTXInhibitLoop(c motorAntenna, stop <-chan struct{}) {
|
||||
st := c.Status()
|
||||
recentCmd := time.Since(time.Unix(0, a.motorMoveCmdNs.Load())) < grace
|
||||
moving := st.Connected && (st.Moving || recentCmd)
|
||||
// On a band the antenna doesn't cover, OpsLog never commands a move —
|
||||
// so it must never gag TX for "antenna moving" either. Otherwise a
|
||||
// stray polled Moving flag, or a move finishing from the previous band,
|
||||
// blocks the operator's transmit on a band they work with a different
|
||||
// antenna (the whole point of un-ticking the band). Hands off means
|
||||
// hands off: no tune AND no inhibit.
|
||||
if moving && a.cat != nil {
|
||||
if rs := a.cat.State(); rs.Connected && rs.FreqHz > 0 && !motorBandAllowed(bands, rs.FreqHz) {
|
||||
moving = false
|
||||
}
|
||||
}
|
||||
a.applyMotorInhibit(moving)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) ultrabeamFollowLoop(c motorAntenna, stepKHz int, stop <-chan struct{}) {
|
||||
func (a *App) ultrabeamFollowLoop(c motorAntenna, stepKHz int, bands []string, stop <-chan struct{}) {
|
||||
if stepKHz <= 0 {
|
||||
stepKHz = 50
|
||||
}
|
||||
@@ -14468,17 +14678,22 @@ func (a *App) ultrabeamFollowLoop(c motorAntenna, stepKHz int, stop <-chan struc
|
||||
// follow loop chases. If the antenna QSYs unexpectedly, this shows the
|
||||
// CAT backend started reporting that frequency (e.g. WSJT-X moved the
|
||||
// dial, or the active slice changed) even though you didn't touch the VFO.
|
||||
if rigKHz != lastRigKHz {
|
||||
newFreq := rigKHz != lastRigKHz
|
||||
if newFreq {
|
||||
applog.Printf("ultrabeam: follow loop reads rig freq %.3f MHz (mode %s) — antenna at %d kHz, step %d kHz",
|
||||
float64(rs.FreqHz)/1e6, rs.Mode, st.Frequency, stepKHz)
|
||||
lastRigKHz = rigKHz
|
||||
}
|
||||
// Skip frequencies outside the antenna's tunable range (other band).
|
||||
if st.FreqMin > 0 && st.FreqMax > 0 {
|
||||
rigMHz := rs.FreqHz / 1_000_000
|
||||
if rigMHz < int64(st.FreqMin) || rigMHz > int64(st.FreqMax) {
|
||||
continue
|
||||
// Skip bands the antenna doesn't cover (per the operator's band list) —
|
||||
// no tune command, so the elements stay where they are on 80 m, an
|
||||
// un-fitted 30 m, etc. Log the decision once per QSY so "why did/didn't
|
||||
// the antenna move" is answerable from the log.
|
||||
if !motorBandAllowed(bands, rs.FreqHz) {
|
||||
if newFreq {
|
||||
applog.Printf("ultrabeam: %.3f MHz is %q — not in covered bands %v; leaving the antenna put",
|
||||
float64(rs.FreqHz)/1e6, bandForHz(rs.FreqHz), bands)
|
||||
}
|
||||
continue
|
||||
}
|
||||
// Deadband reference = the rig freq we LAST commanded a move for, not the
|
||||
// antenna's reported freq. A SteppIR reports a flaky/stale status
|
||||
@@ -15889,18 +16104,46 @@ type SpotStatus struct {
|
||||
Pfx string `json:"pfx,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterSpotStatuses takes a batch of spots and returns slot status for
|
||||
// each. Used by the Cluster tab to color rows (NEW / NEW BAND / NEW SLOT
|
||||
// / WORKED). One cty.dat lookup + one DB scan, regardless of batch size.
|
||||
//
|
||||
// Mode handling: when the caller passes an empty Mode (cluster comment
|
||||
// was ambiguous and the frontend couldn't infer) we degrade gracefully
|
||||
// to band-only — saying "worked" rather than wrongly flagging "new-slot"
|
||||
// just because we don't know the mode.
|
||||
func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
||||
out := make([]SpotStatus, len(spots))
|
||||
// clusterStatusCache holds the whole-logbook maps ClusterSpotStatuses colours
|
||||
// spots against. Rebuilding them per spot batch re-scanned the entire logbook
|
||||
// ~20×/second under an RBN firehose — the dominant CPU cost on a large log. This
|
||||
// is an immutable snapshot: once built its maps are never mutated, so a batch
|
||||
// that already holds the pointer keeps reading valid (stale-by-one-log) data
|
||||
// while a newer snapshot is being built. See clusterStatusMaps.
|
||||
type clusterStatusCache struct {
|
||||
entities map[int]*qso.EntitySlot
|
||||
workedCalls map[string]struct{}
|
||||
workedCallSlots map[string]struct{} // nil unless the "same slot" option is on
|
||||
workedCounties map[string]struct{}
|
||||
workedPOTA map[string]struct{}
|
||||
workedPfx map[string]struct{}
|
||||
normMode func(string) string // nil unless digital-mode grouping is on
|
||||
groupDigital bool // settings the maps were built under —
|
||||
sameSlot bool // a change rebuilds the snapshot
|
||||
}
|
||||
|
||||
// clusterStatusMaps returns the cached worked-index snapshot, building it once
|
||||
// per logbook change (invalidated by invalidateAwardStats) or when a setting
|
||||
// that shapes the maps flips. This turns the per-batch full-logbook scans into
|
||||
// one scan per logged QSO — the fix for the RBN-firehose CPU pegging.
|
||||
func (a *App) clusterStatusMaps() *clusterStatusCache {
|
||||
groupDigital := a.groupDigitalSlots()
|
||||
sameSlot := a.clusterWorkedSameSlot()
|
||||
a.clusterStatusMu.Lock()
|
||||
defer a.clusterStatusMu.Unlock()
|
||||
if c := a.clusterStatusIdx; c != nil && c.groupDigital == groupDigital && c.sameSlot == sameSlot {
|
||||
return c
|
||||
}
|
||||
c := &clusterStatusCache{groupDigital: groupDigital, sameSlot: sameSlot}
|
||||
if a.qso == nil {
|
||||
return out
|
||||
a.clusterStatusIdx = c
|
||||
return c
|
||||
}
|
||||
// Optional digital-mode grouping (Settings → General): with it on, FT8/FT4/
|
||||
// RTTY… all count as ONE "DIG" mode, so an FT4 spot on a band where FT8 was
|
||||
// worked shows "worked", not "new-slot" — DXCC-style mode classes.
|
||||
if groupDigital {
|
||||
c.normMode = qso.GroupDigitalMode
|
||||
}
|
||||
// Compare by DXCC entity NUMBER, not name. For each logged QSO the key is
|
||||
// its stored DXCC if present (the authoritative value set at log time, incl.
|
||||
@@ -15923,43 +16166,58 @@ func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
||||
}
|
||||
return 0
|
||||
}
|
||||
// Optional digital-mode grouping (Settings → General): with it on, FT8/FT4/
|
||||
// RTTY… all count as ONE "DIG" mode, so an FT4 spot on a band where FT8 was
|
||||
// worked shows "worked", not "new-slot" — DXCC-style mode classes.
|
||||
var normMode func(string) string
|
||||
if a.groupDigitalSlots() {
|
||||
normMode = qso.GroupDigitalMode
|
||||
}
|
||||
entities, err := a.qso.EntitySlotMap(a.ctx, keyFor, normMode)
|
||||
if err != nil {
|
||||
return out
|
||||
}
|
||||
c.entities, _ = a.qso.EntitySlotMap(a.ctx, keyFor, c.normMode)
|
||||
// Per-call worked set — separate from the entity check so we can flag
|
||||
// "I've already QSO'd this exact station" even when the band/mode
|
||||
// makes the entity check say "new-band" or "new-slot".
|
||||
workedCalls, _ := a.qso.WorkedCallsigns(a.ctx)
|
||||
c.workedCalls, _ = a.qso.WorkedCallsigns(a.ctx)
|
||||
// "Already worked only on the same slot" option (Settings → DX Cluster): the
|
||||
// WORKED-call flag then needs the SAME band and mode (digital-grouped through
|
||||
// the same normMode when that option is on) rather than the call anywhere.
|
||||
sameSlot := a.clusterWorkedSameSlot()
|
||||
var workedCallSlots map[string]struct{}
|
||||
if sameSlot {
|
||||
workedCallSlots, _ = a.qso.WorkedCallSlotKeys(a.ctx, normMode)
|
||||
c.workedCallSlots, _ = a.qso.WorkedCallSlotKeys(a.ctx, c.normMode)
|
||||
}
|
||||
// Orthogonal dimensions: worked US counties (for the ULS callsign→county
|
||||
// lookup) and worked POTA parks. Both built once per batch.
|
||||
workedCounties, _ := a.qso.WorkedCountyKeys(a.ctx, award.USCountyKey)
|
||||
workedPOTA, _ := a.qso.WorkedPOTARefs(a.ctx)
|
||||
// lookup) and worked POTA parks.
|
||||
c.workedCounties, _ = a.qso.WorkedCountyKeys(a.ctx, award.USCountyKey)
|
||||
c.workedPOTA, _ = a.qso.WorkedPOTARefs(a.ctx)
|
||||
// Worked WPX prefixes, derived from the callsigns we already loaded — no
|
||||
// extra query. Derived rather than read from the stored PFX column: that
|
||||
// column is only filled when an import supplied it, and deriving keeps this
|
||||
// in step with the WPX award, which does the same thing.
|
||||
workedPfx := make(map[string]struct{}, len(workedCalls))
|
||||
for c := range workedCalls {
|
||||
if p := award.WPXPrefix(c); p != "" {
|
||||
workedPfx[p] = struct{}{}
|
||||
c.workedPfx = make(map[string]struct{}, len(c.workedCalls))
|
||||
for call := range c.workedCalls {
|
||||
if p := award.WPXPrefix(call); p != "" {
|
||||
c.workedPfx[p] = struct{}{}
|
||||
}
|
||||
}
|
||||
a.clusterStatusIdx = c
|
||||
return c
|
||||
}
|
||||
|
||||
// ClusterSpotStatuses takes a batch of spots and returns slot status for
|
||||
// each. Used by the Cluster tab to color rows (NEW / NEW BAND / NEW SLOT
|
||||
// / WORKED). Reads the cached worked-index snapshot (clusterStatusMaps) so a
|
||||
// spot batch never re-scans the logbook — critical under an RBN firehose.
|
||||
//
|
||||
// Mode handling: when the caller passes an empty Mode (cluster comment
|
||||
// was ambiguous and the frontend couldn't infer) we degrade gracefully
|
||||
// to band-only — saying "worked" rather than wrongly flagging "new-slot"
|
||||
// just because we don't know the mode.
|
||||
func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
||||
out := make([]SpotStatus, len(spots))
|
||||
if a.qso == nil {
|
||||
return out
|
||||
}
|
||||
idx := a.clusterStatusMaps()
|
||||
entities := idx.entities
|
||||
workedCalls := idx.workedCalls
|
||||
workedCallSlots := idx.workedCallSlots
|
||||
workedCounties := idx.workedCounties
|
||||
workedPOTA := idx.workedPOTA
|
||||
workedPfx := idx.workedPfx
|
||||
normMode := idx.normMode
|
||||
sameSlot := idx.sameSlot
|
||||
for i, q := range spots {
|
||||
out[i] = SpotStatus{
|
||||
Call: q.Call,
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
wruntime "github.com/wailsapp/wails/v2/pkg/runtime"
|
||||
)
|
||||
|
||||
// keyAwardsTracked holds the PER-PROFILE list of award codes the operator wants
|
||||
// to follow (JSON array of award.Def.Code). Award definitions themselves are
|
||||
// global (keyAwardDefs, shared across profiles), but WHICH awards a station
|
||||
// tracks is a per-profile choice — a DX profile follows DXCC/WPX, a POTA profile
|
||||
// follows POTA/WWFF. An empty/unset list means "track them all" so the Awards
|
||||
// tab is never blank before the operator has picked anything.
|
||||
const keyAwardsTracked = "awards.tracked"
|
||||
|
||||
// GetTrackedAwards returns the active profile's followed award codes. An empty
|
||||
// slice means the operator has not narrowed the list — the Awards tab then shows
|
||||
// every award.
|
||||
func (a *App) GetTrackedAwards() ([]string, error) {
|
||||
out := []string{}
|
||||
if a.settings == nil {
|
||||
return out, nil
|
||||
}
|
||||
s, _ := a.settings.Get(a.ctx, keyAwardsTracked)
|
||||
if strings.TrimSpace(s) == "" {
|
||||
return out, nil
|
||||
}
|
||||
if err := json.Unmarshal([]byte(s), &out); err != nil {
|
||||
return []string{}, nil
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SaveTrackedAwards persists the followed award codes for the active profile and
|
||||
// notifies the Awards tab to re-filter its list. Codes are stored verbatim; the
|
||||
// Awards tab intersects them with the live award definitions, so a code that no
|
||||
// longer exists is simply ignored (not an error).
|
||||
func (a *App) SaveTrackedAwards(codes []string) error {
|
||||
if a.settings == nil {
|
||||
return fmt.Errorf("db not initialized")
|
||||
}
|
||||
if codes == nil {
|
||||
codes = []string{}
|
||||
}
|
||||
b, err := json.Marshal(codes)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := a.settings.Set(a.ctx, keyAwardsTracked, string(b)); err != nil {
|
||||
return err
|
||||
}
|
||||
wruntime.EventsEmit(a.ctx, "awards:tracked-changed")
|
||||
return nil
|
||||
}
|
||||
+18902
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,50 @@
|
||||
[
|
||||
{
|
||||
"version": "0.23.8",
|
||||
"date": "",
|
||||
"en": [
|
||||
"E-mail: the QSO recording e-mail (subject and body) is now editable in Settings → E-mail, like the QSL card e-mail — with the {CALL} {DATE} {BAND} {MODE} {MYCALL} variables.",
|
||||
"Backup fix: the backup now saves your CONTACTS (the logbook), not just the settings. Once the logbook was split into its own file, the backup kept snapshotting the settings database and silently missed the QSOs. It now writes the log to opslog-*.db and the configuration separately to opslogcfg-*.db (MySQL logs still export to ADIF).",
|
||||
"Performance: much lower CPU and memory on a busy cluster (RBN and other high-volume feeds). The Cluster tab was re-scanning the entire logbook for every batch of spots (~20×/second) and its spot-status cache grew without limit — on a firehose that could climb to gigabytes of RAM and peg a CPU. The worked-index is now cached (rebuilt only when you log a QSO) and the status cache is bounded to the spots actually shown."
|
||||
],
|
||||
"fr": [
|
||||
"E-mail : le texte de l'e-mail d'enregistrement QSO (objet et corps) est désormais modifiable dans Réglages → E-mail, comme l'e-mail de carte QSL — avec les variables {CALL} {DATE} {BAND} {MODE} {MYCALL}.",
|
||||
"Correction sauvegarde : la sauvegarde enregistre désormais tes CONTACTS (le journal), et plus seulement les réglages. Depuis que le journal a été séparé dans son propre fichier, la sauvegarde continuait à copier la base des réglages et oubliait les QSO. Elle écrit maintenant le log dans opslog-*.db et la configuration à part dans opslogcfg-*.db (les logs MySQL restent exportés en ADIF).",
|
||||
"Performances : CPU et mémoire nettement réduits sur un cluster chargé (RBN et autres flux à fort volume). L'onglet Cluster rescannait tout le journal à chaque lot de spots (~20×/seconde) et son cache de statuts grossissait sans limite — sur un flux intense cela pouvait atteindre des gigaoctets de RAM et saturer un cœur. L'index des contacts est désormais mis en cache (reconstruit seulement quand tu logues un QSO) et le cache de statuts est borné aux spots réellement affichés."
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "0.23.7",
|
||||
"date": "",
|
||||
"en": [
|
||||
"QSO edit: added the QRZ ↗ button next to the callsign, like the main entry form — one click opens that station's qrz.com profile.",
|
||||
"PowerGenius XL: the fan mode (Standard / Contest / Broadcast) changes on the amp again. A previous fix dropped the \"setup\" prefix the amp requires (\"setup fanmode=…\"), so the amp rejected the command and the mode snapped straight back. The correct command is restored.",
|
||||
"Performance: fixed a slowdown introduced in 0.23.6. To dim the \"represents nothing\" spots, the DX Cluster grid was redrawing EVERY row on each spot-status update, which pegged the CPU on a busy cluster (some PCs became sluggish). The dimming now updates with a light per-cell refresh instead — same look, no more churn.",
|
||||
"DX Cluster: after you log a QSO, the spots update — a callsign, entity, POTA, prefix or band/mode slot you just worked stops showing its NEW badge, instead of staying \"new\" until a restart. Kept fast: it re-evaluates only while the cluster is actually on screen (nothing runs otherwise — a QSO logged while it's hidden refreshes once when you next open it), and it's debounced so a quick run doesn't re-scan on every QSO.",
|
||||
"Station Control relays (WebSwitch / KMTronic / Dingtian): the Host field now accepts a full URL, so you can reach a network relay board through an HTTPS reverse proxy — e.g. https://relay.yourdomain.com.",
|
||||
"Stats slot drill-down: the pop-up listing the QSOs behind a band/mode square looks tidier (banded rows, cleaner header), and you can now click a callsign in it to open that QSO for editing.",
|
||||
"DCU-1 rotor support: OpsLog can now steer controllers that speak the Hy-Gain DCU-1 protocol (RotorCard DXA for Yaesu DXA rotors, Idiom Press Rotor-EZ, Green Heron) over their COM port or a serial-over-IP bridge.",
|
||||
"Motorized antenna: Settings → Antenna now has a Covered bands selector (40 m–6 m) instead of a min/max range, for both the Ultrabeam and the SteppIR. Tick only the bands your antenna does — untick one you can't (e.g. 30 m without its extension) while keeping the rest — and OpsLog leaves the antenna put on every other band. This overrides an unreliable controller, so 80 m no longer clamps the elements down to 30 m. Existing range settings migrate automatically.",
|
||||
"Motorized antenna: on a band you did not tick in Covered bands, OpsLog no longer inhibits FlexRadio transmit for \"antenna moving\". Un-ticking a band now means hands off completely — no tuning and no TX block — so working it on another antenna is never gagged.",
|
||||
"Awards: a new Settings → Awards picker (under User configuration) lets you choose which awards to follow — a two-column list, all awards on the left, the ones you track on the right. The Awards tab then shows only those you follow (per profile; leave the right side empty to show them all).",
|
||||
"Kenwood/Elecraft CAT: the link no longer drops while the rig is transmitting. A K3 (and other Kenwood-dialect rigs) answers \"?;\" to a status poll during transmit; OpsLog used to read that as \"rig doesn't support IF\" and disconnect — which tore down the shared CAT that WSJT-X / JTDX key through, so the radio wouldn't transmit properly. OpsLog now pauses status polling while PTT is held and keeps the link up.",
|
||||
"New award: Russian District Award (RDA) — tracks the 2660 Russian districts, worked and confirmed per band."
|
||||
],
|
||||
"fr": [
|
||||
"Édition de QSO : ajout du bouton QRZ ↗ à côté de l'indicatif, comme dans le formulaire de saisie — un clic ouvre le profil qrz.com de la station.",
|
||||
"PowerGenius XL : le mode ventilateur (Standard / Contest / Broadcast) change de nouveau sur l'ampli. Un correctif précédent avait retiré le préfixe « setup » exigé par l'ampli (« setup fanmode=… »), qui rejetait donc la commande et le mode revenait aussitôt en arrière. La bonne commande est rétablie.",
|
||||
"Performance : correction d'un ralentissement apparu en 0.23.6. Pour atténuer les spots « qui ne représentent rien », la grille du DX Cluster redessinait TOUTES les lignes à chaque mise à jour de statut, ce qui saturait le CPU sur un cluster actif (des PC devenaient lents). L'atténuation se met désormais à jour via un rafraîchissement léger par cellule — même rendu, sans le brassage.",
|
||||
"DX Cluster : après avoir loggué un QSO, les spots se mettent à jour — un indicatif, une entité, un POTA, un préfixe ou un slot bande/mode que vous venez de contacter cesse d'afficher son badge NEW, au lieu de rester « new » jusqu'au redémarrage. Reste rapide : la réévaluation n'a lieu que si le cluster est affiché (sinon rien ne tourne — un QSO loggué cluster caché se rafraîchit une fois à sa réouverture), et c'est débouncé pour ne pas re-scanner à chaque QSO en série.",
|
||||
"Relais du Contrôle station (WebSwitch / KMTronic / Dingtian) : le champ Hôte accepte désormais une URL complète ex. https://relais.tondomaine.com derrière Nginx Proxy Manager. Avant, OpsLog forçait http://<hôte>, donc une carte sur le LAN derrière un proxy (quand vos 80/443 vont déjà ailleurs) était injoignable de l'extérieur.",
|
||||
"Détail d’un slot Stats : la fenêtre listant les QSO derrière une case bande/mode est plus soignée (lignes alternées, en-tête plus propre), et vous pouvez maintenant cliquer un indicatif pour ouvrir ce QSO en édition.",
|
||||
"Prise en charge des rotors DCU-1 : OpsLog pilote désormais les contrôleurs parlant le protocole Hy-Gain DCU-1 (RotorCard DXA pour rotors Yaesu DXA, Idiom Press Rotor-EZ, Green Heron) via leur port COM ou un pont série-sur-IP.",
|
||||
"Antenne motorisée : Réglages → Antenne propose désormais un sélecteur Bandes couvertes (40 m–6 m) au lieu d'une plage min/max, pour l'Ultrabeam comme pour la SteppIR. Coche seulement les bandes que fait ton antenne — décoche celle que tu ne fais pas (p. ex. le 30 m sans son extension) en gardant les autres — et OpsLog laisse l'antenne en place sur toutes les autres. Ceci prime sur un contrôleur peu fiable : le 80 m ne replie plus les éléments sur le 30 m. Les anciens réglages de plage sont migrés automatiquement.",
|
||||
"Antenne motorisée : sur une bande non cochée dans Bandes couvertes, OpsLog n'inhibe plus l'émission du FlexRadio pour « antenne en mouvement ». Décocher une bande signifie désormais ne plus y toucher du tout — ni accord ni blocage TX — pour ne jamais couper le trafic sur une autre antenne.",
|
||||
"Diplômes : un nouveau sélecteur Réglages → Diplômes (dans Configuration utilisateur) permet de choisir les diplômes à suivre — une liste à deux colonnes, tous les diplômes à gauche, ceux que tu suis à droite. L'onglet Awards n'affiche alors que ceux-là (par profil ; laisse la colonne de droite vide pour tous les afficher).",
|
||||
"CAT Kenwood/Elecraft : le lien ne tombe plus pendant que le rig émet. Un K3 (et d'autres rigs en dialecte Kenwood) répond \"?;\" à une interrogation d'état pendant l'émission ; OpsLog le prenait pour \"le rig ne supporte pas IF\" et se déconnectait — ce qui cassait le CAT partagé que WSJT-X / JTDX utilisent pour passer en émission, d'où l'absence d'émission. OpsLog suspend désormais l'interrogation d'état tant que le PTT est actif et garde le lien.",
|
||||
"Nouveau diplôme : Russian District Award (RDA) — suit les 2660 districts russes, travaillés et confirmés par bande."
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "0.23.6",
|
||||
"date": "",
|
||||
|
||||
@@ -1500,6 +1500,83 @@ export default function App() {
|
||||
// still need resolving without re-subscribing the cluster:spot listener.
|
||||
const spotStatusRef = useRef(spotStatus);
|
||||
useEffect(() => { spotStatusRef.current = spotStatus; }, [spotStatus]);
|
||||
// Mirror of spots so the log-triggered refresh reads the current list without
|
||||
// a stale closure.
|
||||
const spotsRef = useRef(spots);
|
||||
useEffect(() => { spotsRef.current = spots; }, [spots]);
|
||||
// Bound the status cache. Keyed per call|band|mode, it otherwise kept an entry
|
||||
// for every station ever seen — under an RBN firehose (thousands of unique
|
||||
// calls/hour) that grew without limit to gigabytes. Prune it back to the live
|
||||
// (SPOTS_CAP-limited) spots once it drifts well past them. The size check bails
|
||||
// cheaply the rest of the time (returning the same reference, so no dependent
|
||||
// memo re-runs); an evicted spot is just re-resolved if it reappears.
|
||||
useEffect(() => {
|
||||
setSpotStatus((prev) => {
|
||||
const keys = Object.keys(prev);
|
||||
if (keys.length <= SPOTS_CAP * 2) return prev;
|
||||
const live = new Set(spots.map((x) => spotStatusKey(x.dx_call, x.band ?? '', x.comment ?? '', x.freq_hz)));
|
||||
const pruned: typeof prev = {};
|
||||
for (const k of keys) if (live.has(k)) pruned[k] = prev[k];
|
||||
return pruned;
|
||||
});
|
||||
}, [spots]);
|
||||
// Re-fetch the status of every SHOWN spot and OVERWRITE the cache (merge, never
|
||||
// clear). Overwriting keeps the other NEW badges on screen until their fresh
|
||||
// value lands, instead of blanking the whole grid and letting the badges pop
|
||||
// back a moment later. The backend cost is one status batch regardless of spot
|
||||
// count (it scans the logbook once), so this is as cheap as the poll already is.
|
||||
const refreshSpotStatuses = useCallback(async () => {
|
||||
const cur = spotsRef.current;
|
||||
if (!cur.length) return;
|
||||
const queries: { call: string; band: string; mode: string; pota_ref: string }[] = [];
|
||||
const seen = new Set<string>();
|
||||
for (const s of cur) {
|
||||
const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz);
|
||||
if (seen.has(k)) continue;
|
||||
seen.add(k);
|
||||
queries.push({ call: s.dx_call, band: s.band ?? '', mode: inferSpotMode(s.comment ?? '', s.freq_hz), pota_ref: (s as any).pota_ref ?? '' });
|
||||
}
|
||||
if (!queries.length) return;
|
||||
try {
|
||||
const res = await ClusterSpotStatuses(queries as any);
|
||||
setSpotStatus((prev) => {
|
||||
const next = { ...prev };
|
||||
for (const r of res) {
|
||||
const k = `${r.call}|${r.band ?? ''}|${(r.mode ?? '').toUpperCase()}`;
|
||||
next[k] = {
|
||||
status: r.status ?? '', country: r.country, continent: (r as any).continent,
|
||||
worked_call: !!(r as any).worked_call, new_county: !!(r as any).new_county,
|
||||
new_pota: !!(r as any).new_pota, new_pfx: !!(r as any).new_pfx, pfx: (r as any).pfx,
|
||||
};
|
||||
}
|
||||
return next;
|
||||
});
|
||||
} catch { /* leave the old statuses in place on failure */ }
|
||||
}, []);
|
||||
// After a QSO is logged, refresh the shown spots so a call/entity/POTA/prefix/
|
||||
// slot just worked drops its NEW badge — WITHOUT blanking the others (see the
|
||||
// merge above). Kept cheap: only while the cluster is on screen (a log while
|
||||
// hidden marks it dirty and refreshes ONCE on next open), and debounced so a
|
||||
// fast run coalesces instead of re-scanning per QSO.
|
||||
const clusterVisibleRef = useRef(false);
|
||||
const spotsDirtyRef = useRef(false);
|
||||
useEffect(() => {
|
||||
const vis = mainPaneLeft === 'cluster' || mainPaneRight === 'cluster' || activeTab === 'cluster';
|
||||
if (vis && !clusterVisibleRef.current && spotsDirtyRef.current) {
|
||||
spotsDirtyRef.current = false;
|
||||
void refreshSpotStatuses();
|
||||
}
|
||||
clusterVisibleRef.current = vis;
|
||||
}, [mainPaneLeft, mainPaneRight, activeTab, refreshSpotStatuses]);
|
||||
useEffect(() => {
|
||||
let t: number | undefined;
|
||||
const off = EventsOn('qso:logged', () => {
|
||||
if (!clusterVisibleRef.current) { spotsDirtyRef.current = true; return; }
|
||||
if (t) window.clearTimeout(t);
|
||||
t = window.setTimeout(() => void refreshSpotStatuses(), 2000);
|
||||
});
|
||||
return () => { off(); if (t) window.clearTimeout(t); };
|
||||
}, [refreshSpotStatuses]);
|
||||
// Incoming spots are staged here for a few ms, their status resolved, then
|
||||
// committed to `spots` together — so a row paints with its NEW BAND/MODE badge
|
||||
// already on, instead of flashing plain text then flipping to the pill.
|
||||
@@ -5592,6 +5669,7 @@ export default function App() {
|
||||
band={band}
|
||||
mode={mode}
|
||||
bands={bands}
|
||||
onEditQso={openEdit}
|
||||
{...(!callsign.trim() && selQso ? {
|
||||
slotCall: selQso.call, slotBand: selQso.band, slotMode: selQso.mode,
|
||||
slotWb: selWb, slotWbBusy: selWbBusy,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { Award as AwardIcon, RefreshCw, Loader2, Search, Pencil, X, Grid3x3, List, BarChart3, AlertTriangle, ChevronUp, ChevronDown } from 'lucide-react';
|
||||
import { GetAwardDefs, GetAward, AwardCellQSOs, GetAwardStats, AwardMissingQSOs, ListAwardReferences, AssignAwardRefToQSOs, RescanAwards } from '../../wailsjs/go/main/App';
|
||||
import { GetAwardDefs, GetAward, AwardCellQSOs, GetAwardStats, AwardMissingQSOs, ListAwardReferences, AssignAwardRefToQSOs, RescanAwards, GetTrackedAwards } from '../../wailsjs/go/main/App';
|
||||
import { EventsOn } from '../../wailsjs/runtime/runtime';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
@@ -137,13 +138,20 @@ export function AwardsPanel({ onEditQSO, onAwardsChanged }: { onEditQSO?: (id: n
|
||||
}
|
||||
}
|
||||
|
||||
// Load the award list (no QSO scan), then compute only the first award.
|
||||
// Load the award list (no QSO scan), then compute only the first award. The
|
||||
// list is narrowed to the awards the operator follows (Settings → Awards); an
|
||||
// empty follow-set means "show them all" so the tab is never blank.
|
||||
async function loadList() {
|
||||
try {
|
||||
const defs = ((await GetAwardDefs()) ?? []) as any[];
|
||||
const list: AwardListItem[] = defs
|
||||
const [defs, tracked] = await Promise.all([
|
||||
GetAwardDefs().then((d) => (d ?? []) as any[]),
|
||||
GetTrackedAwards().then((t) => (t ?? []) as string[]).catch(() => [] as string[]),
|
||||
]);
|
||||
const follow = new Set(tracked);
|
||||
let list: AwardListItem[] = defs
|
||||
.map((d) => ({ code: d.code, name: d.name, valid: d.valid, bands: d.valid_bands ?? [], emission: d.emission ?? [] }))
|
||||
.sort((a, b) => a.code.localeCompare(b.code));
|
||||
if (follow.size > 0) list = list.filter((a) => follow.has(a.code));
|
||||
setAwardList(list);
|
||||
const first = list.find((a) => a.code === selected) ?? list[0];
|
||||
if (first) compute(first.code);
|
||||
@@ -152,6 +160,12 @@ export function AwardsPanel({ onEditQSO, onAwardsChanged }: { onEditQSO?: (id: n
|
||||
}
|
||||
}
|
||||
useEffect(() => { loadList(); }, []);
|
||||
// Re-filter when the operator changes their followed awards in Settings.
|
||||
useEffect(() => {
|
||||
const off = EventsOn('awards:tracked-changed', () => { loadList(); });
|
||||
return () => { off(); };
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const current = byCode[`${selected}|${modeFilter}`];
|
||||
// Recompute when the mode class changes: the bands, counts and confirmations
|
||||
|
||||
@@ -22,6 +22,9 @@ interface Props {
|
||||
// Set when the matrix is showing a QSO picked in the log grid rather than the
|
||||
// entry form — labelled so the two can never be confused.
|
||||
forCall?: string;
|
||||
// Open the QSO editor for a contact — makes callsigns in the cell drill-down
|
||||
// clickable. Threaded down from App.openEdit.
|
||||
onEditQso?: (id: number) => void;
|
||||
}
|
||||
|
||||
// Compact column label for a band tag: keep the classic V/U for 2m/70cm,
|
||||
@@ -93,7 +96,7 @@ function cellTitle(band: string, cls: string, status: string, current: boolean):
|
||||
return `${band} ${cls}: ${desc}${current ? ' — current entry' : ''}`;
|
||||
}
|
||||
|
||||
export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, hasCall = true, lat, lon, forCall }: Props) {
|
||||
export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, hasCall = true, lat, lon, forCall, onEditQso }: Props) {
|
||||
// Cell drill-down: which band+class the operator clicked, or null.
|
||||
const [slot, setSlot] = useState<{ band: string; cls: string } | null>(null);
|
||||
// Columns from the operator's configured bands (so the matrix shows only the
|
||||
@@ -340,6 +343,7 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, hasCal
|
||||
band={slot.band}
|
||||
cls={slot.cls}
|
||||
onClose={() => setSlot(null)}
|
||||
onEdit={onEditQso}
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
@@ -351,8 +355,8 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, hasCal
|
||||
// in the entity, because that is the pair of facts the cell's colour encodes.
|
||||
// The call's own QSOs are marked so the two never blur together.
|
||||
|
||||
function SlotQSOModal({ call, dxcc, entity, band, cls, onClose }: {
|
||||
call: string; dxcc: number; entity: string; band: string; cls: string; onClose: () => void;
|
||||
function SlotQSOModal({ call, dxcc, entity, band, cls, onClose, onEdit }: {
|
||||
call: string; dxcc: number; entity: string; band: string; cls: string; onClose: () => void; onEdit?: (id: number) => void;
|
||||
}) {
|
||||
const [rows, setRows] = useState<any[] | null>(null);
|
||||
const [err, setErr] = useState('');
|
||||
@@ -376,18 +380,19 @@ function SlotQSOModal({ call, dxcc, entity, band, cls, onClose }: {
|
||||
}, [onClose]);
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50" onClick={onClose}>
|
||||
<div className="bg-card border border-border rounded-lg shadow-xl w-[720px] max-w-[92vw] max-h-[70vh] flex flex-col"
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px] p-4" onClick={onClose}>
|
||||
<div className="bg-card border border-border rounded-xl shadow-2xl w-[760px] max-w-full max-h-[72vh] flex flex-col overflow-hidden ring-1 ring-black/5"
|
||||
onClick={(e) => e.stopPropagation()}>
|
||||
<div className="flex items-center gap-2 px-3 py-2 border-b border-border">
|
||||
<span className="font-semibold text-sm">
|
||||
{band} · {cls}
|
||||
{entity && <span className="text-muted-foreground font-normal"> — {entity}</span>}
|
||||
</span>
|
||||
<span className="ml-auto text-xs text-muted-foreground tabular-nums">
|
||||
{rows ? `${rows.length} QSO` : ''}
|
||||
</span>
|
||||
<button type="button" onClick={onClose} className="text-muted-foreground hover:text-foreground">
|
||||
<div className="flex items-center gap-2.5 px-4 py-2.5 border-b border-border bg-muted/30">
|
||||
<span className="inline-flex items-center justify-center h-6 min-w-6 px-1.5 rounded-md bg-primary/15 text-primary text-[11px] font-bold shrink-0 tabular-nums">{band}</span>
|
||||
<div className="min-w-0">
|
||||
<div className="font-semibold text-sm leading-tight truncate">
|
||||
{cls}{entity && <span className="text-muted-foreground font-normal"> · {entity}</span>}
|
||||
</div>
|
||||
{onEdit && <div className="text-[10px] text-muted-foreground leading-tight">Click a callsign to edit the QSO</div>}
|
||||
</div>
|
||||
<span className="ml-auto text-xs text-muted-foreground tabular-nums shrink-0">{rows ? `${rows.length} QSO${rows.length > 1 ? 's' : ''}` : ''}</span>
|
||||
<button type="button" onClick={onClose} className="text-muted-foreground hover:text-foreground shrink-0 rounded p-0.5 hover:bg-muted transition-colors">
|
||||
<X className="size-4" />
|
||||
</button>
|
||||
</div>
|
||||
@@ -400,30 +405,40 @@ function SlotQSOModal({ call, dxcc, entity, band, cls, onClose }: {
|
||||
) : rows.length === 0 ? (
|
||||
<p className="p-4 text-xs text-muted-foreground italic">No QSOs.</p>
|
||||
) : (
|
||||
<table className="w-full text-xs">
|
||||
<thead className="sticky top-0 bg-muted/60 backdrop-blur text-muted-foreground">
|
||||
<table className="w-full text-xs border-collapse">
|
||||
<thead className="sticky top-0 z-10 bg-muted/80 backdrop-blur text-[10px] uppercase tracking-wider text-muted-foreground">
|
||||
<tr>
|
||||
<th className="text-left font-medium px-2 py-1">Date UTC</th>
|
||||
<th className="text-left font-medium px-2 py-1">Callsign</th>
|
||||
<th className="text-left font-medium px-2 py-1">Mode</th>
|
||||
<th className="text-left font-medium px-2 py-1">Freq</th>
|
||||
<th className="text-left font-medium px-2 py-1">Name</th>
|
||||
<th className="text-left font-medium px-2 py-1">Cfm</th>
|
||||
<th className="text-left font-medium px-3 py-1.5">Date UTC</th>
|
||||
<th className="text-left font-medium px-3 py-1.5">Callsign</th>
|
||||
<th className="text-left font-medium px-3 py-1.5">Mode</th>
|
||||
<th className="text-left font-medium px-3 py-1.5">Freq</th>
|
||||
<th className="text-left font-medium px-3 py-1.5">Name</th>
|
||||
<th className="text-center font-medium px-3 py-1.5">Cfm</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{rows.map((q, i) => {
|
||||
const cfm = q.lotw_rcvd === 'Y' || q.eqsl_rcvd === 'Y' || q.qsl_rcvd === 'Y';
|
||||
const mine = q.callsign === call;
|
||||
return (
|
||||
<tr key={q.id ?? i} className="border-t border-border/40">
|
||||
<td className="px-2 py-1 tabular-nums text-muted-foreground whitespace-nowrap">
|
||||
<tr key={q.id ?? i} className="border-t border-border/40 even:bg-muted/[0.06] hover:bg-primary/[0.06] transition-colors">
|
||||
<td className="px-3 py-1.5 tabular-nums text-muted-foreground whitespace-nowrap">
|
||||
{String(q.qso_date ?? '').slice(0, 16).replace('T', ' ')}
|
||||
</td>
|
||||
<td className={cn('px-2 py-1 font-mono', q.callsign === call && 'font-bold text-primary')}>{q.callsign}</td>
|
||||
<td className="px-2 py-1">{q.mode}</td>
|
||||
<td className="px-2 py-1 tabular-nums text-muted-foreground">{q.freq_hz ? (q.freq_hz / 1e6).toFixed(3) : ''}</td>
|
||||
<td className="px-2 py-1 text-muted-foreground truncate max-w-[160px]">{q.name}</td>
|
||||
<td className="px-2 py-1">{cfm ? <span className="text-success">✓</span> : ''}</td>
|
||||
<td className="px-3 py-1.5">
|
||||
{onEdit ? (
|
||||
<button type="button" onClick={() => { onEdit(q.id as number); onClose(); }} title="Edit this QSO"
|
||||
className={cn('font-mono cursor-pointer text-left hover:underline underline-offset-2', mine ? 'font-bold text-primary' : 'text-foreground hover:text-primary')}>
|
||||
{q.callsign}
|
||||
</button>
|
||||
) : (
|
||||
<span className={cn('font-mono', mine && 'font-bold text-primary')}>{q.callsign}</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="px-3 py-1.5">{q.mode}</td>
|
||||
<td className="px-3 py-1.5 tabular-nums text-muted-foreground">{q.freq_hz ? (q.freq_hz / 1e6).toFixed(3) : ''}</td>
|
||||
<td className="px-3 py-1.5 text-muted-foreground truncate max-w-[180px]">{q.name}</td>
|
||||
<td className="px-3 py-1.5 text-center">{cfm ? <span className="text-success">✓</span> : <span className="text-muted-foreground/30">·</span>}</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -410,6 +410,11 @@ export function ClusterGrid({ rows, spotStatus, onSpotClick }: Props) {
|
||||
|
||||
const defaultColDef = useMemo<ColDef>(() => ({
|
||||
sortable: true, resizable: true, filter: true, suppressMovable: false,
|
||||
// Dim "represents nothing" spots at the CELL level, via a class that
|
||||
// refreshCells re-applies. Doing it with a row STYLE needed redrawRows() on
|
||||
// every status update, which re-rendered the whole grid continuously and
|
||||
// pegged the CPU on a busy cluster (the 0.23.6 slowdown).
|
||||
cellClassRules: { 'opacity-40': (p: any) => isDull(statusFor(p)) },
|
||||
}), []);
|
||||
|
||||
// Pass spotStatus through AG Grid's context so cell renderers can look up
|
||||
@@ -419,14 +424,22 @@ export function ClusterGrid({ rows, spotStatus, onSpotClick }: Props) {
|
||||
const context = useMemo(() => ({ spotStatus }), [spotStatus]);
|
||||
|
||||
// Spot statuses arrive asynchronously (~after the rows render). The Call/Band/
|
||||
// Mode cellStyles depend on them but their cell VALUE doesn't change, so ag-grid
|
||||
// won't re-render those cells on its own — force a refresh so e.g. a worked call
|
||||
// turns blue once its status loads.
|
||||
// Mode cellStyles and the dimmed "represents nothing" class depend on them but
|
||||
// the cell VALUE doesn't change, so ag-grid won't re-render on its own — force a
|
||||
// refresh so e.g. a worked call turns blue once its status loads.
|
||||
//
|
||||
// THROTTLED: under an RBN firehose spotStatus updates ~20×/second, and firing a
|
||||
// full refreshCells that often is pure churn on a slow PC. Coalesce the bursts
|
||||
// into one refresh every 200 ms (still imperceptible) instead of one per update.
|
||||
const refreshPending = useRef<number | undefined>(undefined);
|
||||
useEffect(() => {
|
||||
// redrawRows (not refreshCells) so getRowStyle re-runs too — the whole-row
|
||||
// dimming of "represents nothing" spots depends on the status that lands here.
|
||||
gridRef.current?.api?.redrawRows();
|
||||
if (refreshPending.current !== undefined) return; // a refresh is already queued
|
||||
refreshPending.current = window.setTimeout(() => {
|
||||
refreshPending.current = undefined;
|
||||
gridRef.current?.api?.refreshCells({ force: true });
|
||||
}, 200);
|
||||
}, [spotStatus]);
|
||||
useEffect(() => () => { if (refreshPending.current !== undefined) window.clearTimeout(refreshPending.current); }, []);
|
||||
|
||||
// Restore AFTER the profile scope is known — this grid has no key= remount to
|
||||
// save it from reading the wrong (unscoped) cache key at first paint.
|
||||
@@ -511,7 +524,6 @@ export function ClusterGrid({ rows, spotStatus, onSpotClick }: Props) {
|
||||
onColumnVisible={saveColumnState}
|
||||
onSortChanged={saveColumnState}
|
||||
onRowClicked={handleRowClicked}
|
||||
getRowStyle={(p: any) => (isDull(statusFor(p)) ? { opacity: 0.4 } : undefined)}
|
||||
animateRows={false}
|
||||
suppressCellFocus
|
||||
getRowId={(p) => `${(p.data as any).received_at}-${(p.data as any).dx_call}-${(p.data as any).source_id}`}
|
||||
|
||||
@@ -85,6 +85,8 @@ interface Props {
|
||||
// When the WinKeyer is active, F1-F12 fire macros, so the tab shortcut is
|
||||
// shown as Ctrl+F1…F5 instead of F1…F5.
|
||||
keyerActive?: boolean;
|
||||
// Open the QSO editor — makes callsigns clickable in the band-slot drill-down.
|
||||
onEditQso?: (id: number) => void;
|
||||
}
|
||||
|
||||
export type TabName = 'stats' | 'info' | 'awards' | 'my' | 'extended';
|
||||
@@ -147,7 +149,7 @@ function Field({ label, span = 1, className, children }: { label: string; span?:
|
||||
);
|
||||
}
|
||||
|
||||
export function DetailsPanel({ callsign, prefix, operatorGrid, remoteGrid, qth, name, country, comment, note, details, onChange, wb, wbBusy, band, mode, bands, slotCall, slotBand, slotMode, slotWb, slotWbBusy, tab, onTab, keyerActive }: Props) {
|
||||
export function DetailsPanel({ callsign, prefix, operatorGrid, remoteGrid, qth, name, country, comment, note, details, onChange, wb, wbBusy, band, mode, bands, slotCall, slotBand, slotMode, slotWb, slotWbBusy, tab, onTab, keyerActive, onEditQso }: Props) {
|
||||
const { t } = useI18n();
|
||||
const [internalOpen, setInternalOpen] = useState<TabName>('stats');
|
||||
const open = tab ?? internalOpen; // controlled when `tab` is provided
|
||||
@@ -288,6 +290,7 @@ export function DetailsPanel({ callsign, prefix, operatorGrid, remoteGrid, qth,
|
||||
bands={bands}
|
||||
hasCall={slotCall ? true : callsign.trim() !== ''}
|
||||
forCall={slotCall}
|
||||
onEditQso={onEditQso}
|
||||
lat={dxLL?.lat} lon={dxLL?.lon} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Trash2, Search, Loader2, CalendarDays } from 'lucide-react';
|
||||
import { LookupCallsign, LookupCallsignFresh, DXCCForCountry, GetAwardDefs, ComputeQSOAwardRefs, GetListsSettings } from '../../wailsjs/go/main/App';
|
||||
import { LookupCallsign, LookupCallsignFresh, DXCCForCountry, GetAwardDefs, ComputeQSOAwardRefs, GetListsSettings, OpenExternalURL } from '../../wailsjs/go/main/App';
|
||||
import { rstOptions, type RSTLists } from '@/lib/rst';
|
||||
import { AwardRefSelector } from '@/components/AwardRefSelector';
|
||||
import { AdifExtrasEditor } from '@/components/AdifExtrasEditor';
|
||||
@@ -466,7 +466,22 @@ export function QSOEditModal({ qso, onSave, onDelete, onClose, countries = [], b
|
||||
{/* Top: Callsign + RST + Fetch */}
|
||||
<div className="flex items-end gap-2 mb-3">
|
||||
<div className="flex flex-col flex-1 min-w-0">
|
||||
<Label>{t('qedit.callsign')}</Label>
|
||||
<div className="flex items-center">
|
||||
<Label>{t('qedit.callsign')}</Label>
|
||||
{(draft.callsign ?? '').trim() && (
|
||||
<button
|
||||
type="button"
|
||||
title={t('qrz.openTitle', { call: (draft.callsign ?? '').trim().toUpperCase() })}
|
||||
onClick={() => {
|
||||
const c = (draft.callsign ?? '').trim().toUpperCase().split('/').map(encodeURIComponent).join('/');
|
||||
if (c) OpenExternalURL(`https://www.qrz.com/db/${c}`).catch((e: any) => setLocalErr(String(e?.message ?? e)));
|
||||
}}
|
||||
className="ml-auto shrink-0 inline-flex items-center gap-0.5 text-[9px] font-semibold normal-case tracking-wider text-primary hover:underline"
|
||||
>
|
||||
QRZ ↗
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<Input className="font-mono text-lg font-bold tracking-wider uppercase h-10"
|
||||
value={draft.callsign ?? ''} onChange={(e) => set('callsign', e.target.value)} />
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
ArrowDown, ArrowUp, ArrowLeft, ArrowRight, Copy, Plus, Star, StarOff, Trash2,
|
||||
ChevronDown, ChevronRight,
|
||||
User, Database, Radio, Cog, Server, Award, Antenna as AntennaIcon,
|
||||
User, Database, Radio, Cog, Server, Antenna as AntennaIcon,
|
||||
Compass, Wifi, Construction, UploadCloud, Loader2, FolderOpen, Play, Power, Check, Pencil,
|
||||
} from 'lucide-react';
|
||||
import {
|
||||
@@ -50,6 +50,7 @@ import {
|
||||
GetFlexState, GetFlexBandAntennas, SaveFlexBandAntennas, GetFlexBandPower, SaveFlexBandPower,
|
||||
GetADIFMonitor, SaveADIFMonitor, PickADIFMonitorFile,
|
||||
GetRelayAuto, SaveRelayAuto, GetStationDevices,
|
||||
GetAwardDefs, GetTrackedAwards, SaveTrackedAwards,
|
||||
} from '../../wailsjs/go/main/App';
|
||||
import type { profile as profileModels } from '../../wailsjs/go/models';
|
||||
import type { LookupSettingsForm, StationSettingsForm, ListsSettingsForm, ModePresetForm } from '@/types';
|
||||
@@ -254,6 +255,7 @@ function buildTree(flexAvailable: boolean, t: (k: string) => string): TreeNode[]
|
||||
{ kind: 'item', label: t('sec.profiles'), id: 'profiles' },
|
||||
{ kind: 'item', label: t('sec.operating'), id: 'operating' },
|
||||
{ kind: 'item', label: t('sec.confirmations'), id: 'confirmations' },
|
||||
{ kind: 'item', label: t('sec.awards'), id: 'awards' },
|
||||
{ kind: 'item', label: t('sec.external'), id: 'external-services' },
|
||||
],
|
||||
},
|
||||
@@ -673,6 +675,9 @@ type AmpUI = { id: string; name: string; enabled: boolean; type: string; transpo
|
||||
type RelayRuleUI = { device_id: string; relay: number; mode: string; freq_lo_khz: number; freq_hi_khz: number; bands: string[] };
|
||||
type StationDevUI = { id: string; type: string; name: string; labels: string[] };
|
||||
const RELAY_BANDS = ['160m', '80m', '60m', '40m', '30m', '20m', '17m', '15m', '12m', '10m', '6m', '4m', '2m', '70cm'];
|
||||
// Bands a motorized HF/6 m antenna (Ultrabeam / SteppIR) can cover — the follow
|
||||
// filter is a subset of these. Must match motorBands in app.go, low → high.
|
||||
const MOTOR_BANDS = ['40m', '30m', '20m', '17m', '15m', '12m', '10m', '6m'];
|
||||
const relayCountUI = (type: string) => (type === 'kmtronic' || type === 'denkovi' ? 8 : 5);
|
||||
|
||||
// Live status + OPERATE/STANDBY toggle for ONE configured amplifier (by config
|
||||
@@ -941,6 +946,91 @@ function FlexDiscover({ onPick }: { onPick: (ip: string, port: number) => void }
|
||||
);
|
||||
}
|
||||
|
||||
// AwardsSelectionPanel is a two-column transfer list: every defined award on the
|
||||
// left, the ones the operator follows on the right. The Awards tab shows only the
|
||||
// followed set (empty = all). Per-profile, saved immediately (local SQLite).
|
||||
function AwardsSelectionPanel({ profile }: { profile?: { name?: string; callsign?: string } }) {
|
||||
const { t } = useI18n();
|
||||
const [all, setAll] = useState<{ code: string; name: string }[]>([]);
|
||||
const [tracked, setTracked] = useState<string[]>([]);
|
||||
const [err, setErr] = useState('');
|
||||
const [q, setQ] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
try {
|
||||
const [defs, tr] = await Promise.all([
|
||||
GetAwardDefs().then((d) => (d ?? []) as any[]),
|
||||
GetTrackedAwards().then((v) => (v ?? []) as string[]).catch(() => [] as string[]),
|
||||
]);
|
||||
setAll(defs.map((d) => ({ code: d.code, name: d.name })).sort((a, b) => a.code.localeCompare(b.code)));
|
||||
setTracked(tr);
|
||||
} catch (e: any) { setErr(String(e?.message ?? e)); }
|
||||
})();
|
||||
}, []);
|
||||
|
||||
async function persist(next: string[]) {
|
||||
setTracked(next);
|
||||
try { await SaveTrackedAwards(next); } catch (e: any) { setErr(String(e?.message ?? e)); }
|
||||
}
|
||||
const trackedSet = new Set(tracked);
|
||||
const byCode = new Map(all.map((a) => [a.code, a] as const));
|
||||
const needle = q.trim().toLowerCase();
|
||||
const available = all.filter((a) => !trackedSet.has(a.code)
|
||||
&& (needle === '' || `${a.code} ${a.name}`.toLowerCase().includes(needle)));
|
||||
const trackedItems = (tracked.map((c) => byCode.get(c)).filter(Boolean) as { code: string; name: string }[])
|
||||
.sort((a, b) => a.code.localeCompare(b.code));
|
||||
|
||||
return (
|
||||
<div>
|
||||
<SectionHeader title={t('sec.awards')} hint={t('awards.followHint')} />
|
||||
<ProfileScopeNote profile={profile} />
|
||||
{err && <div className="mb-2 text-xs text-destructive">{err}</div>}
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div className="rounded-lg border border-border bg-card/40 flex flex-col">
|
||||
<div className="flex items-center justify-between px-3 py-2 border-b border-border/60">
|
||||
<span className="text-sm font-medium">{t('awards.available')} <span className="text-muted-foreground">({available.length})</span></span>
|
||||
<button type="button" className="text-xs text-primary hover:underline disabled:opacity-40"
|
||||
disabled={available.length === 0} onClick={() => persist(all.map((a) => a.code))}>{t('awards.addAll')}</button>
|
||||
</div>
|
||||
<div className="p-2 border-b border-border/60">
|
||||
<Input value={q} onChange={(e) => setQ(e.target.value)} placeholder={t('awards.search')} className="h-8" />
|
||||
</div>
|
||||
<div className="max-h-[340px] overflow-y-auto p-1.5 space-y-0.5">
|
||||
{available.map((a) => (
|
||||
<button key={a.code} type="button" onClick={() => persist([...tracked, a.code])}
|
||||
className="group w-full flex items-center gap-2 rounded-md px-2 py-1 text-left hover:bg-primary/10">
|
||||
<span className="font-mono text-xs shrink-0">{a.code}</span>
|
||||
<span className="text-xs text-muted-foreground truncate flex-1">{a.name}</span>
|
||||
<span className="text-primary opacity-0 group-hover:opacity-100">→</span>
|
||||
</button>
|
||||
))}
|
||||
{available.length === 0 && <div className="p-2 text-xs text-muted-foreground">{t('awards.allTracked')}</div>}
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-lg border border-primary/40 bg-primary/5 flex flex-col">
|
||||
<div className="flex items-center justify-between px-3 py-2 border-b border-border/60">
|
||||
<span className="text-sm font-medium">{t('awards.followed')} <span className="text-muted-foreground">({tracked.length})</span></span>
|
||||
<button type="button" className="text-xs text-primary hover:underline disabled:opacity-40"
|
||||
disabled={tracked.length === 0} onClick={() => persist([])}>{t('awards.clear')}</button>
|
||||
</div>
|
||||
<div className="max-h-[392px] overflow-y-auto p-1.5 space-y-0.5">
|
||||
{trackedItems.map((a) => (
|
||||
<button key={a.code} type="button" onClick={() => persist(tracked.filter((c) => c !== a.code))}
|
||||
className="group w-full flex items-center gap-2 rounded-md px-2 py-1 text-left hover:bg-primary/10">
|
||||
<span className="text-muted-foreground opacity-0 group-hover:opacity-100">←</span>
|
||||
<span className="font-mono text-xs shrink-0">{a.code}</span>
|
||||
<span className="text-xs text-muted-foreground truncate flex-1">{a.name}</span>
|
||||
</button>
|
||||
))}
|
||||
{tracked.length === 0 && <div className="p-2 text-xs text-muted-foreground">{t('awards.noneFollowed')}</div>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ComingSoon({ id, icon: Icon }: { id: SectionId; icon?: any }) {
|
||||
const label = SECTION_LABELS[id] ?? id;
|
||||
const IconCmp = Icon ?? Construction;
|
||||
@@ -1149,8 +1239,8 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
const [rotatorTest, setRotatorTest] = useState<{ ok: boolean; msg: string } | null>(null);
|
||||
|
||||
// Motorized antenna (Ultrabeam TCP or SteppIR TCP/serial) settings.
|
||||
const [ultrabeam, setUltrabeam] = useState<{ enabled: boolean; type: string; transport: string; host: string; port: number; com: string; baud: number; follow: boolean; step_khz: number; tx_inhibit: boolean; freq_min_mhz: number; freq_max_mhz: number }>({
|
||||
enabled: false, type: 'ultrabeam', transport: 'tcp', host: '', port: 23, com: '', baud: 9600, follow: false, step_khz: 50, tx_inhibit: false, freq_min_mhz: 13, freq_max_mhz: 54,
|
||||
const [ultrabeam, setUltrabeam] = useState<{ enabled: boolean; type: string; transport: string; host: string; port: number; com: string; baud: number; follow: boolean; step_khz: number; tx_inhibit: boolean; bands: string[]; freq_min_mhz: number; freq_max_mhz: number }>({
|
||||
enabled: false, type: 'ultrabeam', transport: 'tcp', host: '', port: 23, com: '', baud: 9600, follow: false, step_khz: 50, tx_inhibit: false, bands: [], freq_min_mhz: 13, freq_max_mhz: 54,
|
||||
});
|
||||
const [ubTesting, setUbTesting] = useState(false);
|
||||
const [ubTest, setUbTest] = useState<{ ok: boolean; msg: string } | null>(null);
|
||||
@@ -3012,20 +3102,28 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{isSteppir && (
|
||||
<div className="border-t border-border/60 pt-3 space-y-1">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<Label className="text-sm">{t('hw.steppirRange')}</Label>
|
||||
<input type="number" min={1} max={60} value={ultrabeam.freq_min_mhz}
|
||||
onChange={(e) => setUltrabeam((s) => ({ ...s, freq_min_mhz: parseInt(e.target.value, 10) || 0 }))}
|
||||
className="h-8 w-16 rounded-md border border-input bg-background px-2 text-sm" />
|
||||
<span className="text-xs text-muted-foreground">–</span>
|
||||
<input type="number" min={1} max={60} value={ultrabeam.freq_max_mhz}
|
||||
onChange={(e) => setUltrabeam((s) => ({ ...s, freq_max_mhz: parseInt(e.target.value, 10) || 0 }))}
|
||||
className="h-8 w-16 rounded-md border border-input bg-background px-2 text-sm" />
|
||||
<span className="text-xs text-muted-foreground">MHz</span>
|
||||
{(isSteppir || ultrabeam.type === 'ultrabeam') && (
|
||||
<div className="border-t border-border/60 pt-3 space-y-2">
|
||||
<Label className="text-sm">{t('hw.motorBands')}</Label>
|
||||
<div className="flex items-center gap-1.5 flex-wrap">
|
||||
{MOTOR_BANDS.map((b) => {
|
||||
const on = ultrabeam.bands.includes(b);
|
||||
return (
|
||||
<button key={b} type="button"
|
||||
onClick={() => setUltrabeam((s) => ({
|
||||
...s,
|
||||
bands: on ? s.bands.filter((x) => x !== b) : [...s.bands, b],
|
||||
}))}
|
||||
className={`h-8 min-w-[3rem] rounded-md border px-2 text-sm font-medium transition-colors ${
|
||||
on
|
||||
? 'border-primary bg-primary/15 text-primary'
|
||||
: 'border-input bg-background text-muted-foreground hover:bg-muted'
|
||||
}`}>
|
||||
{b}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">{t('hw.steppirRangeHint')}</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="border-t border-border/60 pt-3 space-y-1">
|
||||
@@ -3388,6 +3486,8 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
const dev = d as any;
|
||||
const isRG = dev.type === 'rotgenius';
|
||||
const isARCO = dev.type === 'arco';
|
||||
const isDCU1 = dev.type === 'dcu1';
|
||||
const isSerialCap = isARCO || isDCU1; // COM-port or serial-over-IP controllers
|
||||
const transport = dev.transport ?? 'tcp';
|
||||
return (
|
||||
<div key={dev.id || i} className="rounded-xl border border-border bg-card/40 p-3 space-y-3">
|
||||
@@ -3406,12 +3506,13 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
{/* Each backend gets its default port: Rotator Genius 9006, ARCO 4001
|
||||
(placeholder — must match the ARCO's LAN menu), PstRotator 12000. */}
|
||||
<Select value={dev.type ?? 'pst'}
|
||||
onValueChange={(v) => patch(i, { type: v as any, port: v === 'rotgenius' ? 9006 : v === 'arco' ? 4001 : 12000 })}>
|
||||
onValueChange={(v) => patch(i, { type: v as any, port: v === 'rotgenius' ? 9006 : (v === 'arco' || v === 'dcu1') ? 4001 : 12000, ...(v === 'dcu1' ? { transport: 'serial' } : {}) })}>
|
||||
<SelectTrigger className="h-9"><SelectValue /></SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="pst">PstRotator (UDP)</SelectItem>
|
||||
<SelectItem value="rotgenius">Rotator Genius (4O3A, native)</SelectItem>
|
||||
<SelectItem value="arco">GS-232A controller (microHAM ARCO, ERC…)</SelectItem>
|
||||
<SelectItem value="dcu1">Hy-Gain DCU-1 (RotorCard DXA, Rotor-EZ, Green Heron)</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -3428,8 +3529,8 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
{/* The ARCO is reachable over the LAN (TCP) or its USB virtual COM. */}
|
||||
{isARCO && (
|
||||
{/* ARCO and DCU-1 controllers reach over the LAN (TCP) or a serial COM. */}
|
||||
{isSerialCap && (
|
||||
<div className="space-y-1">
|
||||
<Label>Connection</Label>
|
||||
<Select value={transport} onValueChange={(v) => patch(i, { transport: v as any })}>
|
||||
@@ -3449,7 +3550,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
{t('rot.rgDual')}
|
||||
</label>
|
||||
)}
|
||||
{isARCO && transport === 'serial' ? (
|
||||
{isSerialCap && transport === 'serial' ? (
|
||||
<div className="space-y-1 max-w-xs">
|
||||
<Label>COM port</Label>
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -3478,16 +3579,16 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
<div className="space-y-1 col-span-2">
|
||||
<Label>Host / IP</Label>
|
||||
<Input value={dev.host ?? ''} onChange={(e) => patch(i, { host: e.target.value })}
|
||||
placeholder={isRG || isARCO ? '192.168.1.60' : '127.0.0.1'} className="font-mono" />
|
||||
placeholder={isRG || isSerialCap ? '192.168.1.60' : '127.0.0.1'} className="font-mono" />
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label>{isRG || isARCO ? 'TCP port' : 'UDP port'}</Label>
|
||||
<Label>{isRG || isSerialCap ? 'TCP port' : 'UDP port'}</Label>
|
||||
<PortInput value={dev.port} onChange={(n) => patch(i, { port: n })}
|
||||
fallback={isRG ? 9006 : isARCO ? 4001 : 12000} className="font-mono" />
|
||||
fallback={isRG ? 9006 : isSerialCap ? 4001 : 12000} className="font-mono" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!isRG && !isARCO && (
|
||||
{!isRG && !isSerialCap && (
|
||||
<label className="flex items-center gap-2 text-sm cursor-pointer">
|
||||
<Checkbox checked={!!dev.has_elevation} onCheckedChange={(c) => patch(i, { has_elevation: !!c })} />
|
||||
This rotator supports elevation (VHF / satellite)
|
||||
@@ -3495,6 +3596,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
)}
|
||||
{isRG && <p className="text-xs text-muted-foreground">{t('rot.rgHint')}</p>}
|
||||
{isARCO && <p className="text-xs text-muted-foreground">{t('rot.arcoHint')}</p>}
|
||||
{isDCU1 && <p className="text-xs text-muted-foreground">{t('rot.dcu1Hint')}</p>}
|
||||
{/* Which antenna this rotor carries — only relevant with >1 rotor. */}
|
||||
{multi && (
|
||||
<div className="space-y-1 max-w-xs">
|
||||
@@ -5700,6 +5802,17 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
<span className="text-[11px] text-muted-foreground">{emailMsg}</span>
|
||||
</div>
|
||||
|
||||
<div className="pt-2 mt-2 border-t border-border space-y-2">
|
||||
<Label className="text-sm font-semibold">{t('em.recEmail')}</Label>
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
{t('em.recVarsHint')} {'{CALL}'} {'{DATE}'} {'{BAND}'} {'{MODE}'} {'{MYCALL}'}.
|
||||
</div>
|
||||
<Input className="h-8" placeholder={t('em.subject')} value={emailCfg.subject}
|
||||
onChange={(e) => setEmailField({ subject: e.target.value })} />
|
||||
<Textarea rows={3} className="text-sm" placeholder={t('em.body')} value={emailCfg.body}
|
||||
onChange={(e) => setEmailField({ body: e.target.value })} />
|
||||
</div>
|
||||
|
||||
<div className="pt-2 mt-2 border-t border-border space-y-2">
|
||||
<Label className="text-sm font-semibold">{t('em.qslCardEmail')}</Label>
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
@@ -5807,7 +5920,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
database: DatabasePanel,
|
||||
uscounties: USCountiesPanel,
|
||||
autostart: () => <AutostartPanelComponent />,
|
||||
awards: () => <ComingSoon id="awards" icon={Award} />,
|
||||
awards: () => <AwardsSelectionPanel profile={activeProfile ?? undefined} />,
|
||||
cat: CATPanel,
|
||||
rotator: RotatorPanel,
|
||||
winkeyer: WinkeyerPanel,
|
||||
|
||||
@@ -672,6 +672,7 @@ function DeviceEditor({ device, onChange, onSave, onCancel, t }: {
|
||||
<div className={cn('space-y-1', (isKM || isDingtian) ? '' : 'max-w-xs')}>
|
||||
<Label>{t('station.host')}</Label>
|
||||
<Input className="font-mono" value={device.host} placeholder="192.168.1.100" onChange={(e) => onChange({ ...device, host: e.target.value })} />
|
||||
<span className="text-[10px] text-muted-foreground">{t('station.hostHint')}</span>
|
||||
</div>
|
||||
{/* Dingtian: both are OFF on a factory board — the session ID only when
|
||||
"HTTP Session" is enabled in its web page, the password only when a
|
||||
|
||||
@@ -155,7 +155,8 @@ const en: Dict = {
|
||||
'uscty.backfillIntro': 'Resolve county (and grid) for US QSOs already in your log that are missing them. Existing values are kept — only blanks are filled.',
|
||||
'uscty.backfillRun': 'Fill missing counties',
|
||||
'uscty.backfillDone': '{s} US QSOs scanned · {c} counties, {g} grids filled.',
|
||||
'station.title': 'Station Control', 'station.rotator': 'Rotator', 'station.rotatorNoRead': 'No heading read', 'station.pattern': 'Pattern', 'station.bi': 'Bi', 'station.retract': 'Retract elements', 'station.moving': 'MOVING', 'station.elements': 'Elements (mm)', 'station.read': 'Read', 'station.readLengths': 'Read current element lengths from the controller', 'station.noLengths': 'Lengths unknown — click Read to fetch them from the controller.', 'station.element': 'Element', 'station.reflector': 'Reflector', 'station.driven': 'Driven', 'station.director': 'Dir', 'station.set': 'Set', 'station.elementsHint': 'Each press lengthens/shortens the element by 2 mm (like the physical console). Verify which element responds on your antenna.', 'station.setExactLen': 'Click to type the exact current length (fixes the baseline if the auto-read is off).', 'station.atMax': 'Controller refused — the element is likely at its maximum length for this band, so it can\'t extend further.', 'station.go': 'Go', 'station.stop': 'Stop', 'station.dragHint': 'Drag the grip handle on the left of a panel to move it. Pick a column count to lay them out in a grid.', 'station.dragMove': 'Drag to move this panel', 'station.colsAuto': 'Auto', 'station.addDevice': 'Add device', 'station.editDevice': 'Edit device', 'station.empty': 'No relay boards yet. Add a WebSwitch 1216H or a KMTronic 8-relay board to control your station power and accessories.', 'station.online': 'Online', 'station.offline': 'Offline', 'station.edit': 'Edit', 'station.delete': 'Delete', 'station.relay': 'Relay', 'station.on': 'ON', 'station.off': 'OFF', 'station.type': 'Device type', 'station.name': 'Name', 'station.host': 'Host / IP', 'station.user': 'Username', 'station.pass': 'Password', 'station.optional': 'optional', 'station.ftdiSerial': 'FTDI serial number', 'station.detect': 'Detect', 'station.ftdiHint': 'The Denkovi board is driven via FTDI bit-bang (not the COM port). Pick its serial (e.g. DAE0006K). Needs the FTDI D2XX driver installed.', 'station.channels': 'Relays', 'station.comPort': 'COM port', 'station.noPorts': 'No ports found', 'station.usbRelayHint': 'Cheap USB-serial relay boards (CH340/LCUS) using the A0 command protocol. If yours does not switch, tell me its model / command set.', 'station.labels': 'Relay labels', 'station.cancel': 'Cancel', 'station.save': 'Save', 'station.test': 'Test connection', 'station.testOk': 'Connected — {n} relays', 'station.testFail': 'Not connected', 'station.detectNone': 'No FTDI board found — check the cable and that the D2XX driver is installed.', 'station.detectFound': '{n} board(s) detected.',
|
||||
'station.title': 'Station Control', 'station.rotator': 'Rotator', 'station.rotatorNoRead': 'No heading read', 'station.pattern': 'Pattern', 'station.bi': 'Bi', 'station.retract': 'Retract elements', 'station.moving': 'MOVING', 'station.elements': 'Elements (mm)', 'station.read': 'Read', 'station.readLengths': 'Read current element lengths from the controller', 'station.noLengths': 'Lengths unknown — click Read to fetch them from the controller.', 'station.element': 'Element', 'station.reflector': 'Reflector', 'station.driven': 'Driven', 'station.director': 'Dir', 'station.set': 'Set', 'station.elementsHint': 'Each press lengthens/shortens the element by 2 mm (like the physical console). Verify which element responds on your antenna.', 'station.setExactLen': 'Click to type the exact current length (fixes the baseline if the auto-read is off).', 'station.atMax': 'Controller refused — the element is likely at its maximum length for this band, so it can\'t extend further.', 'station.go': 'Go', 'station.stop': 'Stop', 'station.dragHint': 'Drag the grip handle on the left of a panel to move it. Pick a column count to lay them out in a grid.', 'station.dragMove': 'Drag to move this panel', 'station.colsAuto': 'Auto', 'station.addDevice': 'Add device', 'station.editDevice': 'Edit device', 'station.empty': 'No relay boards yet. Add a WebSwitch 1216H or a KMTronic 8-relay board to control your station power and accessories.', 'station.online': 'Online', 'station.offline': 'Offline', 'station.edit': 'Edit', 'station.delete': 'Delete', 'station.relay': 'Relay', 'station.on': 'ON', 'station.off': 'OFF', 'station.type': 'Device type', 'station.name': 'Name', 'station.host': 'Host / IP', 'station.hostHint': 'LAN IP for local use. To reach the board from OUTSIDE, put a full URL here — e.g. https://relay.yourdomain.com — pointing at a reverse proxy (Nginx Proxy Manager…) that fronts the board’s HTTP port.', 'station.user': 'Username', 'station.pass': 'Password', 'station.optional': 'optional', 'station.ftdiSerial': 'FTDI serial number', 'station.detect': 'Detect', 'station.ftdiHint': 'The Denkovi board is driven via FTDI bit-bang (not the COM port). Pick its serial (e.g. DAE0006K). Needs the FTDI D2XX driver installed.', 'station.channels': 'Relays', 'station.comPort': 'COM port', 'station.noPorts': 'No ports found', 'station.usbRelayHint': 'Cheap USB-serial relay boards (CH340/LCUS) using the A0 command protocol. If yours does not switch, tell me its model / command set.', 'station.labels': 'Relay labels', 'station.cancel': 'Cancel', 'station.save': 'Save', 'station.test': 'Test connection', 'station.testOk': 'Connected — {n} relays', 'station.testFail': 'Not connected', 'station.detectNone': 'No FTDI board found — check the cable and that the D2XX driver is installed.', 'station.detectFound': '{n} board(s) detected.',
|
||||
'awards.followHint': 'Awards shown in the Awards tab. Leave the right side empty to show them all.', 'awards.available': 'All awards', 'awards.followed': 'Followed', 'awards.search': 'Filter…', 'awards.addAll': 'Add all', 'awards.clear': 'Clear', 'awards.allTracked': 'All awards are followed.', 'awards.noneFollowed': 'Nothing followed yet — the Awards tab shows all.',
|
||||
'sec.awards': 'Awards', 'sec.cat': 'CAT interface', 'sec.rotator': 'Rotator', 'sec.winkeyer': 'CW Keyer',
|
||||
'sec.antenna': 'Ultrabeam / Steppir', 'sec.antgenius': 'Antenna Genius', 'sec.tunergenius': 'Tuner Genius', 'sec.pgxl': 'Amplifier', 'sec.flex': 'FlexRadio', 'sec.audio': 'Audio devices',
|
||||
// CW Keyer settings panel
|
||||
@@ -275,9 +276,9 @@ const en: Dict = {
|
||||
'cat.hint': "Reads the rig's frequency / band / mode and pushes them into the entry strip in real time. Use OmniRig (free, any rig) or — for FlexRadio — the native SmartSDR API (no OmniRig needed, real-time, no second-click mode bug).",
|
||||
'ag2.hint': 'OpsLog talks to the 4O3A Antenna Genius switch over TCP (GSCP protocol). The port is fixed at 9007, so only the device IP is needed. A docked widget then lets you switch antennas per port (A/B).', 'ag2.password': 'Remote password', 'ag2.passwordPh': 'blank on LAN', 'ag2.passwordHint': 'Only needed when reaching the device remotely — it then announces "AG AUTH" and rejects commands until you log in. Leave blank on the local network.',
|
||||
'tg2.hint': 'OpsLog talks to the 4O3A Tuner Genius XL over TCP (port fixed at 9010), so only the device IP is needed. A docked widget then shows SWR and forward power and offers Tune, Bypass and Operate/Standby. Control it directly (not through the radio) so OpsLog uses just one of the box\'s connection slots.', 'tg2.enable': 'Enable Tuner Genius control', 'tg2.portHint': 'The TCP port is fixed at 9010 on the device.', 'tg2.password': 'Remote code', 'tg2.passwordPh': 'blank on LAN', 'tg2.passwordHint': 'Only needed when reaching the device remotely — it then announces "AUTH" and rejects commands until you log in. Leave blank on the local network.',
|
||||
'rot.enable': 'Enable rotator control', 'rot.testOkRG': 'Connected — the Rotator Genius accepted the command (moving to 0°).', 'rot.type': 'Rotator type', 'rot.rotatorNum': 'Rotator #', 'rot.dual': 'Two rotors', 'rot.rotor1': 'Rotor 1', 'rot.rotor2': 'Rotor 2', 'rot.name': 'Name', 'rot.antenna': 'Antenna', 'rot.antenna1': 'Rotor 1 antenna', 'rot.antenna2': 'Rotor 2 antenna', 'rot.name1': 'Rotor 1 name', 'rot.name2': 'Rotor 2 name', 'rot.antStd': 'Standard antenna', 'rot.antMotor': 'Motorized (Ultrabeam/SteppIR)', 'rot.add': 'Add rotor', 'rot.remove': 'Remove rotor', 'rot.none': 'No rotor configured. Click “Add rotor” to add one.', 'rot.rgDual': 'This Rotator Genius drives two rotors (adds a second one)', 'rot.testRotor1': 'Test rotor 1', 'rot.testRotor2': 'Test rotor 2', 'rot.dualHint': 'Two independent rotors of any type — for example an ARCO and a Rotator Genius side by side. Configure each below; OpsLog shows a Rotor 1/2 toggle on the compass to pick which one it turns and displays. Set each rotor to "Motorized" so the boom/pattern paths (reverse, bidirectional) show only for the one that carries the Ultrabeam/SteppIR. (For a single Rotator Genius driving two rotors, set both to Rotator Genius with the same host and rotator # 1 and 2.)', 'rot.rgHint': 'Talks directly to a 4O3A Rotator Genius over TCP (default port 9006) — no PstRotator needed. Rotator # selects which of the two rotators to drive.', 'rot.arcoHint': "Talks directly to any controller set to Yaesu GS-232A — no PstRotator needed. microHAM ARCO: set Config → LAN → CONTROL PROTOCOL (or USB CONTROL PROTOCOL) to 'Yaesu GS-232A'; on USB the baud rate does not matter. ERC (Easy Rotor Control, incl. ERC Mini): its emulation MUST be set to GS-232 — an ERC left on Hy-Gain DCU-1 speaks a different command set and will not answer — then pick its COM port and the same baud rate as in the ERC configuration.", 'rot.hint': "OpsLog sends UDP commands to PstRotator. Enable PstRotator's UDP listener (Setup → Communication → UDP) before testing.",
|
||||
'rot.enable': 'Enable rotator control', 'rot.testOkRG': 'Connected — the Rotator Genius accepted the command (moving to 0°).', 'rot.type': 'Rotator type', 'rot.rotatorNum': 'Rotator #', 'rot.dual': 'Two rotors', 'rot.rotor1': 'Rotor 1', 'rot.rotor2': 'Rotor 2', 'rot.name': 'Name', 'rot.antenna': 'Antenna', 'rot.antenna1': 'Rotor 1 antenna', 'rot.antenna2': 'Rotor 2 antenna', 'rot.name1': 'Rotor 1 name', 'rot.name2': 'Rotor 2 name', 'rot.antStd': 'Standard antenna', 'rot.antMotor': 'Motorized (Ultrabeam/SteppIR)', 'rot.add': 'Add rotor', 'rot.remove': 'Remove rotor', 'rot.none': 'No rotor configured. Click “Add rotor” to add one.', 'rot.rgDual': 'This Rotator Genius drives two rotors (adds a second one)', 'rot.testRotor1': 'Test rotor 1', 'rot.testRotor2': 'Test rotor 2', 'rot.dualHint': 'Two independent rotors of any type — for example an ARCO and a Rotator Genius side by side. Configure each below; OpsLog shows a Rotor 1/2 toggle on the compass to pick which one it turns and displays. Set each rotor to "Motorized" so the boom/pattern paths (reverse, bidirectional) show only for the one that carries the Ultrabeam/SteppIR. (For a single Rotator Genius driving two rotors, set both to Rotator Genius with the same host and rotator # 1 and 2.)', 'rot.rgHint': 'Talks directly to a 4O3A Rotator Genius over TCP (default port 9006) — no PstRotator needed. Rotator # selects which of the two rotators to drive.', 'rot.arcoHint': "Talks directly to any controller set to Yaesu GS-232A — no PstRotator needed. microHAM ARCO: set Config → LAN → CONTROL PROTOCOL (or USB CONTROL PROTOCOL) to 'Yaesu GS-232A'; on USB the baud rate does not matter. ERC (Easy Rotor Control, incl. ERC Mini): its emulation MUST be set to GS-232 — an ERC left on Hy-Gain DCU-1 speaks a different command set and will not answer — then pick its COM port and the same baud rate as in the ERC configuration.", 'rot.dcu1Hint': "Speaks the Hy-Gain DCU-1 command set (RotorCard DXA, Idiom Press Rotor-EZ, Green Heron). Connect over the controller's COM port (a DCU-1 is 4800 baud; RotorCard/Green Heron may differ — match the controller) or over TCP through a serial-over-IP bridge. Azimuth only, no elevation. New backend — please report if your controller needs a different command or baud.", 'rot.hint': "OpsLog sends UDP commands to PstRotator. Enable PstRotator's UDP listener (Setup → Communication → UDP) before testing.",
|
||||
'extsvc.hint': 'Upload logged QSOs to online logbooks. Each service uploads automatically on a new QSO when enabled; timing is per-service (immediate, or a 1–2 min delay so a mis-logged QSO can still be fixed first).',
|
||||
'hw.motorTxInhibit': 'Inhibit transmission while the antenna is moving', 'hw.motorTxInhibitHint': 'Blocks the FlexRadio from transmitting while the elements move (needs FlexRadio in API mode + this antenna enabled). No effect with other radios.', 'hw.motorAntenna': 'Ultrabeam / Steppir', 'hw.motorEnable': 'Enable antenna control', 'hw.motorType': 'Antenna type', 'hw.motorTransport': 'Connection', 'hw.motorTcp': 'Network (TCP)', 'hw.motorSerial': 'Serial (COM)', 'hw.motorCom': 'Serial port', 'hw.motorBaud': 'Baud', 'hw.steppirHint': 'SteppIR controllers are RS-232 serial (the DATA OUT DB9 port). Serial = a USB↔RS-232 (FTDI) adapter, shown as a COM port. Network = a serial-to-Ethernet bridge (as for the Ultrabeam).', 'hw.steppirRange': 'Tunable range', 'hw.steppirRangeHint': "The SteppIR's frequency coverage. On a band outside this range (e.g. 30 m on a 20 m–6 m SteppIR) OpsLog won't try to tune the antenna and won't inhibit transmission. Default 13–54 MHz (20 m–6 m); widen the low edge (e.g. 6) for a 40 m-equipped SteppIR.", 'hw.ultrabeam': 'Antenna (Ultrabeam)', 'hw.audioVoice': 'Audio devices & voice keyer',
|
||||
'hw.motorTxInhibit': 'Inhibit transmission while the antenna is moving', 'hw.motorTxInhibitHint': 'Blocks the FlexRadio from transmitting while the elements move (needs FlexRadio in API mode + this antenna enabled). No effect with other radios.', 'hw.motorAntenna': 'Ultrabeam / Steppir', 'hw.motorEnable': 'Enable antenna control', 'hw.motorType': 'Antenna type', 'hw.motorTransport': 'Connection', 'hw.motorTcp': 'Network (TCP)', 'hw.motorSerial': 'Serial (COM)', 'hw.motorCom': 'Serial port', 'hw.motorBaud': 'Baud', 'hw.steppirHint': 'SteppIR controllers are RS-232 serial (the DATA OUT DB9 port). Serial = a USB↔RS-232 (FTDI) adapter, shown as a COM port. Network = a serial-to-Ethernet bridge (as for the Ultrabeam).', 'hw.steppirRange': 'Tunable range', 'hw.steppirRangeHint': "The SteppIR's frequency coverage. On a band outside this range (e.g. 30 m on a 20 m–6 m SteppIR) OpsLog won't try to tune the antenna and won't inhibit transmission. Default 13–54 MHz (20 m–6 m); widen the low edge (e.g. 6) for a 40 m-equipped SteppIR.", 'hw.motorBands': 'Covered bands', 'hw.ultrabeam': 'Antenna (Ultrabeam)', 'hw.audioVoice': 'Audio devices & voice keyer',
|
||||
// CAT panel body
|
||||
'cat.enable': 'Enable CAT', 'cat.backend': 'Backend', 'cat.optOmnirig': 'OmniRig', 'cat.optFlex': 'FlexRadio (API)', 'cat.share': 'Share CAT with other programs', 'cat.shareHint': 'In the other program pick the rig model "Hamlib NET rigctl" and enter 127.0.0.1:4532. Works with every backend, not only the native ones.', 'cat.sharePort': 'Sharing port', 'cat.pttKey': 'Enable PTT hotkey', 'cat.pttKeyPress': 'Press a key…', 'cat.pttKeyNone': 'Click to set a key', 'cat.pttKeyClear': 'Clear', 'cat.pttKeyToggle': 'Toggle mode (press to key, press again to unkey)', 'cat.pttKeyHint': 'While OpsLog is focused, this key keys the transmitter — held down by default (release to stop), or latched in toggle mode. It uses the Audio → PTT method (CAT / RTS / DTR), falling back to CAT keying. Pick a key you never type while logging (e.g. Pause, ScrollLock, or a footswitch mapped to one) — OpsLog swallows it so it never lands in a field.', 'cat.optXiegu': 'Xiegu (USB)', 'cat.xieguPort': 'Xiegu CAT port', 'cat.xieguBaudHint': 'Must match the radio menu (G90 default: 19200).', 'cat.xieguAddrHint': 'Factory CI-V address of the G90/X6100 family: 0x70.', 'cat.xieguPTTLine': 'How the rig is keyed', 'cat.xieguPTTCiv': 'CI-V command', 'cat.xieguPTTHint': 'A G90 does not transmit on the CI-V command: interfaces like the DE-19 key it on RTS or DTR. Pick the line yours uses \u2014 it is also what lets WSJT-X transmit through the shared CAT link.', 'cat.optYaesu': 'Yaesu (USB)', 'cat.optKenwood': 'Kenwood (USB, network)', 'cat.civTrace': 'Log the CAT protocol', 'cat.civTraceHint': 'Writes every CAT frame to and from the radio into the log \u2014 CI-V as hex, Kenwood as the text it exchanges. For reporting a rig that answers oddly \u2014 a button that does the wrong thing, a frequency that jumps. Session only: it is a diagnostic, and it makes the log large.', 'cat.kenwoodPort': 'Kenwood COM port', 'cat.kenwoodPortHint': 'The rig\u2019s CAT/USB serial port (TS-590, TS-890, TS-990, TS-2000, and Elecraft K3/K4 which speak the same dialect).', 'cat.kenwoodBaudHint': 'Must match MENU on the radio: a TS-590 leaves the factory at 9600, a TS-890 at 115200.', 'cat.kenwoodHost': 'Or over the network (host:port)', 'cat.kenwoodHostHint': 'A serial-over-network bridge \u2014 ser2net, an Ethernet-serial adapter, a Raspberry Pi at the radio. Filled in, it is used INSTEAD of the COM port above. This is not the radio\u2019s own RJ45 socket, which speaks Kenwood\u2019s KNS protocol and is not supported.', 'cat.yaesuPort': 'Yaesu CAT port', 'cat.yaesuPortHint': 'The rig CAT port — on an FTDX10/FTDX101 over USB this is the ENHANCED COM port, not the standard one.', 'cat.yaesuBaudHint': 'Must match the radio menu (FTDX10/FTDX101 default: 38400).', 'cat.lowerLines': 'Lower the DTR and RTS lines on connect', 'cat.lowerLinesHint': 'If your radio is always on TX, tick this.', 'cat.kwDataMode': 'Data modes (FT8/PSK…) use', 'cat.kwDataUsb': 'USB', 'cat.kwDataMd6': 'DATA mode — MD6 (Elecraft K3/K4)', 'cat.kwDataKeep': 'Leave the rig’s mode unchanged', 'cat.kwDataHint': 'What OpsLog sets on the rig for a data mode. No single command fits every rig: an Elecraft K3/K4 wants DATA (MD6); a TS-590SG/TS-990S data mode is a USB modifier set on the rig, so pick USB or, safest, "Leave unchanged" and switch the rig to DATA yourself. On MD6 a plain Kenwood (TS-590/990) would land on FSK/RTTY — do not use it there.', 'cat.optIcom': 'Icom (CI-V USB)', 'cat.optIcomNet': 'Icom (CI-V network)', 'cat.optTci': 'TCI', 'flxpw.title': 'FlexRadio \u2014 power per band and mode', 'flxpw.hint': 'TX power applied when the band or mode changes. Leave a box empty to leave the power alone.', 'flxpw.band': 'Band', 'flxb.title': 'FlexRadio \u2014 per-band antennas and power', 'flxb.hint': 'Antennas are applied when the band changes; power when the band or the mode changes. Leave a power box empty to leave it alone.', 'flxb.rxAnt': 'RX antenna', 'flxb.txAnt': 'TX antenna', 'flxb.noRadio': 'No antennas reported yet \u2014 connect the FlexRadio, then reopen this panel.', 'flxpw.phone': 'Phone', 'flxpw.digi': 'Digital', 'flxpw.noBands': 'No bands configured \u2014 add them in Lists \u2192 Bands.', 'flxpw.saved': 'Saved',
|
||||
'cat.icomNetHost': 'Rig IP / hostname', 'cat.icomNetUser': 'Network user (ID)', 'cat.icomNetPass': 'Network password',
|
||||
@@ -327,7 +328,7 @@ const en: Dict = {
|
||||
// Email panel
|
||||
'em.none': 'None', 'em.smtpAuth': 'SMTP requires authorization', 'em.username': 'Username', 'em.fromAddr': 'From address', 'em.replyTo': 'Reply-To address', 'em.replyToPh': '(optional — where replies go)', 'em.replyToHint': 'Leave blank to use the From address. Set it so correspondents reply to e.g. your personal inbox.',
|
||||
'em.sendTest': 'Send test e-mail', 'em.sendingTest': 'Sending test…', 'em.testSent': 'Test e-mail sent ✓', 'em.testFailed': 'Test failed: ',
|
||||
'em.qslCardEmail': 'OpsLog QSL card e-mail', 'em.qslVarsHint': 'Message sent with the QSL card. Variables:', 'em.subject': 'Subject', 'em.body': 'Body', 'em.autoSend': 'Auto-send OpsLog QSL when a QSO is logged', 'em.autoSendHint': 'Sends automatically only when the contact has an e-mail address and a default QSL template exists.',
|
||||
'em.recEmail': 'QSO recording e-mail', 'em.recVarsHint': 'Message sent with the QSO audio recording. Variables:', 'em.qslCardEmail': 'OpsLog QSL card e-mail', 'em.qslVarsHint': 'Message sent with the QSL card. Variables:', 'em.subject': 'Subject', 'em.body': 'Body', 'em.autoSend': 'Auto-send OpsLog QSL when a QSO is logged', 'em.autoSendHint': 'Sends automatically only when the contact has an e-mail address and a default QSL template exists.',
|
||||
'settings.title': 'Preferences',
|
||||
'btn.cancel': 'Cancel', 'btn.save': 'Save', 'btn.saveClose': 'Save and close', 'btn.savingLong': 'Saving…',
|
||||
// Component keys (chat / call history / band map / first-run / contest / adif extras)
|
||||
@@ -574,7 +575,8 @@ const fr: Dict = {
|
||||
'uscty.backfillIntro': "Résout le comté (et le locator) pour les QSO US déjà dans ton log qui n'en ont pas. Les valeurs existantes sont conservées — seuls les vides sont remplis.",
|
||||
'uscty.backfillRun': 'Remplir les comtés manquants',
|
||||
'uscty.backfillDone': '{s} QSO US analysés · {c} comtés, {g} locators remplis.',
|
||||
'station.title': 'Contrôle station', 'station.rotator': 'Rotator', 'station.rotatorNoRead': 'Azimut non lu', 'station.pattern': 'Diagramme', 'station.bi': 'Bi', 'station.retract': 'Rétracter les éléments', 'station.moving': 'EN MOUVEMENT', 'station.elements': 'Éléments (mm)', 'station.read': 'Lire', 'station.readLengths': 'Lire les longueurs actuelles depuis le contrôleur', 'station.noLengths': 'Longueurs inconnues — clique sur Lire pour les récupérer depuis le contrôleur.', 'station.element': 'Élément', 'station.reflector': 'Réflecteur', 'station.driven': 'Radiateur', 'station.director': 'Dir', 'station.set': 'Régler', 'station.elementsHint': "Chaque appui allonge/raccourcit l'élément de 2 mm (comme le pupitre). Vérifie quel élément répond sur ton antenne.", 'station.setExactLen': "Clique pour taper la longueur actuelle exacte (recale la base si la lecture auto est fausse).", 'station.atMax': "Refusé par le contrôleur — l'élément est probablement en butée (longueur max pour cette bande), il ne peut plus s'allonger.", 'station.go': 'Aller', 'station.stop': 'Stop', 'station.dragHint': 'Glisse la poignée à gauche d un panneau pour le déplacer. Choisis un nombre de colonnes pour la disposition.', 'station.dragMove': 'Glisser pour déplacer ce panneau', 'station.colsAuto': 'Auto', 'station.addDevice': 'Ajouter un appareil', 'station.editDevice': "Modifier l'appareil", 'station.empty': "Aucune carte relais. Ajoute un WebSwitch 1216H ou une carte KMTronic 8 relais pour piloter l'alimentation et les accessoires de ta station.", 'station.online': 'En ligne', 'station.offline': 'Hors ligne', 'station.edit': 'Modifier', 'station.delete': 'Supprimer', 'station.relay': 'Relais', 'station.on': 'ON', 'station.off': 'OFF', 'station.type': "Type d'appareil", 'station.name': 'Nom', 'station.host': 'Hôte / IP', 'station.user': "Nom d'utilisateur", 'station.pass': 'Mot de passe', 'station.optional': 'optionnel', 'station.ftdiSerial': 'Numéro de série FTDI', 'station.detect': 'Détecter', 'station.ftdiHint': "La carte Denkovi se pilote en FTDI bit-bang (pas via le port COM). Choisis son numéro de série (ex. DAE0006K). Nécessite le driver FTDI D2XX installé.", 'station.channels': 'Relais', 'station.comPort': 'Port COM', 'station.noPorts': 'Aucun port', 'station.usbRelayHint': "Cartes USB-série bon marché (CH340/LCUS) protocole A0. Si la tienne ne commute pas, donne-moi le modèle / jeu de commandes.", 'station.labels': 'Libellés des relais', 'station.cancel': 'Annuler', 'station.save': 'Enregistrer', 'station.test': 'Tester la connexion', 'station.testOk': 'Connecté — {n} relais', 'station.testFail': 'Non connecté', 'station.detectNone': 'Aucune carte FTDI trouvée — vérifie le câble et que le driver D2XX est installé.', 'station.detectFound': '{n} carte(s) détectée(s).',
|
||||
'station.title': 'Contrôle station', 'station.rotator': 'Rotator', 'station.rotatorNoRead': 'Azimut non lu', 'station.pattern': 'Diagramme', 'station.bi': 'Bi', 'station.retract': 'Rétracter les éléments', 'station.moving': 'EN MOUVEMENT', 'station.elements': 'Éléments (mm)', 'station.read': 'Lire', 'station.readLengths': 'Lire les longueurs actuelles depuis le contrôleur', 'station.noLengths': 'Longueurs inconnues — clique sur Lire pour les récupérer depuis le contrôleur.', 'station.element': 'Élément', 'station.reflector': 'Réflecteur', 'station.driven': 'Radiateur', 'station.director': 'Dir', 'station.set': 'Régler', 'station.elementsHint': "Chaque appui allonge/raccourcit l'élément de 2 mm (comme le pupitre). Vérifie quel élément répond sur ton antenne.", 'station.setExactLen': "Clique pour taper la longueur actuelle exacte (recale la base si la lecture auto est fausse).", 'station.atMax': "Refusé par le contrôleur — l'élément est probablement en butée (longueur max pour cette bande), il ne peut plus s'allonger.", 'station.go': 'Aller', 'station.stop': 'Stop', 'station.dragHint': 'Glisse la poignée à gauche d un panneau pour le déplacer. Choisis un nombre de colonnes pour la disposition.', 'station.dragMove': 'Glisser pour déplacer ce panneau', 'station.colsAuto': 'Auto', 'station.addDevice': 'Ajouter un appareil', 'station.editDevice': "Modifier l'appareil", 'station.empty': "Aucune carte relais. Ajoute un WebSwitch 1216H ou une carte KMTronic 8 relais pour piloter l'alimentation et les accessoires de ta station.", 'station.online': 'En ligne', 'station.offline': 'Hors ligne', 'station.edit': 'Modifier', 'station.delete': 'Supprimer', 'station.relay': 'Relais', 'station.on': 'ON', 'station.off': 'OFF', 'station.type': "Type d'appareil", 'station.name': 'Nom', 'station.host': 'Hôte / IP', 'station.hostHint': "IP du LAN en local. Pour joindre la carte depuis L'EXTÉRIEUR, saisis une URL complète ici — ex. https://relais.tondomaine.com — pointant vers un reverse proxy (Nginx Proxy Manager…) qui expose le port HTTP de la carte.", 'station.user': "Nom d'utilisateur", 'station.pass': 'Mot de passe', 'station.optional': 'optionnel', 'station.ftdiSerial': 'Numéro de série FTDI', 'station.detect': 'Détecter', 'station.ftdiHint': "La carte Denkovi se pilote en FTDI bit-bang (pas via le port COM). Choisis son numéro de série (ex. DAE0006K). Nécessite le driver FTDI D2XX installé.", 'station.channels': 'Relais', 'station.comPort': 'Port COM', 'station.noPorts': 'Aucun port', 'station.usbRelayHint': "Cartes USB-série bon marché (CH340/LCUS) protocole A0. Si la tienne ne commute pas, donne-moi le modèle / jeu de commandes.", 'station.labels': 'Libellés des relais', 'station.cancel': 'Annuler', 'station.save': 'Enregistrer', 'station.test': 'Tester la connexion', 'station.testOk': 'Connecté — {n} relais', 'station.testFail': 'Non connecté', 'station.detectNone': 'Aucune carte FTDI trouvée — vérifie le câble et que le driver D2XX est installé.', 'station.detectFound': '{n} carte(s) détectée(s).',
|
||||
'awards.followHint': 'Diplômes affichés dans l’onglet Awards. Laisse la colonne de droite vide pour tous les afficher.', 'awards.available': 'Tous les diplômes', 'awards.followed': 'Suivis', 'awards.search': 'Filtrer…', 'awards.addAll': 'Tout ajouter', 'awards.clear': 'Vider', 'awards.allTracked': 'Tous les diplômes sont suivis.', 'awards.noneFollowed': 'Aucun pour l’instant — l’onglet Awards les montre tous.',
|
||||
'sec.awards': 'Diplômes', 'sec.cat': 'Interface CAT', 'sec.rotator': 'Rotator', 'sec.winkeyer': 'Manipulateur CW',
|
||||
'sec.antenna': 'Antenne motorisée', 'sec.antgenius': 'Antenna Genius', 'sec.tunergenius': 'Tuner Genius', 'sec.pgxl': 'Amplificateur', 'sec.flex': 'FlexRadio', 'sec.audio': 'Périphériques audio',
|
||||
// Panneau Manipulateur CW
|
||||
@@ -685,9 +687,9 @@ const fr: Dict = {
|
||||
'cat.hint': "Lit la fréquence / bande / mode du poste et les injecte dans le bandeau de saisie en temps réel. Utilise OmniRig (gratuit, tout poste) ou — pour FlexRadio — l'API native SmartSDR (sans OmniRig, temps réel, sans le bug du mode au 2ᵉ clic).",
|
||||
'ag2.hint': "OpsLog dialogue avec le switch 4O3A Antenna Genius en TCP (protocole GSCP). Le port est fixé à 9007, seule l'IP de l'appareil est nécessaire. Un widget ancré permet ensuite de commuter les antennes par port (A/B).", 'ag2.password': 'Mot de passe distant', 'ag2.passwordPh': 'vide en LAN', 'ag2.passwordHint': "Nécessaire seulement à distance — l'appareil annonce alors « AG AUTH » et refuse les commandes tant qu'on n'est pas identifié. Laisse vide sur le réseau local.",
|
||||
'tg2.hint': "OpsLog dialogue avec le 4O3A Tuner Genius XL en TCP (port fixé à 9010), seule l'IP de l'appareil est nécessaire. Un widget ancré affiche le ROS et la puissance directe et propose Accord, Bypass et Operate/Standby. Pilotage direct (pas via la radio) pour n'utiliser qu'une des connexions de la boîte.", 'tg2.enable': "Activer le contrôle du Tuner Genius", 'tg2.portHint': "Le port TCP est fixé à 9010 sur l'appareil.", 'tg2.password': 'Code distant', 'tg2.passwordPh': 'vide en LAN', 'tg2.passwordHint': "Nécessaire seulement à distance — l'appareil annonce alors « AUTH » et refuse les commandes tant qu'on n'est pas identifié. Laisse vide sur le réseau local.",
|
||||
'rot.enable': 'Activer le contrôle du rotator', 'rot.testOkRG': 'Connecté — le Rotator Genius a accepté la commande (rotation vers 0°).', 'rot.type': 'Type de rotator', 'rot.rotatorNum': 'Rotator n°', 'rot.dual': 'Deux rotors', 'rot.rotor1': 'Rotor 1', 'rot.rotor2': 'Rotor 2', 'rot.name': 'Nom', 'rot.antenna': 'Antenne', 'rot.antenna1': 'Antenne rotor 1', 'rot.antenna2': 'Antenne rotor 2', 'rot.name1': 'Nom du rotor 1', 'rot.name2': 'Nom du rotor 2', 'rot.antStd': 'Antenne standard', 'rot.antMotor': 'Motorisée (Ultrabeam/SteppIR)', 'rot.add': 'Ajouter un rotor', 'rot.remove': 'Supprimer le rotor', 'rot.none': 'Aucun rotor configuré. Cliquez sur « Ajouter un rotor ».', 'rot.rgDual': 'Ce Rotator Genius pilote deux rotors (en ajoute un second)', 'rot.testRotor1': 'Tester rotor 1', 'rot.testRotor2': 'Tester rotor 2', 'rot.dualHint': 'Deux rotors indépendants de n\'importe quel type — par exemple un ARCO et un Rotator Genius côte à côte. Configurez chacun ci-dessous ; OpsLog affiche un sélecteur Rotor 1/2 sur le compas pour choisir celui qu\'il tourne et affiche. Réglez chaque rotor sur « Motorisée » pour que les tracés de boom/diagramme (inverse, bidirectionnel) n\'apparaissent que pour celui qui porte l\'Ultrabeam/SteppIR. (Pour un seul Rotator Genius pilotant deux rotors, réglez les deux sur Rotator Genius avec le même hôte et le rotator n° 1 et 2.)', 'rot.rgHint': 'Parle directement à un Rotator Genius 4O3A en TCP (port 9006 par défaut) — sans PstRotator. Le n° choisit lequel des deux rotators du boîtier piloter.', 'rot.arcoHint': "Parle directement à tout contrôleur réglé sur Yaesu GS-232A — sans PstRotator. microHAM ARCO : régler Config → LAN → CONTROL PROTOCOL (ou USB CONTROL PROTOCOL) sur « Yaesu GS-232A » ; en USB la vitesse est sans importance. ERC (Easy Rotor Control, ERC Mini compris) : son émulation DOIT être réglée sur GS-232 — un ERC laissé en Hy-Gain DCU-1 parle un autre jeu de commandes et ne répondra pas — puis choisir son port COM et la même vitesse que dans la configuration de l'ERC.", 'rot.hint': "OpsLog envoie des commandes UDP à PstRotator. Active l'écouteur UDP de PstRotator (Setup → Communication → UDP) avant de tester.",
|
||||
'rot.enable': 'Activer le contrôle du rotator', 'rot.testOkRG': 'Connecté — le Rotator Genius a accepté la commande (rotation vers 0°).', 'rot.type': 'Type de rotator', 'rot.rotatorNum': 'Rotator n°', 'rot.dual': 'Deux rotors', 'rot.rotor1': 'Rotor 1', 'rot.rotor2': 'Rotor 2', 'rot.name': 'Nom', 'rot.antenna': 'Antenne', 'rot.antenna1': 'Antenne rotor 1', 'rot.antenna2': 'Antenne rotor 2', 'rot.name1': 'Nom du rotor 1', 'rot.name2': 'Nom du rotor 2', 'rot.antStd': 'Antenne standard', 'rot.antMotor': 'Motorisée (Ultrabeam/SteppIR)', 'rot.add': 'Ajouter un rotor', 'rot.remove': 'Supprimer le rotor', 'rot.none': 'Aucun rotor configuré. Cliquez sur « Ajouter un rotor ».', 'rot.rgDual': 'Ce Rotator Genius pilote deux rotors (en ajoute un second)', 'rot.testRotor1': 'Tester rotor 1', 'rot.testRotor2': 'Tester rotor 2', 'rot.dualHint': 'Deux rotors indépendants de n\'importe quel type — par exemple un ARCO et un Rotator Genius côte à côte. Configurez chacun ci-dessous ; OpsLog affiche un sélecteur Rotor 1/2 sur le compas pour choisir celui qu\'il tourne et affiche. Réglez chaque rotor sur « Motorisée » pour que les tracés de boom/diagramme (inverse, bidirectionnel) n\'apparaissent que pour celui qui porte l\'Ultrabeam/SteppIR. (Pour un seul Rotator Genius pilotant deux rotors, réglez les deux sur Rotator Genius avec le même hôte et le rotator n° 1 et 2.)', 'rot.rgHint': 'Parle directement à un Rotator Genius 4O3A en TCP (port 9006 par défaut) — sans PstRotator. Le n° choisit lequel des deux rotators du boîtier piloter.', 'rot.arcoHint': "Parle directement à tout contrôleur réglé sur Yaesu GS-232A — sans PstRotator. microHAM ARCO : régler Config → LAN → CONTROL PROTOCOL (ou USB CONTROL PROTOCOL) sur « Yaesu GS-232A » ; en USB la vitesse est sans importance. ERC (Easy Rotor Control, ERC Mini compris) : son émulation DOIT être réglée sur GS-232 — un ERC laissé en Hy-Gain DCU-1 parle un autre jeu de commandes et ne répondra pas — puis choisir son port COM et la même vitesse que dans la configuration de l'ERC.", 'rot.dcu1Hint': "Parle le jeu de commandes Hy-Gain DCU-1 (RotorCard DXA, Idiom Press Rotor-EZ, Green Heron). Connexion via le port COM du contrôleur (un DCU-1 est à 4800 bauds ; RotorCard/Green Heron peuvent différer — reprendre la vitesse du contrôleur) ou en TCP via un pont série-sur-IP. Azimut uniquement, pas d'élévation. Nouveau pilote — signalez si votre contrôleur nécessite une autre commande ou vitesse.", 'rot.hint': "OpsLog envoie des commandes UDP à PstRotator. Active l'écouteur UDP de PstRotator (Setup → Communication → UDP) avant de tester.",
|
||||
'extsvc.hint': "Envoie les QSO enregistrés vers des carnets en ligne. Chaque service upload automatiquement à chaque nouveau QSO si activé ; le délai est propre à chaque service (immédiat, ou 1–2 min pour corriger un QSO mal saisi avant).",
|
||||
'hw.motorTxInhibit': "Inhiber la transmission pendant que l'antenne bouge", 'hw.motorTxInhibitHint': "Empêche le FlexRadio d'émettre pendant que les éléments bougent (nécessite le FlexRadio en API + cette antenne activée). Sans effet avec les autres radios.", 'hw.motorAntenna': 'Antenne motorisée', 'hw.motorEnable': "Activer le contrôle de l'antenne", 'hw.motorType': "Type d'antenne", 'hw.motorTransport': 'Connexion', 'hw.motorTcp': 'Réseau (TCP)', 'hw.motorSerial': 'Série (COM)', 'hw.motorCom': 'Port série', 'hw.motorBaud': 'Débit', 'hw.steppirHint': "Les contrôleurs SteppIR sont en RS-232 série (port DB9 « DATA OUT »). Série = un adaptateur USB↔RS-232 (FTDI), vu comme un port COM. Réseau = un pont série-Ethernet (comme pour l'Ultrabeam).", 'hw.steppirRange': 'Plage accordable', 'hw.steppirRangeHint': "La couverture en fréquence de la SteppIR. Sur une bande hors de cette plage (p. ex. 30 m avec une SteppIR 20 m-6 m), OpsLog n'essaie pas d'accorder l'antenne et n'inhibe pas l'émission. Défaut 13-54 MHz (20 m-6 m) ; abaisse la borne basse (p. ex. 6) pour une SteppIR équipée 40 m.", 'hw.ultrabeam': 'Antenne (Ultrabeam)', 'hw.audioVoice': 'Périphériques audio & manipulateur vocal',
|
||||
'hw.motorTxInhibit': "Inhiber la transmission pendant que l'antenne bouge", 'hw.motorTxInhibitHint': "Empêche le FlexRadio d'émettre pendant que les éléments bougent (nécessite le FlexRadio en API + cette antenne activée). Sans effet avec les autres radios.", 'hw.motorAntenna': 'Antenne motorisée', 'hw.motorEnable': "Activer le contrôle de l'antenne", 'hw.motorType': "Type d'antenne", 'hw.motorTransport': 'Connexion', 'hw.motorTcp': 'Réseau (TCP)', 'hw.motorSerial': 'Série (COM)', 'hw.motorCom': 'Port série', 'hw.motorBaud': 'Débit', 'hw.steppirHint': "Les contrôleurs SteppIR sont en RS-232 série (port DB9 « DATA OUT »). Série = un adaptateur USB↔RS-232 (FTDI), vu comme un port COM. Réseau = un pont série-Ethernet (comme pour l'Ultrabeam).", 'hw.steppirRange': 'Plage accordable', 'hw.steppirRangeHint': "La couverture en fréquence de la SteppIR. Sur une bande hors de cette plage (p. ex. 30 m avec une SteppIR 20 m-6 m), OpsLog n'essaie pas d'accorder l'antenne et n'inhibe pas l'émission. Défaut 13-54 MHz (20 m-6 m) ; abaisse la borne basse (p. ex. 6) pour une SteppIR équipée 40 m.", 'hw.motorBands': 'Bandes couvertes', 'hw.ultrabeam': 'Antenne (Ultrabeam)', 'hw.audioVoice': 'Périphériques audio & manipulateur vocal',
|
||||
'cat.enable': 'Activer le CAT', 'cat.backend': 'Backend', 'cat.optOmnirig': 'OmniRig', 'cat.optFlex': 'FlexRadio (API)', 'cat.share': 'Partager le CAT avec les autres logiciels', 'cat.shareHint': "Dans l'autre logiciel, choisissez le modèle « Hamlib NET rigctl » et saisissez 127.0.0.1:4532. Fonctionne avec tous les backends, pas seulement les natifs.", 'cat.sharePort': 'Port de partage', 'cat.pttKey': 'Activer la touche PTT', 'cat.pttKeyPress': 'Appuyez sur une touche…', 'cat.pttKeyNone': 'Cliquez pour définir une touche', 'cat.pttKeyClear': 'Effacer', 'cat.pttKeyToggle': 'Mode bascule (appui = émission, nouvel appui = arrêt)', 'cat.pttKeyHint': "Quand OpsLog a le focus, cette touche passe la radio en émission — maintenue par défaut (relâcher pour arrêter), ou verrouillée en mode bascule. Elle utilise la méthode PTT de Audio → PTT (CAT / RTS / DTR), avec repli sur le CAT. Choisissez une touche que vous ne tapez jamais en journalisant (ex. Pause, Arrêt défil., ou une pédale mappée dessus) — OpsLog l'intercepte pour qu'elle n'atterrisse pas dans un champ.", 'cat.optXiegu': 'Xiegu (USB)', 'cat.xieguPort': 'Port CAT Xiegu', 'cat.xieguBaudHint': 'Doit correspondre au menu de la radio (G90 par défaut : 19200).', 'cat.xieguAddrHint': "Adresse CI-V d'usine de la famille G90/X6100 : 0x70.", 'cat.xieguPTTLine': 'Passage en \u00e9mission', 'cat.xieguPTTCiv': 'Commande CI-V', 'cat.xieguPTTHint': 'Un G90 ne passe pas en \u00e9mission sur la commande CI-V : les interfaces comme le DE-19 le pilotent par RTS ou DTR. Choisissez la ligne de la v\u00f4tre \u2014 c\u2019est aussi ce qui permet \u00e0 WSJT-X d\u2019\u00e9mettre via le partage CAT.', 'cat.optYaesu': 'Yaesu (USB)', 'cat.optKenwood': 'Kenwood (USB, réseau)', 'cat.civTrace': 'Journaliser le protocole CAT', 'cat.civTraceHint': '\u00c9crit dans le journal chaque trame CAT \u00e9chang\u00e9e avec la radio \u2014 CI-V en hexad\u00e9cimal, Kenwood en texte. Pour signaler une radio qui r\u00e9pond de travers \u2014 un bouton qui fait autre chose, une fr\u00e9quence qui saute. Valable pour la session seulement : c\u2019est un diagnostic, et le journal grossit vite.', 'cat.kenwoodPort': 'Port COM Kenwood', 'cat.kenwoodPortHint': 'Le port s\u00e9rie CAT/USB de la radio (TS-590, TS-890, TS-990, TS-2000, ainsi que les Elecraft K3/K4 qui parlent le m\u00eame dialecte).', 'cat.kenwoodBaudHint': 'Doit correspondre au MENU de la radio : un TS-590 sort d\u2019usine \u00e0 9600, un TS-890 \u00e0 115200.', 'cat.kenwoodHost': 'Ou par le r\u00e9seau (h\u00f4te:port)', 'cat.kenwoodHostHint': 'Un pont s\u00e9rie-r\u00e9seau \u2014 ser2net, un bo\u00eetier Ethernet-s\u00e9rie, un Raspberry Pi pr\u00e8s de la radio. S\u2019il est rempli, il est utilis\u00e9 \u00c0 LA PLACE du port COM ci-dessus. Il ne s\u2019agit pas de la prise RJ45 de la radio, qui parle le protocole KNS de Kenwood et n\u2019est pas prise en charge.', 'cat.yaesuPort': 'Port CAT Yaesu', 'cat.yaesuPortHint': "Le port CAT de la radio — sur un FTDX10/FTDX101 en USB c'est le port COM ENHANCED, pas le standard.", 'cat.yaesuBaudHint': 'Doit correspondre au menu de la radio (FTDX10/FTDX101 par défaut : 38400).', 'cat.lowerLines': 'Abaisser les lignes DTR et RTS à la connexion', 'cat.lowerLinesHint': 'Si votre radio est toujours en émission, cochez ceci.', 'cat.kwDataMode': 'Modes data (FT8/PSK…)', 'cat.kwDataUsb': 'USB', 'cat.kwDataMd6': 'Mode DATA — MD6 (Elecraft K3/K4)', 'cat.kwDataKeep': 'Ne pas changer le mode de la radio', 'cat.kwDataHint': "Ce qu'OpsLog règle sur la radio pour un mode data. Aucune commande unique ne convient à toutes : un Elecraft K3/K4 veut DATA (MD6) ; sur un TS-590SG/TS-990S le mode data est un modificateur d'USB réglé sur la radio, choisissez donc USB ou, plus sûr, « Ne pas changer » et passez la radio en DATA vous-même. En MD6 un Kenwood classique (TS-590/990) tomberait en FSK/RTTY — à ne pas utiliser là.", 'cat.optIcom': 'Icom (CI-V USB)', 'cat.optIcomNet': 'Icom (CI-V réseau)', 'cat.optTci': 'TCI', 'flxpw.title': 'FlexRadio \u2014 puissance par bande et par mode', 'flxpw.hint': 'Puissance d\u2019\u00e9mission appliqu\u00e9e au changement de bande ou de mode. Laissez une case vide pour ne pas toucher \u00e0 la puissance.', 'flxpw.band': 'Bande', 'flxb.title': 'FlexRadio \u2014 antennes et puissance par bande', 'flxb.hint': 'Les antennes sont appliqu\u00e9es au changement de bande ; la puissance au changement de bande ou de mode. Laissez une case de puissance vide pour ne pas y toucher.', 'flxb.rxAnt': 'Antenne RX', 'flxb.txAnt': 'Antenne TX', 'flxb.noRadio': 'Aucune antenne remont\u00e9e \u2014 connectez le FlexRadio, puis rouvrez ce panneau.', 'flxpw.phone': 'Phonie', 'flxpw.digi': 'Num\u00e9rique', 'flxpw.noBands': 'Aucune bande configur\u00e9e \u2014 ajoutez-les dans Listes \u2192 Bandes.', 'flxpw.saved': 'Enregistr\u00e9',
|
||||
'cat.icomNetHost': 'IP / nom d\'hôte du poste', 'cat.icomNetUser': 'Utilisateur réseau (ID)', 'cat.icomNetPass': 'Mot de passe réseau',
|
||||
'cat.icomNetHint': "Se connecte directement au serveur LAN intégré du poste — sans RS-BA1 ni Remote Utility (ferme-les d'abord). Utilise l'ID/mot de passe Network User1 configurés dans le menu Network du poste. Un poste en veille est allumé automatiquement.",
|
||||
@@ -732,7 +734,7 @@ const fr: Dict = {
|
||||
'db.mysqlNote': "Seuls les QSO vont dans MySQL ; tes réglages, profils, stations et cluster restent locaux (et rapides). Les QSO locaux existants ne sont pas copiés — importe-les dans le journal partagé si tu veux ton historique là-bas.",
|
||||
'em.none': 'Aucun', 'em.smtpAuth': 'Le SMTP requiert une authentification', 'em.username': 'Utilisateur', 'em.fromAddr': 'Adresse expéditeur', 'em.replyTo': 'Adresse de réponse', 'em.replyToPh': '(optionnel — où vont les réponses)', 'em.replyToHint': "Vide = utilise l'adresse expéditeur. Renseigne-la pour que les correspondants répondent p. ex. sur ta boîte perso.",
|
||||
'em.sendTest': 'Envoyer un e-mail test', 'em.sendingTest': 'Envoi du test…', 'em.testSent': 'E-mail test envoyé ✓', 'em.testFailed': 'Échec du test : ',
|
||||
'em.qslCardEmail': 'E-mail de carte QSL OpsLog', 'em.qslVarsHint': 'Message envoyé avec la carte QSL. Variables :', 'em.subject': 'Objet', 'em.body': 'Corps', 'em.autoSend': "Envoyer auto la QSL OpsLog à l'enregistrement d'un QSO", 'em.autoSendHint': "Envoi automatique uniquement si le contact a une adresse e-mail et qu'un modèle QSL par défaut existe.",
|
||||
'em.recEmail': 'E-mail d’enregistrement QSO', 'em.recVarsHint': 'Message envoyé avec l’enregistrement audio du QSO. Variables :', 'em.qslCardEmail': 'E-mail de carte QSL OpsLog', 'em.qslVarsHint': 'Message envoyé avec la carte QSL. Variables :', 'em.subject': 'Objet', 'em.body': 'Corps', 'em.autoSend': "Envoyer auto la QSL OpsLog à l'enregistrement d'un QSO", 'em.autoSendHint': "Envoi automatique uniquement si le contact a une adresse e-mail et qu'un modèle QSL par défaut existe.",
|
||||
'settings.title': 'Préférences',
|
||||
'btn.cancel': 'Annuler', 'btn.save': 'Enregistrer', 'btn.saveClose': 'Enregistrer et fermer', 'btn.savingLong': 'Enregistrement…',
|
||||
'chatp.chat': 'Chat', 'chatp.online': 'En ligne', 'chatp.close': 'Fermer', 'chatp.noMessages': 'Aucun message pour le moment.', 'chatp.messagePh': 'Message…',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Single source of truth for the app version shown in the UI (header + About).
|
||||
// Bump this on a release (the release script updates it alongside telemetry.go).
|
||||
export const APP_VERSION = '0.23.6';
|
||||
export const APP_VERSION = '0.23.8';
|
||||
|
||||
// Author / credits, shown in Help -> About.
|
||||
export const APP_AUTHOR = 'F4BPO';
|
||||
|
||||
Vendored
+4
@@ -495,6 +495,8 @@ export function GetStationStatus():Promise<Array<main.StationDeviceStatus>>;
|
||||
|
||||
export function GetTelemetryEnabled():Promise<boolean>;
|
||||
|
||||
export function GetTrackedAwards():Promise<Array<string>>;
|
||||
|
||||
export function GetTunerGeniusSettings():Promise<main.TunerGeniusSettings>;
|
||||
|
||||
export function GetTunerGeniusStatus():Promise<tunergenius.Status>;
|
||||
@@ -897,6 +899,8 @@ export function SaveStationDevices(arg1:Array<main.StationDevice>):Promise<void>
|
||||
|
||||
export function SaveStationSettings(arg1:main.StationSettings):Promise<void>;
|
||||
|
||||
export function SaveTrackedAwards(arg1:Array<string>):Promise<void>;
|
||||
|
||||
export function SaveTunerGeniusSettings(arg1:main.TunerGeniusSettings):Promise<void>;
|
||||
|
||||
export function SaveUDPIntegration(arg1:udp.Config):Promise<udp.Config>;
|
||||
|
||||
@@ -938,6 +938,10 @@ export function GetTelemetryEnabled() {
|
||||
return window['go']['main']['App']['GetTelemetryEnabled']();
|
||||
}
|
||||
|
||||
export function GetTrackedAwards() {
|
||||
return window['go']['main']['App']['GetTrackedAwards']();
|
||||
}
|
||||
|
||||
export function GetTunerGeniusSettings() {
|
||||
return window['go']['main']['App']['GetTunerGeniusSettings']();
|
||||
}
|
||||
@@ -1742,6 +1746,10 @@ export function SaveStationSettings(arg1) {
|
||||
return window['go']['main']['App']['SaveStationSettings'](arg1);
|
||||
}
|
||||
|
||||
export function SaveTrackedAwards(arg1) {
|
||||
return window['go']['main']['App']['SaveTrackedAwards'](arg1);
|
||||
}
|
||||
|
||||
export function SaveTunerGeniusSettings(arg1) {
|
||||
return window['go']['main']['App']['SaveTunerGeniusSettings'](arg1);
|
||||
}
|
||||
|
||||
@@ -3156,6 +3156,7 @@ export namespace main {
|
||||
follow: boolean;
|
||||
step_khz: number;
|
||||
tx_inhibit: boolean;
|
||||
bands: string[];
|
||||
freq_min_mhz: number;
|
||||
freq_max_mhz: number;
|
||||
|
||||
@@ -3175,6 +3176,7 @@ export namespace main {
|
||||
this.follow = source["follow"];
|
||||
this.step_khz = source["step_khz"];
|
||||
this.tx_inhibit = source["tx_inhibit"];
|
||||
this.bands = source["bands"];
|
||||
this.freq_min_mhz = source["freq_min_mhz"];
|
||||
this.freq_max_mhz = source["freq_max_mhz"];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@ func DefaultFolder(dataDir string) string {
|
||||
// statement (no torn-copy window while the app keeps writing), and compacts
|
||||
// the destination as a bonus. It replaces the old "checkpoint + raw io.Copy",
|
||||
// which could capture a half-written page during a concurrent write.
|
||||
func Run(ctx context.Context, dbConn *sql.DB, dbPath, folder string, rotation int, doZip bool) (string, error) {
|
||||
func Run(ctx context.Context, dbConn *sql.DB, dbPath, folder string, rotation int, doZip bool, prefix string) (string, error) {
|
||||
if dbConn == nil {
|
||||
return "", fmt.Errorf("nil db connection")
|
||||
}
|
||||
@@ -54,12 +54,15 @@ func Run(ctx context.Context, dbConn *sql.DB, dbPath, folder string, rotation in
|
||||
if folder == "" {
|
||||
return "", fmt.Errorf("backup folder not set")
|
||||
}
|
||||
if prefix == "" {
|
||||
prefix = "opslog"
|
||||
}
|
||||
if err := os.MkdirAll(folder, 0o755); err != nil {
|
||||
return "", fmt.Errorf("create backup folder: %w", err)
|
||||
}
|
||||
|
||||
stamp := time.Now().Format("2006-01-02")
|
||||
base := fmt.Sprintf("opslog-%s", stamp)
|
||||
base := fmt.Sprintf("%s-%s", prefix, stamp)
|
||||
|
||||
// VACUUM INTO requires a non-existent target → use a temp file, then
|
||||
// move/zip it into place.
|
||||
@@ -92,7 +95,7 @@ func Run(ctx context.Context, dbConn *sql.DB, dbPath, folder string, rotation in
|
||||
}
|
||||
}
|
||||
|
||||
if err := rotate(folder, rotation); err != nil {
|
||||
if err := rotateMatch(folder, rotation, prefix+"-", ".db", ".db.zip"); err != nil {
|
||||
// Rotation errors are non-fatal — the backup itself succeeded.
|
||||
return dstPath, fmt.Errorf("rotate: %w (backup OK at %s)", err, dstPath)
|
||||
}
|
||||
@@ -203,12 +206,6 @@ func copyZipped(src, dst, innerName string) error {
|
||||
return out.Close()
|
||||
}
|
||||
|
||||
// rotate keeps the most recent `keep` SQLite backups (opslog-*.db /
|
||||
// opslog-*.db.zip) and deletes the rest.
|
||||
func rotate(folder string, keep int) error {
|
||||
return rotateMatch(folder, keep, "opslog-", ".db", ".db.zip")
|
||||
}
|
||||
|
||||
// rotateMatch keeps the most recent `keep` files in folder whose name has the
|
||||
// given prefix and one of the given suffixes, deleting older ones. Only matching
|
||||
// files are touched — never unrelated user files in the same folder. The suffix
|
||||
|
||||
+32
-4
@@ -115,6 +115,17 @@ type Kenwood struct {
|
||||
// nothing. Off by default: that is how this backend behaved for its whole
|
||||
// life before the question came up.
|
||||
lowerLines bool
|
||||
|
||||
// tx tracks whether we currently hold PTT (SetPTT true). A Kenwood/Elecraft rig
|
||||
// answers "?;" to a status poll (IF;) WHILE TRANSMITTING; OpsLog used to read
|
||||
// that as "the rig doesn't support IF;", latch it off and drop the whole CAT
|
||||
// link — which tore down the shared-CAT PTT that WSJT-X / JTDX key through, so a
|
||||
// K3 keyed but the logger's transmission fell apart. While PTT is held we skip
|
||||
// the wire poll and hand back the last good state (lastState) instead. txAt caps
|
||||
// the skip so a missed SetPTT(false) can't freeze the state for ever.
|
||||
tx bool
|
||||
txAt time.Time
|
||||
lastState RigState
|
||||
}
|
||||
|
||||
// SetLowerLines chooses whether DTR and RTS are deasserted on connect. Set
|
||||
@@ -255,6 +266,15 @@ func (k *Kenwood) ReadState() (RigState, error) {
|
||||
if k.port == nil {
|
||||
return RigState{}, fmt.Errorf("kenwood: not connected")
|
||||
}
|
||||
// While transmitting, don't poll: the rig returns "?;" to IF; during TX, and
|
||||
// treating that as a fault dropped the shared CAT link the digital-mode
|
||||
// software keys through. Hand back the last known state. The 30 s cap resyncs
|
||||
// if a SetPTT(false) was somehow missed, so a stuck TX can't freeze state.
|
||||
if k.tx && !k.txAt.IsZero() && time.Since(k.txAt) < 30*time.Second {
|
||||
s := k.lastState
|
||||
s.Connected = true
|
||||
return s, nil
|
||||
}
|
||||
raw, err := k.ask("IF;")
|
||||
if err != nil {
|
||||
return RigState{}, err
|
||||
@@ -339,6 +359,7 @@ func (k *Kenwood) ReadState() (RigState, error) {
|
||||
if s.Split {
|
||||
k.curRXFreq = s.RxFreqHz
|
||||
}
|
||||
k.lastState = s // cache for the transmit window, where we can't poll
|
||||
return s, nil
|
||||
}
|
||||
|
||||
@@ -409,7 +430,9 @@ func (k *Kenwood) SetPTT(on bool) error {
|
||||
if k.port == nil {
|
||||
return fmt.Errorf("kenwood: not connected")
|
||||
}
|
||||
k.tx = on
|
||||
if on {
|
||||
k.txAt = time.Now()
|
||||
return k.write("TX;")
|
||||
}
|
||||
return k.write("RX;")
|
||||
@@ -467,10 +490,15 @@ func (k *Kenwood) ask(cmd string) (string, error) {
|
||||
k.rx = k.rx[i+1:]
|
||||
traceText("kenwood", "RX", frame)
|
||||
if frame == "?;" {
|
||||
// The rig rejected the command. Remember it so the poll loop stops
|
||||
// paying a 600 ms timeout for it on every cycle.
|
||||
k.unsupported[want] = true
|
||||
debugLog.Printf("kenwood: this rig does not support %q — not asking again", cmd)
|
||||
// IF; and ID; are universal on Kenwood/Elecraft — a "?;" to them is a
|
||||
// transient "busy" (typically mid-transmit, or a menu open on the rig),
|
||||
// NOT "unsupported". Latching them off would blind the poll loop for
|
||||
// good and read as "lost the rig". Only remember the OPTIONAL commands
|
||||
// (FR/FT/…) so the poll loop stops paying a 600 ms timeout for those.
|
||||
if want != "IF" && want != "ID" {
|
||||
k.unsupported[want] = true
|
||||
debugLog.Printf("kenwood: this rig does not support %q — not asking again", cmd)
|
||||
}
|
||||
return "", fmt.Errorf("kenwood: %s rejected", want)
|
||||
}
|
||||
if strings.HasPrefix(frame, want) {
|
||||
|
||||
@@ -125,14 +125,19 @@ func (c *Client) SetFanMode(mode string) error {
|
||||
default:
|
||||
return fmt.Errorf("powergenius: invalid fan mode %q", mode)
|
||||
}
|
||||
// Set with the bare "key=value" verb the amp uses for its own status fields
|
||||
// (same convention as "operate=1"). The earlier "setup fanmode=…" carried a
|
||||
// bogus prefix the amp silently ignored, so the fan never changed and the next
|
||||
// status kept reporting the old mode — the revert-to-Contest the operator saw.
|
||||
reply, err := c.command("fanmode=" + m)
|
||||
// The verb the amp wants is "setup fanmode=VALUE" — confirmed LIVE: with the
|
||||
// "setup " prefix the amp replies code 0 (accepted), while the bare
|
||||
// "fanmode=VALUE" we switched to earlier is rejected (reply code 0x50000015).
|
||||
// That regression is what stopped the fan from changing; restoring "setup "
|
||||
// fixes it.
|
||||
reply, err := c.command("setup fanmode=" + m)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if code := replyCode(reply); code != "" && code != "0" {
|
||||
applog.Printf("pgxl: set fanmode=%s REJECTED, reply=%q", m, reply)
|
||||
return fmt.Errorf("powergenius: amp rejected fanmode=%s (code %s)", m, code)
|
||||
}
|
||||
applog.Printf("pgxl: set fanmode=%s reply=%q", m, reply)
|
||||
c.statusMu.Lock()
|
||||
c.status.FanMode = m // optimistic
|
||||
@@ -141,6 +146,19 @@ func (c *Client) SetFanMode(mode string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// replyCode returns the result code from an "R<id>|<code>|…" reply — "0" means
|
||||
// the amp accepted the command. Returns "" when the line isn't an R reply.
|
||||
func replyCode(reply string) string {
|
||||
if !strings.HasPrefix(reply, "R") {
|
||||
return ""
|
||||
}
|
||||
p := strings.SplitN(reply, "|", 3)
|
||||
if len(p) < 2 {
|
||||
return ""
|
||||
}
|
||||
return strings.TrimSpace(p[1])
|
||||
}
|
||||
|
||||
// SetOperate puts the amp in OPERATE (1) or STANDBY (0).
|
||||
func (c *Client) SetOperate(on bool) error {
|
||||
v := "0"
|
||||
|
||||
@@ -61,6 +61,22 @@ func get(ctx context.Context, url, user, pass string) ([]byte, error) {
|
||||
return body, nil
|
||||
}
|
||||
|
||||
// relayBase turns a configured host into the base URL of a network relay board.
|
||||
// A bare host or host:port keeps the default http:// (the boards serve plain
|
||||
// HTTP on their LAN). A host that already carries a scheme is used verbatim, so
|
||||
// a board can be reached through an HTTPS reverse proxy — e.g. a Nginx Proxy
|
||||
// Manager entry "https://relay.example.com" fronting the LAN board's port 80,
|
||||
// which is how an operator reaches shack relays from outside when 80/443 are
|
||||
// already taken by the proxy. A trailing slash is trimmed so path parts append
|
||||
// cleanly; an optional sub-path in the host is preserved (a sub-path proxy).
|
||||
func relayBase(host string) string {
|
||||
h := strings.TrimSpace(host)
|
||||
if strings.HasPrefix(h, "http://") || strings.HasPrefix(h, "https://") {
|
||||
return strings.TrimRight(h, "/")
|
||||
}
|
||||
return "http://" + h
|
||||
}
|
||||
|
||||
// ── WebSwitch 1216H ────────────────────────────────────────────────────
|
||||
|
||||
type webswitch struct {
|
||||
@@ -82,7 +98,7 @@ func (w *webswitch) Set(ctx context.Context, relay int, on bool) error {
|
||||
if on {
|
||||
action = "on"
|
||||
}
|
||||
_, err := get(ctx, fmt.Sprintf("http://%s/relaycontrol/%s/%d", w.host, action, relay), "", "")
|
||||
_, err := get(ctx, fmt.Sprintf("%s/relaycontrol/%s/%d", relayBase(w.host), action, relay), "", "")
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -93,7 +109,7 @@ func (w *webswitch) Status(ctx context.Context) ([]bool, error) {
|
||||
sel.WriteString(strconv.Itoa(i))
|
||||
sel.WriteByte('$')
|
||||
}
|
||||
body, err := get(ctx, fmt.Sprintf("http://%s/relaystate/get2/%s", w.host, sel.String()), "", "")
|
||||
body, err := get(ctx, fmt.Sprintf("%s/relaystate/get2/%s", relayBase(w.host), sel.String()), "", "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -140,7 +156,7 @@ func (k *kmtronic) Set(ctx context.Context, relay int, on bool) error {
|
||||
state = "01"
|
||||
}
|
||||
// FF<rr><ss>: e.g. FF0101 = relay 1 on, FF0800 = relay 8 off.
|
||||
_, err := get(ctx, fmt.Sprintf("http://%s/FF%02d%s", k.host, relay, state), k.user, k.pass)
|
||||
_, err := get(ctx, fmt.Sprintf("%s/FF%02d%s", relayBase(k.host), relay, state), k.user, k.pass)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -154,7 +170,7 @@ type kmStatus struct {
|
||||
}
|
||||
|
||||
func (k *kmtronic) Status(ctx context.Context) ([]bool, error) {
|
||||
body, err := get(ctx, fmt.Sprintf("http://%s/status.xml", k.host), k.user, k.pass)
|
||||
body, err := get(ctx, fmt.Sprintf("%s/status.xml", relayBase(k.host)), k.user, k.pass)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -259,8 +275,8 @@ func (d *dingtian) Set(ctx context.Context, relay int, on bool) error {
|
||||
}
|
||||
// type=0 is plain ON/OFF (1 = jogging, 2 = delay, 3 = flash, 4 = toggle),
|
||||
// and time is then unused.
|
||||
body, err := d.getCGI(ctx, fmt.Sprintf("http://%s/relay_cgi.cgi?type=0&relay=%d&on=%d&time=0&pwd=%s&",
|
||||
d.host, relay-1, state, d.pwd))
|
||||
body, err := d.getCGI(ctx, fmt.Sprintf("%s/relay_cgi.cgi?type=0&relay=%d&on=%d&time=0&pwd=%s&",
|
||||
relayBase(d.host), relay-1, state, d.pwd))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -274,7 +290,7 @@ func (d *dingtian) Set(ctx context.Context, relay int, on bool) error {
|
||||
}
|
||||
|
||||
func (d *dingtian) Status(ctx context.Context) ([]bool, error) {
|
||||
body, err := d.getCGI(ctx, fmt.Sprintf("http://%s/relay_cgi_load.cgi", d.host))
|
||||
body, err := d.getCGI(ctx, fmt.Sprintf("%s/relay_cgi_load.cgi", relayBase(d.host)))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -172,3 +172,19 @@ func TestDingtianSetRefusalIsAnError(t *testing.T) {
|
||||
t.Fatal("a refused command answered HTTP 200 and was reported as success")
|
||||
}
|
||||
}
|
||||
|
||||
func TestRelayBase(t *testing.T) {
|
||||
cases := map[string]string{
|
||||
"192.168.1.5": "http://192.168.1.5",
|
||||
"192.168.1.5:8080": "http://192.168.1.5:8080",
|
||||
"https://relay.example.com": "https://relay.example.com",
|
||||
"https://relay.example.com/": "https://relay.example.com",
|
||||
"http://relay.example.com/sw/": "http://relay.example.com/sw",
|
||||
" relay.local ": "http://relay.local",
|
||||
}
|
||||
for in, want := range cases {
|
||||
if got := relayBase(in); got != want {
|
||||
t.Errorf("relayBase(%q) = %q, want %q", in, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
// Package dcu1 drives rotator controllers that speak the Hy-Gain DCU-1 protocol,
|
||||
// over a serial COM port (or a raw TCP socket, e.g. a serial-over-IP bridge).
|
||||
//
|
||||
// DCU-1 is used by the Hy-Gain DCU-1, the Idiom Press Rotor-EZ, Green Heron
|
||||
// controllers, and the RotorCard DXA (hamsupply) for Yaesu DXA rotors. It is a
|
||||
// DIFFERENT command set from Yaesu GS-232 (see internal/rotator/gs232):
|
||||
// semicolon-terminated, azimuth only.
|
||||
//
|
||||
// Commands (';' terminated — roundTrip appends the ';'):
|
||||
//
|
||||
// AP1nnn set the target bearing nnn (000-359)
|
||||
// AM1 rotate to the target (some controllers move on AP1 alone; AM1 is
|
||||
// harmless and makes the Rotor-EZ/DCU-1 variants that need it work)
|
||||
// AI1 query the current bearing → the reply carries the 3-digit azimuth
|
||||
//
|
||||
// The base DCU-1 set has no dedicated stop; Stop re-commands the current bearing,
|
||||
// which halts rotation.
|
||||
package dcu1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.bug.st/serial"
|
||||
)
|
||||
|
||||
const (
|
||||
dialTimeout = 3 * time.Second
|
||||
ioTimeout = 2 * time.Second
|
||||
)
|
||||
|
||||
// Client is a stateless per-call sender, mirroring the gs232/pst/rotgenius idiom.
|
||||
// Exactly one of (Host, Port) or ComPort is used.
|
||||
type Client struct {
|
||||
Host string
|
||||
Port int
|
||||
ComPort string // serial transport: "COM5" etc.
|
||||
// Baud varies by controller (a Hy-Gain DCU-1 is 4800; Green Heron / RotorCard
|
||||
// can differ). Zero keeps 4800.
|
||||
Baud int
|
||||
}
|
||||
|
||||
// New returns a TCP Client (a serial-over-IP bridge in front of the controller).
|
||||
func New(host string, port int) *Client {
|
||||
if host == "" {
|
||||
host = "127.0.0.1"
|
||||
}
|
||||
if port <= 0 || port > 65535 {
|
||||
port = 4001
|
||||
}
|
||||
return &Client{Host: host, Port: port}
|
||||
}
|
||||
|
||||
// NewSerial returns a Client over the controller's COM port.
|
||||
func NewSerial(comPort string, baud int) *Client {
|
||||
return &Client{ComPort: comPort, Baud: baud}
|
||||
}
|
||||
|
||||
// roundTrip opens a connection, sends one ';'-terminated command and (when
|
||||
// wantReply) reads until a 3-digit bearing is present. cmd must NOT carry the
|
||||
// ';'.
|
||||
func (c *Client) roundTrip(cmd string, wantReply bool) (string, error) {
|
||||
var conn io.ReadWriteCloser
|
||||
if c.ComPort != "" {
|
||||
baud := c.Baud
|
||||
if baud <= 0 {
|
||||
baud = 4800
|
||||
}
|
||||
sp, err := serial.Open(c.ComPort, &serial.Mode{BaudRate: baud})
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("open rotator %s @ %d baud: %w", c.ComPort, baud, err)
|
||||
}
|
||||
_ = sp.SetReadTimeout(200 * time.Millisecond)
|
||||
conn = sp
|
||||
} else {
|
||||
nc, err := net.DialTimeout("tcp", net.JoinHostPort(c.Host, strconv.Itoa(c.Port)), dialTimeout)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("connect DCU-1 %s:%d: %w", c.Host, c.Port, err)
|
||||
}
|
||||
_ = nc.SetDeadline(time.Now().Add(ioTimeout))
|
||||
conn = nc
|
||||
}
|
||||
defer conn.Close()
|
||||
if _, err := conn.Write([]byte(cmd + ";")); err != nil {
|
||||
return "", fmt.Errorf("send %q: %w", cmd, err)
|
||||
}
|
||||
if !wantReply {
|
||||
return "", nil
|
||||
}
|
||||
buf := make([]byte, 64)
|
||||
var sb strings.Builder
|
||||
deadline := time.Now().Add(ioTimeout)
|
||||
for time.Now().Before(deadline) {
|
||||
n, err := conn.Read(buf)
|
||||
if n > 0 {
|
||||
sb.Write(buf[:n])
|
||||
// The DCU-1 reply carries the bearing as three digits (framing varies —
|
||||
// ";nnn", "nnn;", "+0nnn"). Stop once we have them rather than on a
|
||||
// specific terminator, so any flavour reads cleanly.
|
||||
if azRe.MatchString(sb.String()) {
|
||||
break
|
||||
}
|
||||
}
|
||||
// A serial read that times out returns (0, nil) — keep polling until the
|
||||
// overall deadline; a real error ends the read.
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
line := strings.TrimSpace(sb.String())
|
||||
if line == "" {
|
||||
return "", fmt.Errorf("no reply to %q", cmd)
|
||||
}
|
||||
return line, nil
|
||||
}
|
||||
|
||||
// GoTo points the antenna at az (0-359): set the target, then rotate.
|
||||
func (c *Client) GoTo(az int) error {
|
||||
az = ((az % 360) + 360) % 360
|
||||
if _, err := c.roundTrip(fmt.Sprintf("AP1%03d", az), false); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err := c.roundTrip("AM1", false)
|
||||
return err
|
||||
}
|
||||
|
||||
// Stop halts rotation. The base DCU-1 set has no stop command, so re-command the
|
||||
// current bearing — the controller stops when the target equals where it is.
|
||||
func (c *Client) Stop() error {
|
||||
az, _, err := c.Heading()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = c.roundTrip(fmt.Sprintf("AP1%03d", az), false)
|
||||
return err
|
||||
}
|
||||
|
||||
// azRe matches the 3-digit bearing in any of the DCU-1 reply framings.
|
||||
var azRe = regexp.MustCompile(`(\d{3})`)
|
||||
|
||||
// Heading queries the current azimuth. Returns the raw reply for diagnostics.
|
||||
func (c *Client) Heading() (az int, raw string, err error) {
|
||||
raw, err = c.roundTrip("AI1", true)
|
||||
if err != nil {
|
||||
return 0, raw, err
|
||||
}
|
||||
m := azRe.FindStringSubmatch(raw)
|
||||
if m == nil {
|
||||
return 0, raw, fmt.Errorf("unrecognised azimuth reply %q", raw)
|
||||
}
|
||||
az, _ = strconv.Atoi(m[1])
|
||||
return az % 360, raw, nil
|
||||
}
|
||||
@@ -509,7 +509,7 @@ func (c *Client) queryStatus() (*Status, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// An older controller — seen behind an RS232-to-Ethernet bridge — answers with
|
||||
// An RCU-06 controller — seen behind an RS232-to-Ethernet bridge — answers with
|
||||
// an 11-byte status frame: the standard one WITHOUT the trailing FreqMax byte.
|
||||
// The packet checksum was already verified, so a short-but-valid frame is real,
|
||||
// not a fragment. Accept it and default the missing tail fields instead of
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
const (
|
||||
// appVersion is stamped on every heartbeat (and could feed the About box).
|
||||
appVersion = "0.23.6"
|
||||
appVersion = "0.23.8"
|
||||
|
||||
// posthogHost is the PostHog ingestion endpoint. EU cloud by default; change
|
||||
// to https://us.i.posthog.com for a US project.
|
||||
|
||||
@@ -6,19 +6,54 @@ export modes.
|
||||
|
||||
## Import
|
||||
|
||||
Import an `.adi` / `.adif` file into the active profile's logbook. On import,
|
||||
OpsLog parses every field, maps standard fields to columns and keeps unknown but
|
||||
valid ADIF fields in a per-QSO **extras** store (editable later). Country /
|
||||
zones are enriched from `cty.dat` where missing. A file **without a header**
|
||||
(records pasted from another log) imports fine.
|
||||
**File → Import** (`Ctrl+O`) → pick an `.adi` / `.adif` file → the **Import ADIF**
|
||||
dialog opens with the options below. Import runs into the **active profile's**
|
||||
logbook. A file **without a header** (records pasted from another log) imports
|
||||
fine. Progress shows live; a summary follows — imported / updated / duplicates /
|
||||
skipped / total — with expandable **error** and **duplicate** lists.
|
||||
|
||||
- **Field remapping**: the import dialog can move a field as it reads it —
|
||||
e.g. the RSGB IOTA contest exports the island reference in `STATE`; add a
|
||||
`STATE → IOTA` row and it lands where the award looks.
|
||||
- **Fill from profile**: optionally stamps your station fields *and* your
|
||||
default confirmation statuses (paper QSL, LoTW, eQSL, Club Log, HRDLog,
|
||||
QRZ.com) on QSOs the file leaves empty — a WSJT-X log carries almost none.
|
||||
Existing values are never overwritten.
|
||||
### Duplicate handling
|
||||
|
||||
A **duplicate** is a record with the same **callsign + UTC minute + band + mode**
|
||||
as a QSO already in the logbook. Pick how they are treated:
|
||||
|
||||
| Mode | What it does |
|
||||
|------|--------------|
|
||||
| **Skip duplicates** *(default)* | Adds only new QSOs; existing ones left untouched. Safe default. |
|
||||
| **Update duplicates** | Merges the file's non-empty fields (QSL / LoTW / eQSL / QRZ statuses & dates, etc.) onto the matching QSO — fields the file omits are kept. Use to re-sync from Log4OM or LoTW. |
|
||||
| **Import everything** | Inserts every record, duplicates included. For deliberately merging two overlapping logs. |
|
||||
|
||||
### Enrichment options
|
||||
|
||||
- **Fix country & zones (cty.dat + ClubLog)** *(on by default)* — recompute
|
||||
Country, DXCC and CQ/ITU zones from `cty.dat`, overriding the file. Corrects
|
||||
what contest software exports wrong (e.g. RG2Y tagged Asiatic instead of
|
||||
European Russia). ClubLog's date-ranged DXpedition overrides are applied on top
|
||||
per QSO date (e.g. TO2A in 2012 → French Guiana) whenever the ClubLog data is
|
||||
downloaded. Everything else in the ADIF is kept as-is. *Tip: combine with
|
||||
**Update duplicates** to re-fix QSOs already in your log.*
|
||||
- **Fill my station fields from my profile** *(off by default)* — backfill empty
|
||||
`MY_*` fields (grid, rig, antenna, address, city, state, county, SOTA/POTA ref,
|
||||
TX power…) plus Operator and Owner callsign from the active profile. Existing
|
||||
values are kept; only `STATION_CALLSIGN` is left untouched so a mixed-call log
|
||||
isn't re-routed. It **also** stamps your default confirmation statuses (paper
|
||||
QSL, LoTW, eQSL, Club Log, HRDLog, QRZ.com — sent & received) on QSOs the file
|
||||
leaves empty. Enable when importing **your own** log; leave off for someone
|
||||
else's.
|
||||
|
||||
### Field remapping (move fields on import)
|
||||
|
||||
Contest software stores the exchange where its own module keeps it. The RSGB IOTA
|
||||
contest, for example, exports the island reference in `STATE` — imported as-is it
|
||||
becomes a US state and the IOTA award stays empty. Click **"The file puts a field
|
||||
in the wrong place…"**, then add a `STATE → IOTA` row (add as many rows as you
|
||||
need). The destination is filled **only where the file left it blank**.
|
||||
|
||||
### Unknown fields
|
||||
|
||||
Any valid ADIF field OpsLog doesn't promote to a column is preserved in a per-QSO
|
||||
**extras** store — editable later and re-exported intact. Nothing valid is
|
||||
dropped.
|
||||
|
||||
## Export
|
||||
|
||||
@@ -41,4 +76,7 @@ not lose your award-reference assignments.
|
||||
|
||||
- To move a batch of QSOs between logs, export selected → import into the other
|
||||
profile.
|
||||
- Re-syncing statuses from another logger (Log4OM, LoTW, QRZ)? Import the file
|
||||
with **Update duplicates** — it merges the new confirmations onto your existing
|
||||
QSOs without creating copies.
|
||||
- Use **Find duplicates** (Tools) after importing to catch overlaps.
|
||||
|
||||
Reference in New Issue
Block a user