Compare commits

...
28 Commits
Author SHA1 Message Date
rouggy 23f324e606 chore: release v0.27.15 2026-09-06 20:25:56 +02:00
rouggy 44a18ec799 chore(ui): shorter WSJT-X highlight wording
The main hint named three fixed colours, which stopped being true the
moment the operator could choose them. And the paragraph under "Mark
stations already worked" explained a trade-off nobody reads standing at
the radio; the switch says what it does.
2026-09-06 20:15:56 +02:00
rouggy 1e003bbdb7 chore(changelog): 0.27.15 reads novelties first
Same order as the last block: what is new leads, each fix follows the
thing it belongs to — the antenna pair, then the Icom network run, then
the rest.
2026-09-06 20:13:46 +02:00
rouggy 421bc372ee fix(steppir): the same fast poll, and motion reported at the command
The shortened transmit gag was written for an Ultrabeam that is now polled
four times a second while it moves. The SteppIR was still on two seconds
and reported nothing at all until its own poll came round, so the gap
between the 900 ms grace and the first poll that would have seen the
movement was a hole in "block TX while the elements travel" — the
transmitter released in the middle of a move.

It now reports a commanded move at once (bounded, so an antenna that
never answers cannot latch the inhibit on), on a COPY of the cached
status so the flag cannot leak into what the poll goroutine owns, and
follows the motors with its poll rate exactly as the Ultrabeam does.
2026-09-06 20:10:39 +02:00
rouggy c8c48d408f feat(motor antenna): amber at the order, not at the answer
The transmit gag starts when the move is commanded; the indicator waited
for a status poll to say the elements were travelling, so the two
disagreed by a second or more — and on an automatic follow (band change
with tracking on) there was no sign at all until a poll landed. The
backend now announces the order as it goes out, the interface shows it at
once and re-reads the antenna immediately, and the real status takes over
the moment it arrives.

The WSJT-X "grey out stations already worked" switch is renamed "Mark
stations already worked": with the colour now chosen by the operator the
old name described the wrong thing, but the switch still answers a
question the palette cannot — WHETHER dupes should be marked at all. On a
well-filled log they are most of a period, and a window where nearly
every line is coloured has stopped saying anything.
2026-09-06 20:06:05 +02:00
rouggy d001616767 fix: release TX when the elements stop; WSJT-X colours, and worked beats the watch list
The motorised antenna gagged the transmitter for a second or two after it
had finished moving. Three delays were stacked: the antenna polled every
two seconds, the gag held for three after the command whatever the
antenna said, and the widget refreshed every three. The antenna is now
asked four times a second WHILE IT MOVES — an idle one has nothing to say
and stays at two seconds — the gag only bridges the command itself
(900 ms), and the widget follows at half a second while moving.

WSJT-X highlighting:

- A watch-list station already worked on this band and mode is no longer
  painted as one to call. The list is a statement of intent, not of what
  is left to do, and its pink outranked every other verdict including the
  log's, so a worked station stayed pink for the session with nothing to
  tell it from one still needed.
- The four colours are the operator's to choose (Settings → UDP). Only
  the background: the text colour is derived by luma, so a dark blue
  cannot come back as black-on-black in somebody else's window. Changing
  one clears the installed highlights, or the de-duplication would keep
  showing yesterday's colour until a callsign changed verdict.
2026-09-06 18:43:08 +02:00
rouggy 07ee48e20c feat(rotor dial): circular scale and a beam, from EC1KD's revision
The square ring put the ticks in the corners where the room is, and made
every distance from the centre depend on direction — a marker at 45 sat
further out than one at north. A dial is read by angle, so the ring it is
read against is the same distance away all the way round now, and the
markers need one radius instead of a per-direction one.

The antenna is a sector that fades outwards rather than an arrow: an
antenna does not look along a line, it looks through a lobe, and the
arrow claimed a precision the beamwidth does not have. Where the mouse
would send it is drawn the same way, and its azimuth cross-fades into the
big readout while aiming — the figure is read at the moment the beam is,
so it belongs in the same place rather than somewhere to look away to.

Three colours, three meanings, kept apart: green where the antenna IS
(as everywhere else in OpsLog), orange where a click would send it,
yellow what was ORDERED. His revision drew all of them orange and yellow,
which loses the distinction the dial exists for — and drew the second
lobe of a bidirectional Ultrabeam at full strength, indistinguishable
from the main one. It is dimmed again; the dashed boom, the REV/BI badge
and the compact form are untouched.
2026-09-06 18:31:52 +02:00
rouggy 9614e3498a fix(icom net): the audio starts at once, not half a minute later
The conninfo that authorises the RX stream goes out during the login,
before the audio socket exists — it has to, since it is what authorises
it. So the rig is told to send audio to :50003 while nothing is bound
there, gets an ICMP port-unreachable back, backs off, and the audio turns
up only when its own retry timer comes round: twenty to thirty seconds by
the operator's watch, ninety in one log.

It is sent once more the moment the port is listening, which is the same
message the session already carries — RS-BA1 repeats it too. The audio
dial moved above the pumps, because after ctrlPump is running the
control-stream auth state belongs to it.
2026-09-06 18:26:24 +02:00
rouggy 0f082e1301 diag(audio): say why the Listening device is silent
"I turned the sound back on and nothing comes out of the speakers", with
a log that reports success at every step: the network audio stream up,
664-byte packets arriving, the monitor started. The render goroutine's
error was thrown away — a device unplugged, renamed by Windows or unable
to open at 16 kHz fails exactly there, silently.

It is logged now, with the device id. Two once-only lines either side of
it say whether the decoded audio is reaching a running monitor or
arriving with nobody listening, which separates a device fault from the
speakers simply being switched off.
2026-09-06 18:22:39 +02:00
rouggy 2808bead97 fix(uploads): Club Log is configured — it never needed an API key
The guard I added for services with no credentials demanded one, and
nobody has ever set it: OpsLog carries its own Club Log APPLICATION key
(clublogAppAPIKey), so the account is an email, a password and the
logbook callsign. An operator whose live upload had been working for
months was told the service was not configured the moment he sent QSOs by
hand after an import.

Written in app.go, the rules drifted from the uploaders on the first try.
They now live in internal/extsvc beside the Upload* functions that
enforce them, each case mirroring that function's own guard — which also
caught Cloudlog, where the station profile is required and the check did
not ask for it. The message names the fields actually missing rather than
listing everything the service takes.
2026-09-06 18:06:06 +02:00
rouggy e8f9e68759 diag(icom net): name the last CI-V commands before the silence
Audio off, and the IC-7760 still answers at connect and then never again:
twenty-eight commands sent, not one reply, packets still arriving on the
stream. A count says how much went unanswered and never which command
went out last — which is the one thing that can identify a frame this rig
does not tolerate, on a radio nobody here has.

The transport now keeps the command headers of the last eight frames and
prints them with the silence report.
2026-09-06 17:49:32 +02:00
rouggy f2168d339b diag(icom net): name the audio stream when CI-V goes quiet
The RX audio stream is experimental and shares the rig's session with
CI-V. The shape in an operator's log is unmistakable: audio packets
arriving by the hundred while not one CI-V reply comes back, the watchdog
tearing the session down, twenty seconds' pause, and the whole thing
again — read from outside as "the Icom keeps disconnecting", with
nothing pointing at the switch that would end it.

The log now says it, and names the setting. icomAudio counts what it has
delivered so the line distinguishes "audio is enabled" from "audio is
arriving", which is the half that makes it a suspect.
2026-09-06 17:42:37 +02:00
rouggy 507d1f0882 fix(icom net): a sleeping rig keeps its session, and the console is reachable
From an operator's log: an IC-7760 in standby, and OpsLog dialling and
dropping every forty seconds for as long as it was left there — control
link up, login OK, token renewed, and not one CI-V answer.

lastGoodAt bounds "the link answers but no CI-V comes back". It belongs
to a session and was never cleared when a new one opened, so a rig that
went to standby half an hour ago handed every fresh session a
half-hour-old last good read: past the grace before the first command was
even sent. Torn down at once, redialled twenty seconds later, torn down
again. Cleared on connect, the rule reads as it was written — silent
since connect is a rig in standby, and the session is kept so it can be
woken.

The console it is woken from was missing too. It appeared only once the
live CAT state said "icom", which a sleeping rig never says, so the ON
button was absent at the one moment it exists for. It now follows the
CONFIGURED radio — which also had to start following a radio switched
from the status bar, instead of waiting for a trip through Settings and a
Save that changed nothing.
2026-09-06 17:35:53 +02:00
rouggy 381a7fdc40 fix(adif): one record, one line
An exported file was full of blank gaps: a record ran down a dozen lines
and the next appeared to start in the middle of the page. ADDRESS is a
multi-line field by the standard and callbooks and other loggers fill it
that way — "Kabul", four blank lines, "Afghanistan" — and the writer
copied the value out as it stood. The files were always valid, since ADIF
counts bytes; they were unreadable, and so was anything that quoted them.

Line breaks inside a value are now joined with a comma and tabs become
spaces, which is how an address reads on one line anyway. The length
prefix is computed after the flattening, so the record stays exact, and
every path through the writer gets it: the file exports, the uploads and
the record forwarded over UDP.

The changelog's 0.27.15 block also takes back the FT-map hover fix, which
landed after the 0.27.14 release commit and was sitting in that block.
2026-09-06 17:09:18 +02:00
rouggy c8e2e3a29f fix(ft map): the hover label came back
The invisible circle that catches the clicks sits ON TOP of the dot, so
it takes the hover as well — and the tooltip was bound only to the dot
underneath. From the moment the stations became clickable, pointing at
one said nothing: the callsign, square and report an operator reads off
the map had simply gone.
2026-09-06 16:56:58 +02:00
rouggy 92a3189784 chore(changelog): 0.27.14 reads novelties first
The block is read top to bottom: what is new leads, each fix follows the
thing it belongs to, and the five genuinely new features carry [NEW].
2026-09-06 14:58:54 +02:00
rouggy 0af6cdedcd chore: release v0.27.14 2026-09-06 14:58:42 +02:00
rouggy ab1b45da07 feat(ft map): click a station to take it, double-click to answer it
The map draws a dot per decoded station and they did nothing. They now
answer the same two gestures as the decodes list, because the two are
views of the same list and a click has to mean the same thing on both:
one takes the callsign into the entry (and points the PSK Reporter panel
at it), two answer it.

The handlers were written inline on the list, so the map could not offer
them without a second copy — they are named once now and given to both.
Leaflet leaves the telling apart of click and dblclick to the handler, an
invisible marker three times the dot's radius takes the clicks (a
three-pixel dot is a fine mark and a poor target), and the double click
is stopped rather than merely unpropagated: the map zooms on one, and
answering a station is not a request to zoom in on it.
2026-09-06 14:47:22 +02:00
rouggy ed66e9394b fix(autocall): rest in overs, no phantom miss, and a readable auto readout
The rest between two series was two minutes — four overs on FT8, by
which time the DX has worked four other callers and half the time has
gone. It is now counted in the station's OWN overs and is one by default:
seven calls, one over listened through, and it goes again if the station
is still there. The deadline lands mid-cycle on purpose, so "sit out one
over" means one over rather than depending on a millisecond of clock
skew.

A period the target was DECODED in is never counted as a miss. A period
is judged more than once — decodes arrive in a burst and stragglers
follow — and a later judgement holds a partial view of it, not evidence
of absence: D2ACE answered in the very period the counter then read as a
miss.

The readout moved out of the Auto button and beside it. "Auto D2ACE 1/7
·1/3" read as one number, and the control changed width every period.
The callsign is now the biggest thing on the row, the calls and the
missed periods each carry a label, the miss count appears only once there
is one, and a station being waited for gets its own amber chip.
2026-09-06 14:36:32 +02:00
rouggy f56630d7d6 feat(maps): remembered views for the FT and grid maps, and no wasted first paint
The world map was the only one that remembered anything. Panning and
zooming a map is the operator saying which part of the world they work,
and on the FT decodes map and the grid-square map that was thrown away on
every tab switch. Both now keep centre and zoom, through one shared
helper (lib/mapView) that the world map uses too, and the keys are
portable so a copied data folder brings the views with it.

The world map also waits for the station's square before it paints. It
drew the world at 0 degrees and then moved to the operator's longitude —
a screenful of Esri tiles fetched and discarded on every first run. It is
now built once, knowing where it is looking; a profile with no locator
gets the default view after two seconds rather than a blank panel.
2026-09-06 14:23:43 +02:00
rouggy 50e97a8e0d feat(map): the world map opens on the operator's own longitude
Centred on 0 degrees it left an Australian looking at their own country
in the bottom-right corner, with the paths to everywhere they work
running off both edges. Centred on their own longitude the same map reads
the way their antenna does: the Americas to the east, Europe and Africa
to the west. Leaflet repeats the world horizontally, so this is a choice
of viewpoint and costs nothing — the tiles either side are the same
world, and unwrapLon already draws the arcs across the seam.

The latitude is damped rather than followed (a station at 69 north
centred on itself would spend half the map on the Arctic), the station's
square arrives after the map is built so it re-centres once when it
lands, and a view the operator has panned to themselves still wins.
2026-09-06 14:14:36 +02:00
rouggy e0bba21ecc fix(rst): a change of mode changes the notation
An operator with a callsign in the field, switching FT8 to SSB, kept
"+00" as the report. The edited flag protects a report the operator
chose — 57 rather than 59 — and it was holding across a change of mode as
well, where it protects nothing: a decibel figure is not a weak SSB
report, it is not a report at all. Worse, anything that fills the field
from the rig sets that flag too (the S-meter readouts in the rig
consoles), so the field could be stuck in the wrong notation for the rest
of the QSO.

The flag now holds only while the report still belongs to the mode's
family. When it does not, the operator's own judgement is carried across
where it can be — 57 becomes 579, 599 becomes 59 — and the mode's preset
answers where it cannot.
2026-09-06 14:06:04 +02:00
rouggy 28f784fe88 fix(rst wheel): the S9+ ladder, not the S digit
Below 59+20 comes 59+15, then +10, +5, then a plain 59 and down through
58, 57. Stepping the S digit and leaving the suffix where it was turned
59+20 into 58+20, which nobody has ever said on the air. Five decibels at
a time above S9 — the same increment sMeterRST rounds an S-meter reading
to — and one S-unit below it.
2026-09-06 14:01:58 +02:00
rouggy b421da165a feat: wheel over RST; PSK Reporter keeps the band's window
The mouse wheel steps the RST fields — one S-unit on an RST or RS, one
decibel on a digital report, up for a better one — in the entry strip and
in the QSO editor. The dropdown beside them lists the reports worth
having to hand, not all 41 decibels, so the wheel works on the value
rather than walking the list. The listener is native and non-passive:
React attaches onWheel passively, where preventDefault does nothing and
the panel scrolls away under the field being adjusted.

PSK Reporter, whole-band scope: clicking a decode reset the report count
to zero. The window there is the BAND's — every FTx report on it,
filtered by target only when the analysis is drawn — and it was emptied
on every target change, throwing away an hour of evidence at the moment
the operator asked the question it answers. The narrow scope still clears
it: there the window is one station's, and keeping it would answer the
new question with the old station's evidence.
2026-09-06 13:58:25 +02:00
rouggy 8b59954ce0 fix: a watched callsign is never parked; refuse uploads to unconfigured services
ZD8GB — watch-listed, six streams a period, two of them RR73 — was
refused as "parked" for the rest of the session. Parking answers "it
will not answer, stop wasting the evening on it", which is a fair verdict
about a station the LOG picked out and the wrong one about a station the
OPERATOR named: a DXpedition running a pileup takes more than two series
of calls to get through to, which is exactly why it is on the list. The
rest between series still applies, so it cannot monopolise the
transmitter — it simply never becomes ineligible.

Send to (right-click) now refuses a service with no credentials and says
which are missing. The upload runs on its own goroutine and reports into
the QSL Manager's console, which is not open when the command came from
the QSO list, so an upload to an unconfigured service looked exactly like
one that worked. The toast is also raised only once the backend has
accepted the request, and Cloudlog / Wavelog and HamQTH name themselves
in it.
2026-09-06 13:45:35 +02:00
rouggy 70ada49776 fix: CI-V address 00, simplex uploaded as split, and S/F spots
Three field reports.

Icom CI-V address 00 could not be kept: zero was read as "not
configured" in all three places that validate it, so every save put the
rig back to the IC-7610's 0x98 — and the model dropdown followed, since
it is derived from the address rather than stored. Picking "Other
(custom address)" also had no effect of its own: the list re-derived
itself and snapped back to whatever rig matched. It now stays chosen.

Cloudlog/Wavelog showed "17m/17m" on ordinary FT8 contacts (OE6CLD).
Every QSO is stamped with a receive side equal to the transmit side, and
the uploaded record carried it; Wavelog draws band/band_rx whenever both
are there. In ADIF an absent BAND_RX means "same as transmit", so the
uploaded record now writes the receive side only when it differs. The
copy forwarded to another logger over UDP keeps writing it in full —
that is why it was stamped in the first place (Log4OM reads BAND_RX) —
through its own ForwardRecordADIF.

"S/F" in a spot comment joins superfox / sfox / F-H as FT8.
2026-09-06 13:12:00 +02:00
rouggy e20f32c918 chore(changelog): the late-decode fix opens 0.27.14
It went in after the 0.27.13 release commit, so the shipped build does not
contain it — and the entry had been folded into that block's fixes line,
where it claimed a fix nobody had. The 0.27.13 block is back to what was
released.
2026-09-06 06:56:01 +02:00
rouggy 71adbfd8ff fix(autocall): a late decode belongs to its own period
A decoder sends a period's decodes in a burst, and stragglers follow — a
deep decode a second behind the rest. The sweeper judged the burst and
CLEARED the buffer, so the straggler opened a fresh one under the same
period key and was judged on its own: the ladder applied to a handful of
late arrivals with the other thirty stations of that period nowhere in
sight, and often after the reply to the burst had already put us on the
air, where nothing can act on it at all.

The buffer now outlives the judgement. A period stays open until a decode
stamped with the NEXT slot arrives; a straggler appends to it and the
period is judged again, whole. Judged once per period otherwise — acDirty
says whether anything new has come in — and the same flag now answers the
dead-band case that the cleared buffer used to stand for.
2026-09-06 00:31:16 +02:00
42 changed files with 1794 additions and 257 deletions
+60 -5
View File
@@ -789,6 +789,11 @@ type App struct {
acLastJudge time.Time
// acTXPeriod is the last transmit period already counted — see autoCallNoteTX.
acTXPeriod string
// acJudged is the last period key each receiver has been judged on, and
// acDirty says decodes have arrived for it since. Together they let a period
// be judged AGAIN when a straggler turns up, with the whole period in hand.
acJudged map[string]string
acDirty map[string]bool
// What the decodes panel is SHOWING, and whether it is publishing at all.
// The panel owns the filters; this is its answer, not a second copy of them.
acVisible map[string]bool
@@ -1183,6 +1188,7 @@ func (a *App) startup(ctx context.Context) {
audio.AlertSink = func(format string, args ...any) { a.toast(fmt.Sprintf(format, args...)) }
extsvc.LogSink = applog.Printf // log raw QRZ (and other) service responses for diagnosis
lookup.LogSink = applog.Printf // which call was queried, and why a portable lookup fell back
audio.Logf = applog.Printf // why the Listening device stayed silent, above all
db.LogSink = applog.Printf // which schema migrations ran, and how long they took
// Version and executable FIRST, before anything else can fail. Diagnosing a
// report means knowing which build produced the log, and that was previously
@@ -3149,7 +3155,7 @@ func (a *App) AddQSO(q qso.QSO) (id int64, err error) {
// a few lines above and is not on the copy taken at insert time.
a.syncPublishAsync(syncfolder.OpAdd, id, nil)
if a.udp != nil {
rec := adif.SingleRecordADIF(qc)
rec := adif.ForwardRecordADIF(qc)
a.udp.EmitLoggedADIF(rec)
a.udp.EmitLoggedQSOWSJT(wsjtLoggedQSO(qc), rec)
a.udpTriggerQSOLogged(qc)
@@ -8470,7 +8476,11 @@ func (a *App) SaveCATSettings(s CATSettings) error {
if s.IcomBaud <= 0 {
s.IcomBaud = 115200
}
if s.IcomAddr <= 0 || s.IcomAddr > 0xFF {
// 0x00 IS an address. Rejecting it as "unset" is what sent an operator's
// custom-address rig straight back to the IC-7610's 0x98 every time the
// settings were saved — the model dropdown snapping back with it, since it
// reads the address rather than a stored model.
if s.IcomAddr < 0 || s.IcomAddr > 0xFF {
s.IcomAddr = 0x98
}
if s.PollMs < 50 || s.PollMs > 2000 {
@@ -11811,10 +11821,34 @@ func (a *App) UploadQSOsManual(service string, ids []int64) error {
return fmt.Errorf("unknown service %q", service)
}
cfg := a.loadExternalServices()
// NOT CONFIGURED IS AN ANSWER, AND IT BELONGS HERE.
//
// The upload runs on its own goroutine and reports through the QSL Manager's
// console, which is not open when the command was given from a right-click in
// the QSO list: an upload to a service with no credentials looked exactly
// like one that worked. Refused synchronously instead, where the caller can
// show it.
if err := uploadConfigured(svc, cfg); err != nil {
return err
}
go a.runManualUpload(svc, ids, cfg)
return nil
}
// uploadConfigured reports whether a service can be uploaded to at all.
//
// The rules live in internal/extsvc, beside the uploaders that enforce them.
// Written here instead they drifted at once: Club Log was refused for a missing
// API key that nobody has ever set — OpsLog carries its own application key —
// and an operator whose live upload had worked for months was told his service
// was not configured.
func uploadConfigured(svc extsvc.Service, cfg extsvc.ExternalServices) error {
if err := extsvc.Configured(svc, cfg); err != nil {
return fmt.Errorf("%w (Settings → External services)", err)
}
return nil
}
func (a *App) runManualUpload(svc extsvc.Service, ids []int64, cfg extsvc.ExternalServices) {
emit := func(line string) {
if a.ctx != nil {
@@ -14314,7 +14348,7 @@ func (a *App) LogUDPLoggedADIF(adifText string) (int64, error) {
// path — otherwise a QSO logged FROM WSJT-X/JTDX/MSHV was never re-emitted
// to the outbound ADIF listeners (Log4OM, N1MM, gridtracker…).
if a.udp != nil {
rec := adif.SingleRecordADIF(qc)
rec := adif.ForwardRecordADIF(qc)
a.udp.EmitLoggedADIF(rec)
a.udp.EmitLoggedQSOWSJT(wsjtLoggedQSO(qc), rec)
a.udpTriggerQSOLogged(qc)
@@ -18279,7 +18313,22 @@ func motorBandAllowed(bands []string, hz int64) bool {
// refreshed every couple of seconds — so a fresh command opens a short grace
// window during which TX stays inhibited even before the poll confirms motion,
// closing the gap at the start of a move.
func (a *App) noteMotorMoveCommanded() { a.motorMoveCmdNs.Store(time.Now().UnixNano()) }
// noteMotorMoveCommanded records — and ANNOUNCES — that the antenna has just
// been told to move.
//
// The transmit gag already started here; the screen did not. It waited for a
// status poll to come round and say the elements were travelling, so the
// indicator turned orange a second or more after the button was pressed, and on
// an automatic follow (band change with tracking on) the operator had no warning
// at all until the poll landed. The event lets the interface show it at the
// instant the order goes out, which is also when the transmitter is gagged —
// one moment, one appearance.
func (a *App) noteMotorMoveCommanded() {
a.motorMoveCmdNs.Store(time.Now().UnixNano())
if a.ctx != nil {
wruntime.EventsEmit(a.ctx, "motorant:move")
}
}
// applyMotorInhibit sets or clears the Flex transmit inhibit, but only when the
// active CAT backend IS a FlexRadio — the inhibit is a Flex-API feature; with any
@@ -18308,7 +18357,13 @@ func (a *App) applyMotorInhibit(on bool) {
// 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, bands []string, stop <-chan struct{}) {
const grace = 3 * time.Second // cover the poll latency at the very start of a move
// Just long enough to bridge ONE fast poll at the start of a move, when the
// antenna has been told to go but has not yet said it is going. It was three
// seconds, from when the status poll ran every two: a move that took a second
// left the transmitter gagged for two more, with the elements already in
// place. The antenna is now polled four times a second while it travels, so
// this only has to cover the command itself.
const grace = 900 * time.Millisecond
ticker := time.NewTicker(300 * time.Millisecond)
defer ticker.Stop()
defer a.applyMotorInhibit(false) // never leave TX blocked when the loop ends
+115 -23
View File
@@ -7,6 +7,8 @@ package main
// the spot grid, so the two windows can never disagree.
import (
"fmt"
"strconv"
"strings"
"hamlog/internal/applog"
@@ -18,6 +20,13 @@ const (
keyWsjtHighlight = "udp.wsjt.highlight"
keyWsjtFollowMode = "udp.wsjt.followmode" // spot clicks switch the decoder's mode
keyWsjtHLWorked = "udp.wsjt.highlight_worked"
// One key per verdict, holding "#RRGGBB". Only the BACKGROUND is stored: the
// text colour is computed from it, so a chosen colour can never come out
// unreadable in somebody else's window.
keyWsjtColWatchlist = "udp.wsjt.colour.watchlist"
keyWsjtColNewDXCC = "udp.wsjt.colour.new_dxcc"
keyWsjtColNewBand = "udp.wsjt.colour.new_band"
keyWsjtColWorked = "udp.wsjt.colour.worked"
)
// wsjtModes are the modes a Configure message can meaningfully ask for — the
@@ -53,8 +62,9 @@ func (a *App) ConfigureDecoderMode(mode string) {
a.udp.SendConfigureMode(mode)
}
// The palette. Fixed colours, not theme tokens — they are painted into another
// application's window, which has no idea what theme OpsLog wears.
// The DEFAULT palette. Fixed colours, not theme tokens — they are painted into
// another application's window, which has no idea what theme OpsLog wears, and
// the operator can change each of them (see WsjtHighlightColours).
var (
hlWatchlist = udp.RGB{R: 244, G: 114, B: 182} // the watchlist pink
hlNewDXCC = udp.RGB{R: 22, G: 130, B: 60} // green
@@ -64,10 +74,82 @@ var (
// Worked already, on this band and in this mode. Grey on purpose, and the
// only DIM colour of the four: the others say "look at this", and this one
// says the opposite — it has to recede, not compete with them.
hlWorked = udp.RGB{R: 75, G: 85, B: 99}
hlWorkedFg = udp.RGB{R: 203, G: 213, B: 225}
hlWorked = udp.RGB{R: 75, G: 85, B: 99}
)
// WsjtHighlightColours is the operator's palette, one background per verdict.
type WsjtHighlightColours struct {
Watchlist string `json:"watchlist"`
NewDXCC string `json:"new_dxcc"`
NewBand string `json:"new_band"`
Worked string `json:"worked"`
}
// GetWsjtHighlightColours returns the palette in "#RRGGBB", defaults included.
func (a *App) GetWsjtHighlightColours() WsjtHighlightColours {
return WsjtHighlightColours{
Watchlist: a.settingOr(keyWsjtColWatchlist, hexOfRGB(hlWatchlist)),
NewDXCC: a.settingOr(keyWsjtColNewDXCC, hexOfRGB(hlNewDXCC)),
NewBand: a.settingOr(keyWsjtColNewBand, hexOfRGB(hlNewBand)),
Worked: a.settingOr(keyWsjtColWorked, hexOfRGB(hlWorked)),
}
}
// SetWsjtHighlightColours stores the palette and repaints.
//
// The repaint is the whole point of clearing: the de-duplication remembers what
// it has already told each decoder, so without this a callsign keeps yesterday's
// colour until it changes verdict — and the operator, having just picked a new
// one, sees nothing happen.
func (a *App) SetWsjtHighlightColours(c WsjtHighlightColours) {
set := func(key, v, def string) {
if _, ok := parseHexRGB(v); !ok {
v = def
}
a.setSetting(key, strings.ToUpper(strings.TrimSpace(v)))
}
set(keyWsjtColWatchlist, c.Watchlist, hexOfRGB(hlWatchlist))
set(keyWsjtColNewDXCC, c.NewDXCC, hexOfRGB(hlNewDXCC))
set(keyWsjtColNewBand, c.NewBand, hexOfRGB(hlNewBand))
set(keyWsjtColWorked, c.Worked, hexOfRGB(hlWorked))
a.clearWsjtHighlights()
applog.Printf("wsjt highlight: palette changed — repainting")
}
// colourFor reads one verdict's background and picks a legible foreground.
//
// The text colour is DERIVED, never stored: an operator choosing a dark blue
// would otherwise get black text on it in somebody else's window and conclude
// the feature is broken. Rec. 601 luma, the same rule a browser's contrast
// checker uses, with the threshold where black stops being readable.
func (a *App) colourFor(key, def string) (udp.RGB, udp.RGB) {
bg, ok := parseHexRGB(a.settingOr(key, def))
if !ok {
bg, _ = parseHexRGB(def)
}
luma := (299*int(bg.R) + 587*int(bg.G) + 114*int(bg.B)) / 1000
if luma < 140 {
return bg, hlWhite
}
return bg, hlBlack
}
func hexOfRGB(c udp.RGB) string { return fmt.Sprintf("#%02X%02X%02X", c.R, c.G, c.B) }
// parseHexRGB reads "#RRGGBB" (or "RRGGBB"). Anything else is refused rather
// than half-read: a colour that silently becomes black is worse than a default.
func parseHexRGB(s string) (udp.RGB, bool) {
s = strings.TrimPrefix(strings.TrimSpace(s), "#")
if len(s) != 6 {
return udp.RGB{}, false
}
v, err := strconv.ParseUint(s, 16, 32)
if err != nil {
return udp.RGB{}, false
}
return udp.RGB{R: byte(v >> 16), G: byte(v >> 8), B: byte(v)}, true
}
// GetWsjtHighlightWorked reports whether stations already worked on this band
// and mode are greyed out as well.
//
@@ -174,42 +256,52 @@ func (a *App) maybeHighlightDecode(instance, call, band, mode string) {
// Anything else is "no colour", and the empty verdict doubles as the clear
// signal in maybeHighlightDecode.
func (a *App) decodeHighlightVerdict(call, band, mode string) (bg, fg *udp.RGB, verdict string) {
if a.watchlist != nil {
c := a.clusterStatusMaps()
// ALREADY WORKED HERE, whatever else the station is.
//
// Settled first because it is the one fact that cancels the others. A watch
// list entry worked on this band and mode stayed pink for the rest of the
// session — the list is a statement of intent, not of what is left to do, and
// the colour that means "call this one" was being shown for a station already
// in the log. From the operator's side there was no way to tell the two
// apart, which is the only thing the colours are for.
workedHere := false
if band != "" && mode != "" && c.workedCallSlots != nil {
m := strings.ToUpper(strings.TrimSpace(mode))
if c.normMode != nil {
m = c.normMode(m)
}
_, workedHere = c.workedCallSlots[strings.ToUpper(call)+"|"+strings.ToLower(band)+"|"+m]
}
if a.watchlist != nil && !workedHere {
if _, ok := a.watchlist.Match(call); ok {
c := hlWatchlist
f := hlBlack
return &c, &f, "watchlist"
bgc, fgc := a.colourFor(keyWsjtColWatchlist, hexOfRGB(hlWatchlist))
return &bgc, &fgc, "watchlist"
}
}
c := a.clusterStatusMaps()
if a.dxcc != nil {
if m, ok := a.dxcc.Lookup(call); ok && m.Entity != nil {
num := dxcc.EntityDXCC(m.Entity.Name)
ent := c.entities[num]
if ent == nil {
bgc, fgc := hlNewDXCC, hlWhite
bgc, fgc := a.colourFor(keyWsjtColNewDXCC, hexOfRGB(hlNewDXCC))
return &bgc, &fgc, "new-dxcc"
}
if band != "" {
if _, workedBand := ent.Bands[strings.ToLower(band)]; !workedBand {
bgc, fgc := hlNewBand, hlBlack
bgc, fgc := a.colourFor(keyWsjtColNewBand, hexOfRGB(hlNewBand))
return &bgc, &fgc, "new-band"
}
}
}
}
// Worked already, this exact callsign on this band in this mode — a dupe,
// judged by the same ledger and the same digital-mode grouping the cluster
// uses, so the two windows cannot disagree about what "worked" means.
if a.wsjtHLWorkedOn.Load() && band != "" && mode != "" {
m := strings.ToUpper(strings.TrimSpace(mode))
if c.normMode != nil {
m = c.normMode(m)
}
if _, ok := c.workedCallSlots[strings.ToUpper(call)+"|"+strings.ToLower(band)+"|"+m]; ok {
bgc, fgc := hlWorked, hlWorkedFg
return &bgc, &fgc, "worked"
}
// A dupe, judged by the same ledger and the same digital-mode grouping the
// cluster uses, so the two windows cannot disagree about what "worked" means.
// Its own option: on a well-filled log this matches most of a period, and a
// screen where nearly every line is coloured has stopped saying anything.
if workedHere && a.wsjtHLWorkedOn.Load() {
bgc, fgc := a.colourFor(keyWsjtColWorked, hexOfRGB(hlWorked))
return &bgc, &fgc, "worked"
}
return nil, nil, ""
}
+60 -12
View File
@@ -30,7 +30,10 @@ const (
keyAutoCallWatched = "autocall.watched_attempts"
keyAutoCallMisses = "autocall.misses"
keyAutoCallRounds = "autocall.max_rounds"
keyAutoCallRestMin = "autocall.rest_min"
// Periods, not minutes — see autocall.Settings.RestPeriods. A new key rather
// than a reinterpreted one: the old value was in minutes, and reading "2" as
// two periods or as two minutes are eight periods apart.
keyAutoCallRest = "autocall.rest_periods"
keyAutoCallOnScreen = "autocall.on_screen_only"
keyAutoCallTrace = "autocall.trace"
)
@@ -48,9 +51,10 @@ type AutoCallSettings struct {
// it, before it is given up on.
Misses int `json:"misses"`
// MaxRounds: how many series of calls one station gets in a session, and
// RestMin the pause between two of them.
MaxRounds int `json:"max_rounds"`
RestMin int `json:"rest_min"`
// RestPeriods the pause between two of them, counted in the station's own
// transmit periods.
MaxRounds int `json:"max_rounds"`
RestPeriods int `json:"rest_periods"`
// OnScreenOnly: call only what the decodes panel is showing, so its filters
// steer the transmitter as well as the eye.
OnScreenOnly bool `json:"on_screen_only"`
@@ -61,6 +65,16 @@ type AutoCallSettings struct {
Trace bool `json:"trace"`
}
// intOr reads a stored integer, keeping a stored ZERO — which num() cannot,
// since it treats zero as "nothing set".
func intOr(v string, def int) int {
n, err := strconv.Atoi(strings.TrimSpace(v))
if err != nil || n < 0 {
return def
}
return n
}
func (a *App) GetAutoCallSettings() AutoCallSettings {
d := autocall.Defaults()
num := func(key string, def int) int {
@@ -82,7 +96,9 @@ func (a *App) GetAutoCallSettings() AutoCallSettings {
Trace: a.settingOr(keyAutoCallTrace, "0") == "1",
Misses: num(keyAutoCallMisses, d.Misses),
MaxRounds: num(keyAutoCallRounds, d.MaxRounds),
RestMin: num(keyAutoCallRestMin, int(d.Rest/time.Minute)),
// Zero is meaningful (call it again next period), so it is read directly
// rather than through num(), which treats zero as "unset".
RestPeriods: intOr(a.settingOr(keyAutoCallRest, ""), d.RestPeriods),
}
}
@@ -94,12 +110,16 @@ func (a *App) SaveAutoCallSettings(s AutoCallSettings) error {
for key, v := range map[string]int{
keyAutoCallAttempts: s.Attempts, keyAutoCallWatched: s.WatchedAttempts,
keyAutoCallMisses: s.Misses, keyAutoCallRounds: s.MaxRounds,
keyAutoCallRestMin: s.RestMin,
} {
if v > 0 {
a.setSetting(key, strconv.Itoa(v))
}
}
// Stored even at zero, unlike the counters above: no rest at all is a
// setting, not an empty field.
if s.RestPeriods >= 0 {
a.setSetting(keyAutoCallRest, strconv.Itoa(s.RestPeriods))
}
a.applyAutoCall()
applog.Printf("autocall: %v (only=%q, %d/%d calls, %d misses, %d rounds)",
s.Enabled, s.Only, s.Attempts, s.WatchedAttempts, s.Misses, s.MaxRounds)
@@ -140,7 +160,7 @@ func (a *App) autoCallSettings() autocall.Settings {
Enabled: s.Enabled, Only: s.Only, OnScreenOnly: s.OnScreenOnly,
Attempts: s.Attempts, WatchedAttempts: s.WatchedAttempts,
Misses: s.Misses, MaxRounds: s.MaxRounds,
Rest: time.Duration(s.RestMin) * time.Minute,
RestPeriods: s.RestPeriods,
}
}
@@ -160,6 +180,7 @@ func (a *App) applyAutoCall() {
e.Reset()
a.acMu.Lock()
a.acPeriod, a.acBuf = nil, nil
a.acJudged, a.acDirty = nil, nil
a.acMu.Unlock()
}
a.emitAutoCall()
@@ -279,17 +300,37 @@ func (a *App) autoCallFeed(d autocall.Decode) {
if a.acPeriod == nil {
a.acPeriod, a.acAt, a.acTR, a.acBuf = map[string]string{}, map[string]time.Time{}, map[string]int{}, map[string][]acDecode{}
a.acFed = map[string]time.Time{}
a.acJudged, a.acDirty = map[string]string{}, map[string]bool{}
}
if prev := a.acPeriod[inst]; prev != "" && prev != key {
prevAt, prevTR, buf := a.acAt[inst], a.acTR[inst], a.acBuf[inst]
// Only if something in it has NOT been judged. The buffer now outlives
// the judgement (see below), so without this the arrival of the next
// period would judge the previous one a second time on the very same
// decodes — and act on them, a slot late.
pending := a.acDirty[inst] || a.acJudged[inst] != prev
a.acPeriod[inst], a.acAt[inst], a.acTR[inst] = key, d.At, d.TRPeriod
a.acBuf[inst] = []acDecode{{d: d}}
a.acFed[inst], a.acDirty[inst] = time.Now(), true
a.acMu.Unlock()
a.autoCallJudge(inst, prev, prevAt, prevTR, buf)
// The previous period ends here whatever the sweeper was going to do: a
// decode stamped with the next slot is proof the old one is over.
if pending {
a.autoCallJudge(inst, prev, prevAt, prevTR, buf)
}
return
}
// APPENDED, never restarted. The buffer survives the period being judged,
// so a decode that arrives after the others belongs to the same period and
// is weighed against all of them.
//
// It used to be dropped and then judged on its own: the sweeper cleared the
// buffer, a straggler opened a "new" one under the same key, and the ladder
// was applied to whatever handful had come late — with the other thirty
// stations of that period nowhere in sight. A deep decode arriving a second
// after the burst is exactly the station worth calling.
a.acPeriod[inst], a.acAt[inst], a.acTR[inst] = key, d.At, d.TRPeriod
a.acFed[inst] = time.Now()
a.acFed[inst], a.acDirty[inst] = time.Now(), true
a.acBuf[inst] = append(a.acBuf[inst], acDecode{d: d})
a.acMu.Unlock()
}
@@ -344,9 +385,14 @@ func (a *App) autoCallSweep() {
if time.Since(a.acFed[inst]) < acQuiet {
continue
}
// Judged once per period, and again only when something new has come in
// for it. The period itself is kept open until a decode from the NEXT one
// arrives, so a straggler is judged with the whole period behind it.
if a.acJudged[inst] == key && !a.acDirty[inst] {
continue
}
ready = append(ready, due{inst, key, a.acAt[inst], tr, a.acBuf[inst]})
delete(a.acPeriod, inst)
delete(a.acBuf, inst)
a.acJudged[inst], a.acDirty[inst] = key, false
}
a.acMu.Unlock()
for _, d := range ready {
@@ -369,7 +415,9 @@ func (a *App) autoCallSilence() {
return
}
a.acMu.Lock()
quiet := a.acPeriod[inst] == "" && time.Since(a.acLastJudge) > 20*time.Second
// Nothing pending for this receiver, and nothing judged for a while: the
// band has gone quiet under it.
quiet := !a.acDirty[inst] && time.Since(a.acLastJudge) > 20*time.Second
tr := a.acTR[inst]
a.acMu.Unlock()
if !quiet {
+74
View File
@@ -1,4 +1,78 @@
[
{
"version": "0.27.15",
"date": "",
"en": [
"[NEW] The WSJT-X / JTDX highlight colours are yours to choose (Settings → UDP), one per verdict — watch list, new DXCC, new band, worked. Only the background is set: the text colour is worked out from it, so a chosen colour cannot come back unreadable in the decoders window. The “grey out stations already worked” switch keeps its purpose — it decides WHETHER dupes are marked, not what colour they are — and is now called “Mark stations already worked”.",
"[NEW] Rotor dial: a circular scale and a beam instead of an arrow. The square ring made a marker at 45° sit further from the centre than one at north — a dial is read by angle, so the ring it is read against is now the same distance away all the way round. The antenna is drawn as a sector that fades outwards, which is the shape of the thing it stands for; where the mouse would send it appears in the same shape in orange, and its azimuth in place of the current heading while you aim. Green for where the antenna is, orange for where it would go, yellow for what was ordered — the second lobe of a bidirectional Ultrabeam and the dashed boom are unchanged. Design from EC1KD again.",
"WSJT-X highlighting: a watch-list station already worked on this band and mode is no longer painted as one to call. The list is a statement of intent, not of what is left to do, and its pink outranked everything — including the log — so a station already worked stayed pink for the session with no way to tell it from one still needed.",
"Motorised antenna: the transmitter is released as soon as the elements stop. Three delays were stacked between the antenna finishing and the operator being allowed to call — the antenna polled every two seconds, the transmit gag held for three after the command whatever the antenna said, and the screen refreshed every three. Both the Ultrabeam and the SteppIR are now polled four times a second WHILE IT MOVES (and left at two seconds when it is still, where nothing changes), the gag only bridges the command itself, and the widget follows at half a second. The SteppIR also reports a commanded move at once, as the Ultrabeam already did: it says nothing until its own poll comes round, so the shortened gag would otherwise have released the transmitter in the middle of a move.",
"Motorised antenna: the indicator turns amber the instant the move is ORDERED, from a button or from an automatic band change with tracking on, instead of waiting for the antenna to say it is moving. The transmit gag already started there; the screen did not, so the two disagreed by a second or more — and on a follow there was no warning at all until a poll landed.",
"Icom network audio starts at once instead of half a minute later. The message that authorises the stream is sent during the login, before the audio socket exists — so the rig was told to send audio to a port nothing was bound to, got a port-unreachable back, and only resumed when its own retry timer came round. It is sent once more as soon as the port is listening.",
"Icom over the network: when CI-V goes quiet while the experimental RX audio stream is still delivering, the log now says so and names the switch to try. The two share the rigs session, and the shape in the field is exactly that — hundreds of audio packets arriving, not one CI-V reply, the watchdog tearing the session down, and the whole thing starting again. The silence report also lists the last eight CI-V commands sent: a rig that answers at connect and then never again has usually been sent something it does not like, and a count of unanswered commands never said which one.",
"Icom over the network: a rig left in standby no longer sits in a dial-and-drop loop. The clock that bounds “the control link answers but no CI-V comes back” belongs to a session and was never cleared when a new one opened, so every fresh session started already past its grace — torn down at once, redialled twenty seconds later, and torn down again for as long as the radio was asleep. Silent since connect is now read as what it is: a rig in standby, with the session kept so it can be woken.",
"The Icom console appears whenever the configured radio is an Icom, not only once the rig is talking — the console is where the power-ON button lives, so it used to be missing at the one moment it was needed. The consoles configured backend also follows a radio switched from the status bar, instead of waiting for a trip through Settings and a Save that changed nothing.",
"Audio: the Listening device now says when it cannot be opened. A device unplugged, renamed by Windows or unable to run at 16 kHz failed silently while everything upstream reported success — the stream up, the packets arriving, the monitor started — which is the whole of “I turned the sound on and nothing comes out”. The log also says, once, whether the network RX audio is reaching the speakers or arriving with nobody listening.",
"ADIF export: a record is written on one line again. ADDRESS is a multi-line field by the standard and callbooks and other loggers fill it that way — “Kabul”, four blank lines, “Afghanistan” — and OpsLog wrote it out as it was, so a record ran down a dozen lines with the next apparently starting in the middle of the page. Line breaks inside a value are now joined with a comma, which is how an address reads on one line anyway. The files were always valid (ADIF counts bytes); they were unreadable.",
"Club Log uploads are no longer refused as “not configured”. The check added for services with no credentials demanded a Club Log API key, which nobody has ever set — OpsLog carries its own application key — so an operator whose live upload had worked for months was turned away when sending QSOs by hand. Each services requirements now live beside the uploader that enforces them, and the message names the fields that are actually missing.",
"FT map: the callsign, square and report show on hover again. The invisible circle that catches the clicks sits on top of the dot, so it takes the hover too — and the label was bound only to the dot underneath, which left the map silent from the moment the stations became clickable."
],
"fr": [
"[NEW] Les couleurs de mise en évidence WSJT-X / JTDX sont au choix (Réglages → UDP), une par verdict — watchlist, nouveau DXCC, nouvelle bande, contactée. Seul le fond se règle : la couleur du texte en est déduite, pour quune couleur choisie ne revienne jamais illisible dans la fenêtre du décodeur. Loption « griser les stations déjà contactées » garde sa raison d’être — elle décide SI les doublons sont marqués, pas de quelle couleur — et sappelle désormais « Marquer les stations déjà contactées ».",
"[NEW] Cadran rotor : échelle circulaire et faisceau au lieu dune flèche. Lanneau carré plaçait un repère à 45° plus loin du centre quun repère au nord — un cadran se lit par langle, donc lanneau qui sert de référence est désormais à la même distance tout autour. Lantenne est dessinée comme un secteur qui sestompe vers lextérieur, ce qui est la forme de ce quil représente ; là où la souris lenverrait apparaît dans la même forme en orange, et son azimut à la place du cap courant pendant quon vise. Vert pour où lantenne est, orange pour où elle irait, jaune pour ce qui a été demandé — le deuxième lobe dun Ultrabeam bidirectionnel et le boom en pointillés sont inchangés. Design dEC1KD, encore.",
"Mise en évidence WSJT-X : une station de la watchlist déjà contactée sur cette bande et ce mode nest plus peinte comme une station à appeler. La liste dit une intention, pas ce quil reste à faire, et son rose passait devant tout — y compris le carnet — si bien quune station déjà faite restait rose toute la session, sans moyen de la distinguer dune station encore à faire.",
"Antenne motorisée : l’émission est rendue dès que les éléments sarrêtent. Trois délais sajoutaient entre la fin du mouvement et le droit dappeler — lantenne interrogée toutes les deux secondes, le blocage d’émission maintenu trois secondes après la commande quoi quen dise lantenne, et l’écran rafraîchi toutes les trois. LUltrabeam comme la SteppIR sont désormais interrogées quatre fois par seconde PENDANT quelle bouge (et laissée à deux secondes à larrêt, où rien ne change), le blocage ne couvre plus que la commande elle-même, et le widget suit à la demi-seconde. La SteppIR signale aussi un mouvement dès quil est commandé, comme le faisait déjà lUltrabeam : elle ne dit rien avant sa propre lecture, et le blocage raccourci aurait sinon rendu l’émission en plein mouvement.",
"Antenne motorisée : lindicateur passe à lambre à linstant où le mouvement est COMMANDÉ, par un bouton comme par un changement de bande automatique quand le suivi est actif, au lieu dattendre que lantenne dise quelle bouge. Le blocage d’émission démarrait déjà là ; l’écran non, et les deux se contredisaient dune seconde ou plus — sur un suivi, il ny avait aucun signe avant larrivée dune lecture.",
"Laudio réseau Icom démarre tout de suite au lieu dune demi-minute plus tard. Le message qui autorise le flux part pendant la connexion, avant que la prise audio nexiste : le poste se voyait donc demander d’émettre vers un port où personne n’écoutait, recevait un « port injoignable » en retour, et ne reprenait quau tour suivant de son propre minuteur. Il est renvoyé dès que le port écoute.",
"Icom en réseau : quand le CI-V devient muet alors que le flux audio expérimental continue darriver, le journal le dit et nomme loption à essayer. Les deux partagent la session du poste, et cest exactement la forme observée en vrai — des centaines de paquets audio, pas une réponse CI-V, le chien de garde qui coupe la session, et tout qui recommence. Le rapport de silence liste aussi les huit dernières commandes CI-V envoyées : un poste qui répond à la connexion puis plus jamais sest en général vu envoyer quelque chose quil naime pas, et un compteur de commandes sans réponse na jamais dit laquelle.",
"Icom en réseau : un poste laissé en veille ne tourne plus en boucle connexion/déconnexion. Lhorloge qui borne « la liaison de contrôle répond mais aucun CI-V ne revient » appartient à une session et n’était jamais remise à zéro à louverture de la suivante : chaque nouvelle session démarrait déjà au-delà de son délai de grâce — coupée aussitôt, rappelée vingt secondes plus tard, recoupée, aussi longtemps que la radio dormait. « Silencieux depuis la connexion » se lit désormais pour ce que cest : un poste en veille, dont on garde la session pour pouvoir le réveiller.",
"La console Icom saffiche dès que la radio configurée est un Icom, et pas seulement quand le poste parle — cest là que se trouve le bouton dallumage, il manquait donc au seul moment où il servait. Le backend configuré suit aussi un changement de radio fait depuis la barre d’état, au lieu dattendre un passage dans les réglages et un « Enregistrer » qui ne changeait rien.",
"Audio : le périphérique d’écoute signale désormais quand il ne peut pas souvrir. Un périphérique débranché, renommé par Windows ou incapable de fonctionner en 16 kHz échouait en silence pendant que tout en amont annonçait le succès — flux ouvert, paquets reçus, moniteur démarré — ce qui est exactement le « jai remis le son et rien ne sort ». Le journal dit aussi, une fois, si laudio réseau atteint les haut-parleurs ou arrive sans que personne n’écoute.",
"Export ADIF : un enregistrement tient de nouveau sur une ligne. ADDRESS est un champ multiligne selon la norme, et les callbooks comme les autres logiciels le remplissent ainsi — « Kabul », quatre lignes vides, « Afghanistan » — quOpsLog recopiait tel quel : un enregistrement s’étalait sur une douzaine de lignes, le suivant semblant commencer au milieu de la page. Les retours à la ligne dans une valeur sont désormais réunis par une virgule, ce qui est de toute façon la façon de lire une adresse sur une ligne. Les fichiers étaient valides (lADIF compte les octets) ; ils étaient illisibles.",
"Les envois vers Club Log ne sont plus refusés comme « non configuré ». Le contrôle ajouté pour les services sans identifiants réclamait une clé API Club Log que personne na jamais saisie — OpsLog embarque la sienne — et un opérateur dont lenvoi automatique fonctionnait depuis des mois se voyait éconduit au moment denvoyer des QSO à la main. Les exigences de chaque service vivent désormais à côté du code qui les applique, et le message nomme les champs réellement manquants.",
"Carte FTx : lindicatif, le locator et le report réapparaissent au survol. Le cercle invisible qui capte les clics est au-dessus du point, donc il capte aussi le survol — et l’étiquette n’était liée quau point du dessous, ce qui rendait la carte muette dès que les stations sont devenues cliquables."
]
},
{
"version": "0.27.14",
"date": "",
"en": [
"[NEW] The mouse wheel steps the RST fields, in the entry strip and in the QSO editor. It counts the way an operator does — 57, 58, 59, 59+5, 59+10, 59+15, 59+20 — one S-unit up to nine and then five decibels at a time, and one decibel on a digital report. R and T do not move. The dropdown beside them lists the reports worth having to hand, not every legal one, so the wheel works on the value rather than walking the list.",
"[NEW] The world map opens centred on YOUR square, not on Greenwich. Centred on 0° it left an Australian looking at their own country in the bottom-right corner with every path running off both edges; centred on their own longitude the same map reads the way their antenna does — the Americas to the east, Europe and Africa to the west. The latitude leans towards your hemisphere without following you to the pole, and a view you have panned to yourself still wins.",
"The world map now waits for the stations square before painting. It used to draw the world at 0° and then move to your longitude, fetching a screenful of tiles and discarding it on every first run; it is built once, knowing where it is looking. A profile with no locator still gets the default view after a moment rather than a blank panel.",
"[NEW] The FT decodes map and the grid-square map remember where you left them — centre and zoom, portable with the data folder like the world maps own view. Panning a map is the operator saying which part of the world they are working, and it was being thrown away on every tab switch.",
"[NEW] FT map: the station dots answer the same two gestures as the decodes list — one click takes the callsign into the entry, two answer it. The hit area is wider than the dot, and a double click no longer zooms the map on its way through.",
"The auto-call readout moved out of the Auto button and beside it: the station being called is the biggest thing on the row, the calls and the missed periods each carry a label instead of reading as one number, and a station being waited for shows with an hourglass. The button had been changing width every period.",
"Auto-call: the rest between two series is counted in the stations own overs, not in minutes, and is ONE by default. Two minutes is four overs on FT8 — by then the DX has worked four other callers and half the time it has gone. Seven calls, one over listened through, and it goes again if the station is still there (Settings → DXHunter, “Rest (overs)”).",
"Auto-call sees a decode that arrives after the others. A decoder sends a period in a burst and stragglers follow — a deep decode a second behind the rest — and the straggler was judged on its own, with the thirty stations of its own period nowhere in sight. The period now stays open until the next one starts, and a late arrival is weighed against all of it.",
"Auto-call: a period the station was decoded in is never counted as a miss. A period is judged more than once — the decodes arrive in a burst and stragglers follow — and a later judgement holds a partial view of it, not evidence of absence: a station answering in that very period showed “1/3 missed” against it.",
"Auto-call never parks a watched callsign. After a few series of unanswered calls a station is set aside for the session — the right answer for one the LOG picked out, the wrong one for a station YOU named: a DXpedition running a pileup takes more than two series to get through to, which is exactly why it is on the list. The rest between series still applies.",
"PSK Reporter panel: with the whole-band scope, clicking a decode no longer resets the report count to zero. The window there belongs to the BAND — every FTx report on it, filtered by target only when the analysis is drawn — and it was being emptied on every target change, throwing away an hour of evidence at the exact moment it was worth something. The narrow scope still clears it, because there the window is one stations.",
"Changing mode with a callsign in the field now fixes the report. The “the operator chose this report” flag was holding across a change of mode, where it means nothing — “+00” is not a weak SSB report, it is not a report at all — and anything that fills the field from the rig (the S-meter readouts in the rig consoles) sets that flag too, so it could stay in the wrong notation for the whole QSO. A judgement that can be carried across is carried (57 → 579, 599 → 59); otherwise the modes preset answers.",
"Icom CI-V: address 00 can be set, and “Other (custom address)” stays chosen. Zero was treated as “not configured” and every save put the rig back to the IC-7610s 98 — the model list following it, since it is derived from the address rather than stored.",
"Cloudlog / Wavelog upload: a simplex contact is no longer uploaded as split. Every QSO carried a receive band and frequency equal to the transmit side, and Wavelog draws both — an ordinary FT8 contact read “17m/17m”. In ADIF an absent BAND_RX means “same as transmit”, so they are now written only when they differ. The record forwarded to another logger on the UDP link still carries them in full (Log4OM reads BAND_RX).",
"Right-click → Send to: an upload to a service with no credentials is refused, and says which ones are missing and where. It used to run on its own and report into the QSL Managers console, which is not open when the command came from the QSO list — so it looked exactly like an upload that worked. Cloudlog / Wavelog and HamQTH also name themselves properly in the toast.",
"Cluster: “S/F” in a spot comment is read as FT8, alongside “superfox”, “sfox” and “F/H”. They are all the same DXpedition transmit mode, and the comment was falling through to the band plan and coming out DATA."
],
"fr": [
"[NEW] La molette fait défiler les champs RST, dans la barre de saisie comme dans l’éditeur de QSO. Elle compte comme un opérateur — 57, 58, 59, 59+5, 59+10, 59+15, 59+20 — un point S jusqu’à neuf puis cinq décibels à la fois, et un décibel sur un report numérique. R et T ne bougent pas. La liste déroulante à côté contient les reports quon veut sous la main, pas tous les reports légaux : la molette agit donc sur la valeur plutôt que de parcourir la liste.",
"[NEW] La carte du monde souvre centrée sur VOTRE locator, plus sur Greenwich. Centrée sur 0°, elle laissait un Australien avec son pays dans le coin en bas à droite et tous les trajets qui sortaient des deux bords ; centrée sur sa longitude, la même carte se lit comme son antenne travaille — les Amériques à lest, lEurope et lAfrique à louest. La latitude penche vers votre hémisphère sans vous suivre jusquau pôle, et une vue que vous avez déplacée vous-même reste prioritaire.",
"La carte du monde attend désormais le locator de la station avant de peindre. Elle dessinait le monde à 0° puis se déplaçait sur votre longitude, chargeant un écran de tuiles jeté aussitôt à chaque premier lancement ; elle est construite une fois, en sachant où elle regarde. Un profil sans locator obtient toujours la vue par défaut après un instant, pas un panneau vide.",
"[NEW] La carte des décodages FTx et la carte des locators retiennent où vous les avez laissées — centre et zoom, portables avec le dossier de données comme la vue de la carte du monde. Déplacer une carte, cest dire quelle partie du monde on travaille, et c’était jeté à chaque changement donglet.",
"[NEW] Carte FTx : les points des stations répondent aux mêmes deux gestes que la liste des décodages — un clic met lindicatif dans la saisie, deux lappellent. La zone cliquable est plus large que le point, et un double clic ne zoome plus la carte au passage.",
"Laffichage de lauto-call sort du bouton Auto pour se placer à côté : la station appelée est l’élément le plus lisible de la ligne, les appels et les périodes ratées portent chacun leur étiquette au lieu de se lire comme un seul nombre, et une station attendue saffiche avec un sablier. Le bouton changeait de largeur à chaque période.",
"Auto-call : le repos entre deux séries se compte en tours de la station, plus en minutes, et vaut UN par défaut. Deux minutes, cest quatre tours en FT8 — le DX a travaillé quatre autres appelants entre-temps, et la moitié du temps il est parti. Sept appels, un tour écouté, et ça repart si la station est toujours là (Réglages → DXHunter, « Repos (tours) »).",
"Lauto-call voit un décodage qui arrive après les autres. Un décodeur envoie une période en rafale, puis les retardataires — un décodage « deep » une seconde plus tard — et le retardataire était jugé tout seul, sans les trente stations de sa propre période. La période reste maintenant ouverte jusquau début de la suivante, et un arrivant tardif est pesé face à lensemble.",
"Auto-call : une période où la station a été décodée nest plus comptée comme un raté. Une période est jugée plusieurs fois — les décodages arrivent en rafale puis les retardataires — et un jugement tardif nen donne quune vue partielle, pas la preuve dune absence : une station qui répondait dans cette période exacte se voyait compter « 1/3 raté ».",
"Lauto-call ne met jamais de côté un indicatif de la watchlist. Après quelques séries dappels sans réponse, une station est écartée pour la session — la bonne réponse pour une station choisie par le CARNET, la mauvaise pour une station que VOUS avez nommée : un DX en pile-up demande plus de deux séries pour passer, et cest précisément pour ça quil est sur la liste. Le repos entre séries sapplique toujours.",
"Panneau PSK Reporter : en portée « toute la bande », cliquer sur un décodage ne remet plus le nombre de reports à zéro. La fenêtre appartient là à la BANDE — tous les reports FTx qui y circulent, filtrés par cible seulement à laffichage — et elle était vidée à chaque changement de cible, jetant une heure dobservations au moment précis où elles servent. La portée étroite continue de la vider : là, la fenêtre est celle dune seule station.",
"Changer de mode avec un indicatif dans le champ corrige désormais le report. Le drapeau « lopérateur a choisi ce report » tenait au travers dun changement de mode, où il ne veut rien dire — « +00 » nest pas un report SSB faible, ce nest pas un report du tout — et tout ce qui remplit le champ depuis le poste (les lectures S-mètre des consoles) lève ce drapeau aussi : la notation pouvait rester fausse pour tout le QSO. Un jugement transposable lest (57 → 579, 599 → 59) ; sinon le préréglage du mode répond.",
"Icom CI-V : ladresse 00 peut être saisie, et « Other (custom address) » reste sélectionné. Le zéro était pris pour « non configuré » et chaque enregistrement remettait le poste sur le 98 de lIC-7610 — la liste des modèles suivant, puisquelle est déduite de ladresse et non enregistrée.",
"Upload Cloudlog / Wavelog : un contact simplex nest plus envoyé comme un split. Chaque QSO portait une bande et une fréquence de réception égales à l’émission, et Wavelog affiche les deux — un FT8 ordinaire se lisait « 17m/17m ». En ADIF, un BAND_RX absent signifie « identique à l’émission » : ils ne sont donc écrits que sils diffèrent. Lenregistrement transmis à un autre logiciel par UDP les porte toujours en entier (Log4OM lit BAND_RX).",
"Clic droit → Envoyer vers : un envoi vers un service non configuré est refusé, en disant ce qui manque et où. Il partait tout seul et rendait compte dans la console du gestionnaire QSL, qui nest pas ouverte quand la commande vient de la liste des QSO — ça ressemblait donc exactement à un envoi réussi. Cloudlog / Wavelog et HamQTH sannoncent aussi sous leur nom dans le message.",
"Cluster : « S/F » dans un commentaire de spot est lu comme du FT8, au même titre que « superfox », « sfox » et « F/H ». Cest le même mode d’émission DXpédition, et le commentaire retombait sur le plan de bande pour ressortir en DATA."
]
},
{
"version": "0.27.13",
"date": "",
+140 -48
View File
@@ -150,6 +150,7 @@ import { cn } from '@/lib/utils';
import { pathBetween, pathBetweenLatLon, gridToLatLon, latLonToGrid } from '@/lib/maidenhead';
import { flagURL } from '@/lib/flags';
import { LogViewer } from '@/components/LogViewer';
import { convertRST, rstFitsMode, stepRST } from '@/lib/rst';
type QSO = QSOForm;
type ImportResult = adifModels.ImportResult;
@@ -304,8 +305,12 @@ function FreqWheelDisplay({ mhz, onNudge, className, placeholder = '—.——
// pill. The full message stays in the tooltip. Recognises the common cases
// (OmniRig not installed, not registered) and otherwise truncates.
// RadioChip — the CAT status chip, and the radio picker behind it.
function RadioChip({ catUp, catState, onOpenSettings }: {
function RadioChip({ catUp, catState, onOpenSettings, onRadioSwitched }: {
catUp: boolean; catState: any; onOpenSettings: () => void;
// Switching radio here IS a settings change — the chosen entry becomes the CAT
// settings — so whatever reads those has to be told. Two Icoms swapped for one
// another never change the live backend name, and nothing else would notice.
onRadioSwitched?: () => void;
}) {
const [radios, setRadios] = useState<any[]>([]);
const [open, setOpen] = useState(false);
@@ -370,7 +375,7 @@ function RadioChip({ catUp, catState, onOpenSettings }: {
onClick={() => {
setOpen(false);
if (r.active) return;
SetActiveRadio(r.id).then(load).catch(() => {});
SetActiveRadio(r.id).then(() => { load(); onRadioSwitched?.(); }).catch(() => {});
}}
className={cn('flex w-full items-center gap-2 px-2.5 py-1 text-left text-xs hover:bg-muted',
r.active && 'font-semibold text-primary')}
@@ -657,6 +662,11 @@ export default function App() {
useEffect(() => { rstListsRef.current = rstLists; }, [rstLists]);
const [rstSent, setRstSent] = useState('59');
const [rstRcvd, setRstRcvd] = useState('59');
// Read by applyModePreset, which runs from those same long-lived closures.
const rstSentRef = useRef(rstSent);
const rstRcvdRef = useRef(rstRcvd);
useEffect(() => { rstSentRef.current = rstSent; }, [rstSent]);
useEffect(() => { rstRcvdRef.current = rstRcvd; }, [rstRcvd]);
const [grid, setGrid] = useState('');
const [name, setName] = useState('');
const [qth, setQth] = useState('');
@@ -711,6 +721,15 @@ export default function App() {
// hide the rig ON/OFF buttons on USB, where the interface is unpowered when the
// rig is off so power-ON can't work).
const [catBackend, setCatBackend] = useState('');
// icomConfigured is "this station's radio IS an Icom", from the settings
// rather than from the link.
//
// The console used to appear only once the rig was talking. Switching to an
// Icom that was switched OFF therefore showed no console at all — and the
// console is where the ON button lives, so the one moment the button exists
// for was the one moment it could not be reached.
const icomConfigured = catBackend === 'icom' || catBackend === 'icom-net';
const icomShown = catState.backend === 'icom' || icomConfigured;
// Live space-weather (solar flux / sunspots / A / K) for the header strip.
// Loaded on mount, refreshed on the backend 'solar:update' event, plus a slow
// fallback poll. These same numbers are stamped onto each logged QSO.
@@ -3081,15 +3100,43 @@ export default function App() {
const pokeUbStatus = useCallback(async () => {
try { const s: any = await GetUltrabeamStatus(); if (s) setUbStatus(s); } catch { /* transient */ }
}, []);
// A move was just ORDERED — from a button here or by the follow loop on a
// band change. Held for as long as it takes the antenna to answer, and no
// longer: the real status takes over the moment it arrives.
const [motorCmdAt, setMotorCmdAt] = useState(0);
const motorMoving = !!ubStatus.moving || (motorCmdAt > 0 && Date.now() - motorCmdAt < 2500);
// Three seconds while it sits still, half a second while it moves.
//
// The moving flag gags the transmitter, and this poll is the last of three
// delays between the elements stopping and the operator being allowed to call
// again — the antenna's own poll and the inhibit loop are the other two. At
// three seconds it was the largest of them: the antenna had finished, the
// radio was free, and the screen still said orange.
useEffect(() => {
let alive = true;
const tick = async () => {
try { const s: any = await GetUltrabeamStatus(); if (alive) setUbStatus(s); } catch {}
};
tick();
const id = window.setInterval(tick, 3000);
const id = window.setInterval(tick, motorMoving ? 400 : 3000);
return () => { alive = false; window.clearInterval(id); };
}, []);
}, [motorMoving]);
// The backend says it at the instant the order goes out — see
// noteMotorMoveCommanded. Read at once as well, so the antenna's own answer
// replaces the assumption as soon as there is one.
useEffect(() => {
const off = EventsOn('motorant:move', () => {
setMotorCmdAt(Date.now());
pokeUbStatus();
window.setTimeout(pokeUbStatus, 350);
// And once the window is over, so "assumed moving" stops being assumed
// even if nothing else re-renders.
window.setTimeout(() => setMotorCmdAt((v) => (Date.now() - v >= 2500 ? 0 : v)), 2600);
});
return () => { off?.(); };
}, [pokeUbStatus]);
// Poll the Antenna Genius switch for active antenna per port + the list.
// Re-read the enabled flag each tick so toggling it in Settings makes the
@@ -3259,6 +3306,15 @@ export default function App() {
setCatBackend(c.backend ?? '');
} catch {}
}, []);
// The configured backend follows every way the radio can change: the CAT
// panel's Save, a switch from the status bar's radio list, and the link
// itself reporting a different backend. It was read once at launch and after
// a Settings save only — so switching radio from the status bar left the
// console configured for the previous rig, and the Icom power buttons stayed
// hidden until the operator went into Settings and pressed Save for no
// reason.
useEffect(() => { loadCATCfg(); }, [catState.backend, loadCATCfg]);
const loadLists = useCallback(async () => {
try {
const l: ListsSettings = await GetListsSettings();
@@ -3340,15 +3396,31 @@ export default function App() {
return m;
}
function applyModePreset(m: string) {
if (rstUserEditedRef.current) return;
// AN EDIT IS ABOUT A SIGNAL, NOT ABOUT A NOTATION.
//
// The edited flag protects a report the operator chose — 57 rather than 59 —
// and it used to protect it across a change of mode as well, where it means
// nothing: "+00" is not a weak SSB report, it is not a report at all. An
// operator with a callsign in the field, switching from FT8 to SSB, was left
// with a decibel figure to log, and anything that fills the report from the
// rig (the S-meter readouts in the rig consoles) sets that flag too — so the
// field could be stuck in the wrong notation for the rest of the QSO.
//
// So the flag holds only while the report still belongs to the mode. When it
// does not, the judgement is carried across where it can be (57 → 579,
// 599 → 59) and the preset answers where it cannot.
const fits = rstFitsMode(rstSentRef.current, m) && rstFitsMode(rstRcvdRef.current, m);
if (rstUserEditedRef.current && fits) return;
// Prefer the user's configured preset RST; otherwise fall back to the mode
// category default (CW/RTTY/PSK → 599, phone → 59, digital → first option)
// so switching SSB→CW flips 59→599 even without a configured preset.
// Read through the refs, never the state: see their declaration.
const p = modePresetsRef.current.find((x) => x.name === m);
const fallback = rstOptions(m, rstListsRef.current)[0] || '';
setRstSent(p?.default_rst_sent || fallback);
setRstRcvd(p?.default_rst_rcvd || fallback);
const keep = (cur: string, preset: string) =>
(rstUserEditedRef.current && convertRST(cur, m)) || preset || fallback;
setRstSent(keep(rstSentRef.current, p?.default_rst_sent || ''));
setRstRcvd(keep(rstRcvdRef.current, p?.default_rst_rcvd || ''));
}
// Clicking a spot (cluster grid or any band map): tune the rig, set the mode,
// fill the call, pre-fill POTA, (re)start the recording. Shared so every spot
@@ -4559,11 +4631,16 @@ export default function App() {
const LABELS: Record<string, string> = {
qrz: 'QRZ.com', clublog: 'Club Log', lotw: 'LoTW',
hrdlog: 'HRDLog.net', eqsl: 'eQSL.cc', hamlog: 'HAMLOG.online',
hamqth: 'HamQTH', cloudlog: 'Cloudlog / Wavelog',
};
const label = LABELS[service] ?? service;
showToast(`Uploading ${ids.length} QSO${ids.length > 1 ? 's' : ''} to ${label}`);
try { await UploadQSOsManual(service, ids as any); }
catch (e: any) { setError(String(e?.message ?? e)); }
try {
// Awaited BEFORE the toast: the backend refuses a service with no
// credentials, and announcing an upload that was never started is how an
// operator concludes their QSOs are on a site they never signed up to.
await UploadQSOsManual(service, ids as any);
showToast(`Uploading ${ids.length} QSO${ids.length > 1 ? 's' : ''} to ${label}`);
} catch (e: any) { setError(String(e?.message ?? e)); }
}
// Right-click "Export filtered to ADIF (no limit)": exports every QSO that
// matches the current filter, bypassing the on-screen row threshold.
@@ -5475,12 +5552,19 @@ export default function App() {
);
const rstTxBlock = (
<div className="flex flex-col w-20" data-esm="rsttx"><Label className="mb-1 h-3.5">{t('field.rstTx')}</Label>
<Combobox value={rstSent} options={rstOptions(mode, rstLists)} commitOnType onChange={(v) => { setRstSent(v); rstUserEditedRef.current = true; }} />
{/* The wheel steps the report an S-unit on RST, a decibel on a digital
one. Wheeling is the same gesture as saying "he is a bit stronger than
that", and it beats retyping three characters between overs. */}
<Combobox value={rstSent} options={rstOptions(mode, rstLists)} commitOnType
onChange={(v) => { setRstSent(v); rstUserEditedRef.current = true; }}
onWheelStep={(d) => { setRstSent((v) => stepRST(v, d, mode)); rstUserEditedRef.current = true; }} />
</div>
);
const rstRxBlock = (
<div className="flex flex-col w-20" data-esm="rstrx"><Label className="mb-1 h-3.5">{t('field.rstRx')}</Label>
<Combobox value={rstRcvd} options={rstOptions(mode, rstLists)} commitOnType onChange={(v) => { setRstRcvd(v); rstUserEditedRef.current = true; }} />
<Combobox value={rstRcvd} options={rstOptions(mode, rstLists)} commitOnType
onChange={(v) => { setRstRcvd(v); rstUserEditedRef.current = true; }}
onWheelStep={(d) => { setRstRcvd((v) => stepRST(v, d, mode)); rstUserEditedRef.current = true; }} />
</div>
);
// DX country flag, shown large next to RST (moved here from the Country field).
@@ -6425,6 +6509,37 @@ export default function App() {
</div>
);
// ONE CLICK TAKES THE STATION, TWO ANSWER IT — and the FT map means the same
// by them as the list does. They were written inline on the list, so the map
// had no way to offer the same gestures without a second copy of them.
function selectDecode(d: any) {
setPskTarget((d.call ?? '').toUpperCase());
setPskTargetMode(d.mode ?? '');
onCallsignInput(d.call, { force: true });
}
function callDecode(d: any) {
// The station being answered is also the one worth analysing: the PSK
// Reporter panel follows the click rather than asking for a second one.
setPskTarget((d.call ?? '').toUpperCase());
setPskTargetMode(d.mode ?? '');
// Auto-call adopts the station: the click chooses WHO, the watchdogs still
// decide how long it is called for.
TakeAutoCallTarget(d.call ?? '', d.band ?? '', d.mode ?? '').catch(() => {});
onCallsignInput(d.call, { force: true });
// With two slices on two bands, the Reply reaches the right INSTANCE but the
// radio still transmits on whichever slice holds the TX flag. Move it to the
// decode's band first, or an 80 m answer goes out on 20 m. A no-op on any
// backend without slices.
FlexTXOnBand(d.band ?? '').catch(() => { /* not a Flex, or no such slice */ });
AnswerDecode(
d.instance ?? '', d.ms ?? 0, d.snr, d.dt ?? 0,
// The RAW mode marker, not the resolved name: the receiving application
// matches the Reply against its decode list field for field, and JTDX
// drops one that says "FT8" where it decoded "~".
d.audio_hz ?? 0, d.mode_raw || d.mode || '', d.msg_raw ?? d.msg ?? '', !!d.low_conf,
).catch((e: any) => setError(String(e?.message ?? e)));
}
const renderDecodesList = () => (
<DecodesPanel
decodes={decodes}
@@ -6449,33 +6564,8 @@ export default function App() {
// One click: take the station, transmit nothing. The entry is filled and
// the panels follow it, exactly as clicking a cluster spot does — so a
// row can be inspected, looked up and read about without keying up.
onSelect={(d) => {
setPskTarget((d.call ?? '').toUpperCase());
setPskTargetMode(d.mode ?? '');
onCallsignInput(d.call, { force: true });
}}
onCall={(d) => {
// The station being answered is also the one worth analysing: the PSK
// Reporter panel follows the click rather than asking for a second one.
setPskTarget((d.call ?? '').toUpperCase());
setPskTargetMode(d.mode ?? '');
// Auto-call adopts the station: the click chooses WHO, the watchdogs
// still decide how long it is called for.
TakeAutoCallTarget(d.call ?? '', d.band ?? '', d.mode ?? '').catch(() => {});
onCallsignInput(d.call, { force: true });
// With two slices on two bands, the Reply reaches the right INSTANCE but
// the radio still transmits on whichever slice holds the TX flag. Move
// it to the decode's band first, or an 80 m answer goes out on 20 m.
// A no-op on any backend without slices.
FlexTXOnBand(d.band ?? '').catch(() => { /* not a Flex, or no such slice */ });
AnswerDecode(
d.instance ?? '', d.ms ?? 0, d.snr, d.dt ?? 0,
// The RAW mode marker, not the resolved name: the receiving
// application matches the Reply against its decode list field for
// field, and JTDX drops one that says "FT8" where it decoded "~".
d.audio_hz ?? 0, d.mode_raw || d.mode || '', d.msg_raw ?? d.msg ?? '', !!d.low_conf,
).catch((e: any) => setError(String(e?.message ?? e)));
}}
onSelect={selectDecode}
onCall={callDecode}
// Wipes the live view only — nothing here is stored, and the staging
// buffer goes too or the next flush would put back what was just cleared.
onClear={(instance) => {
@@ -6790,9 +6880,9 @@ export default function App() {
{/* Motorized-antenna pattern (Normal / 180° reverse / Bidirectional), next to the azimuth. */}
{ubStatus.enabled && (
<div className="inline-flex items-center rounded-full border border-success-border bg-success-muted overflow-hidden text-[10px] font-semibold ml-1"
title={ubStatus.connected ? (ubStatus.moving ? 'Antenna: moving…' : 'Antenna pattern') : 'Antenna: connecting…'}>
title={ubStatus.connected ? (motorMoving ? 'Antenna: moving…' : 'Antenna pattern') : 'Antenna: connecting…'}>
<button type="button" className="pl-1.5 pr-0.5 flex items-center" onClick={() => { setSettingsSection('antenna'); setShowSettings(true); }} title="Antenna settings">
<span className={cn('size-2 rounded-full', ubStatus.connected ? (ubStatus.moving ? 'bg-warning' : 'bg-success') : 'bg-muted-foreground/40')} />
<span className={cn('size-2 rounded-full', ubStatus.connected ? (motorMoving ? 'bg-warning' : 'bg-success') : 'bg-muted-foreground/40')} />
</button>
{([{ d: 0, l: 'N', t: 'Normal' }, { d: 1, l: '180°', t: 'Reverse (180°)' }, { d: 2, l: 'Bi', t: 'Bidirectional' }]).map((o) => (
<button key={o.d} type="button" disabled={!ubStatus.connected} title={o.t}
@@ -6889,8 +6979,8 @@ export default function App() {
{/* Amber while the elements travel: on a SteppIR that is also
when transmitting is a bad idea, so it is worth seeing from
the icon without opening the widget. */}
{ubStatus.moving && <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-warning animate-pulse" />}
{!ubStatus.moving && showMotorAnt && ubStatus.connected && <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-success" />}
{motorMoving && <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-warning animate-pulse" />}
{!motorMoving && showMotorAnt && ubStatus.connected && <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-success" />}
</button>
)}
{agEnabled && (
@@ -7693,7 +7783,7 @@ export default function App() {
{showMotorAnt && ubStatus.enabled && (
<div className="w-[230px] shrink-0 min-h-0" style={{ order: wOrder('motorant') }}>
<MotorAntennaWidget
ant={ubStatus}
ant={{ ...ubStatus, moving: motorMoving }}
refetch={pokeUbStatus}
t={t}
essentialsOnly
@@ -7980,7 +8070,7 @@ export default function App() {
</TabsTrigger>
)}
{catState.backend === 'flex' && <TabsTrigger value="flex">Flex Console</TabsTrigger>}
{catState.backend === 'icom' && <TabsTrigger value="icom">Icom Console</TabsTrigger>}
{icomShown && <TabsTrigger value="icom">Icom Console</TabsTrigger>}
{catState.backend === 'yaesu' && <TabsTrigger value="yaesu">Yaesu Console</TabsTrigger>}
{(catState.backend === 'elecraft' || catState.backend === 'kenwood') && <TabsTrigger value="elecraft">{t('k3.console')}</TabsTrigger>}
{catState.backend === 'tci' && <TabsTrigger value="tci">{t('tcip.console')}</TabsTrigger>}
@@ -8699,7 +8789,8 @@ export default function App() {
<TabsContent value="ftmap" className="mt-0 flex flex-col min-h-0 flex-1 data-[state=inactive]:hidden">
{activeTab === 'ftmap' && (
<div className="h-full w-full min-h-0 bg-card border border-border rounded-lg overflow-hidden">
<FTMapPanel decodes={decodes as any} myGrid={station.my_grid} />
<FTMapPanel decodes={decodes as any} myGrid={station.my_grid}
onSelect={selectDecode} onCall={callDecode} />
</div>
)}
</TabsContent>
@@ -8755,7 +8846,7 @@ export default function App() {
</TabsContent>
)}
{catState.backend === 'icom' && (
{icomShown && (
<TabsContent value="icom" className="flex-1 min-h-0 p-0">
<IcomPanel isNetwork={catBackend === 'icom-net'} onReportRST={(r) => { setRstSent(r); rstUserEditedRef.current = true; }} />
</TabsContent>
@@ -8926,6 +9017,7 @@ export default function App() {
catUp={catUp}
catState={catState}
onOpenSettings={() => { setSettingsSection('cat'); setShowSettings(true); }}
onRadioSwitched={loadCATCfg}
/>
<Chip
on={rotatorHeading.enabled && rotatorHeading.ok}
@@ -9171,7 +9263,7 @@ export default function App() {
onSaved={onSettingsSaved}
onMainPaneChanged={onSettingsPaneChanged}
flexAvailable={catState.backend === 'flex'}
icomAvailable={catState.backend === 'icom'}
icomAvailable={icomShown}
yaesuAvailable={catState.backend === 'yaesu'}
elecraftAvailable={catState.backend === 'elecraft' || catState.backend === 'kenwood'}
tciAvailable={catState.backend === 'tci'}
+40 -14
View File
@@ -1009,22 +1009,48 @@ export function DecodesPanel({ decodes, txMsgs, txState, txStates, spotStatus, r
>
<Bot className="size-3.5" />
{t('dec.autoCall')}
{autoCallOn && autoCall?.target && (
<span className="font-mono text-xs">
{autoCall.target} {autoCall.calls}/{autoCall.max}
{autoCall.misses > 0 ? ` ·${autoCall.misses}/${autoCall.max_miss}` : ''}
</span>
)}
{/* Wanted, decoded, and in a QSO with somebody else. Holding fire
looks exactly like having nothing to do, and the operator had no
way to tell them apart. */}
{autoCallOn && !autoCall?.target && autoCall?.waiting && (
<span className="font-mono text-xs animate-pulse" title={t('dec.autoWaitTip', { call: autoCall.waiting })}>
{autoCall.waiting}
</span>
)}
</button>
)}
{/* WHAT IT IS DOING, BESIDE THE SWITCH RATHER THAN ON IT.
A thing that keys the transmitter must never be a switch with no
readout — but the readout was crammed inside the button as
"Auto D2ACE 1/7 ·1/3", where the two counters read as one number and
the whole control changed width every period. Out here each figure
gets a label, and the station being called is the biggest thing on
the row. */}
{autoCallOn && autoCall?.target && (
<span className="h-8 inline-flex items-center gap-2 rounded-lg border border-success/50 bg-success/10 px-2"
title={t('dec.autoTargetTip', { call: autoCall.target })}>
<span className="font-mono text-sm font-bold text-success">{autoCall.target}</span>
<span className="inline-flex items-center gap-1 text-[11px] text-muted-foreground">
<span className="uppercase tracking-wide">{t('dec.autoCalls')}</span>
<span className="font-mono tabular-nums text-foreground">{autoCall.calls}/{autoCall.max}</span>
</span>
{/* Only once there is one to report: a zero that is always there is
a figure nobody reads, and it was the half of the pair that got
mistaken for the call count. */}
{autoCall.misses > 0 && (
<span className="inline-flex items-center gap-1 text-[11px] text-muted-foreground">
<span className="uppercase tracking-wide">{t('dec.autoMisses')}</span>
<span className={cn('font-mono tabular-nums',
autoCall.misses + 1 >= autoCall.max_miss ? 'text-warning' : 'text-foreground')}>
{autoCall.misses}/{autoCall.max_miss}
</span>
</span>
)}
</span>
)}
{/* Wanted, decoded, and in a QSO with somebody else. Holding fire looks
exactly like having nothing to do, and the operator had no way to
tell them apart. */}
{autoCallOn && !autoCall?.target && autoCall?.waiting && (
<span className="h-8 inline-flex items-center gap-1.5 rounded-lg border border-warning/50 bg-warning/10 px-2 animate-pulse"
title={t('dec.autoWaitTip', { call: autoCall.waiting })}>
<span className="text-sm"></span>
<span className="font-mono text-sm font-bold text-warning">{autoCall.waiting}</span>
<span className="text-[11px] uppercase tracking-wide text-muted-foreground">{t('dec.autoWaiting')}</span>
</span>
)}
{/* The chase list. Raw text while typing, committed on blur or Enter:
the stored value is upper-cased and trimmed, and binding the box to
that makes the space bar look dead — in a field whose whole purpose
+63 -5
View File
@@ -5,6 +5,7 @@ import { gridToLatLon, greatCirclePoints, splitAtAntimeridian } from '@/lib/maid
import { BASEMAPS, type BasemapKey } from '@/components/MainMap';
import { cn } from '@/lib/utils';
import { useI18n } from '@/lib/i18n';
import { loadMapView, saveMapView, MAP_VIEW_FT } from '@/lib/mapView';
// FT Map — the live decode feed as geography: every station decoded in the
// last half hour, an arc from the operator's own square to theirs, coloured by
@@ -18,12 +19,16 @@ import { useI18n } from '@/lib/i18n';
// capped, and redraws happen when the DECODE LIST changes — every 15 s in FT8,
// not per frame.
// The map is handed the SAME decode objects the list works from — it only reads
// a few of the fields. The rest travel with them so a click here can answer the
// station exactly as a double-click in the list does.
export type FTMapDecode = {
call: string;
grid?: string;
band?: string;
snr: number;
at: string;
[k: string]: unknown;
};
// The band palette every PSK Reporter user already knows, near enough.
@@ -38,7 +43,26 @@ const bandColour = (b?: string) => BAND_COLOURS[(b ?? '').toLowerCase()] || '#9c
const MAX_ARCS = 300;
const MAX_AGE_MS = 30 * 60_000;
export function FTMapPanel({ decodes, myGrid }: { decodes: FTMapDecode[]; myGrid: string }) {
export function FTMapPanel({ decodes, myGrid, onSelect, onCall }: {
decodes: FTMapDecode[];
myGrid: string;
// One click takes the station, two answer it — the list's own gestures.
onSelect?: (d: FTMapDecode) => void;
onCall?: (d: FTMapDecode) => void;
}) {
// Held in refs so the redraw below does not have to list them as dependencies
// and rebuild every arc whenever the parent re-renders.
const selectRef = useRef(onSelect);
const callRef = useRef(onCall);
useEffect(() => { selectRef.current = onSelect; callRef.current = onCall; }, [onSelect, onCall]);
// Distinguishing the two gestures is ours to do: Leaflet fires click before
// dblclick and leaves the telling apart to the handler.
const clickTimer = useRef<number | undefined>(undefined);
useEffect(() => () => window.clearTimeout(clickTimer.current), []);
// Where this map was left. Panning and zooming it is the operator saying which
// part of the world they are working; throwing that away on every tab switch
// made it something to set up again rather than something to glance at.
const saved = useRef(loadMapView(MAP_VIEW_FT));
const { t } = useI18n();
const divRef = useRef<HTMLDivElement>(null);
const mapRef = useRef<L.Map | null>(null);
@@ -58,7 +82,15 @@ export function FTMapPanel({ decodes, myGrid }: { decodes: FTMapDecode[]; myGrid
// No maxBounds: with the world smaller than the window the clamp
// dragged every zoom into a corner. noWrap tiles alone keep one world.
worldCopyJump: false, preferCanvas: true,
center: [25, 0], zoom: 2, minZoom: 2,
center: saved.current ? [saved.current.lat, saved.current.lon] : [25, 0],
zoom: saved.current ? saved.current.zoom : 2,
minZoom: 2,
});
// Every move, not just the deliberate ones: a zoom is as much a choice as a
// pan, and there is no moment afterwards at which to ask.
m.on('moveend', () => {
const c = m.getCenter();
saveMapView(MAP_VIEW_FT, c.lat, c.lng, m.getZoom());
});
mapRef.current = m;
layerRef.current = L.layerGroup().addTo(m);
@@ -132,10 +164,36 @@ export function FTMapPanel({ decodes, myGrid }: { decodes: FTMapDecode[]; myGrid
L.polyline(pts as L.LatLngExpression[][], {
color: colour, weight: 1.3, opacity: 0.65 * fade, smoothFactor: 0,
}).addTo(layer);
L.circleMarker([to.lat, to.lon], {
const label = `${d.call} · ${d.grid} · ${d.snr > 0 ? '+' : ''}${d.snr} dB`;
const mk = L.circleMarker([to.lat, to.lon], {
// A three-pixel dot is a fine mark and a poor target, so the visible
// radius stays and an invisible one three times the size takes the
// clicks.
radius: 3, color: colour, weight: 1, fillColor: colour, fillOpacity: 0.9 * fade,
}).bindTooltip(`${d.call} · ${d.grid} · ${d.snr > 0 ? '+' : ''}${d.snr} dB`, { direction: 'top' })
.addTo(layer);
}).bindTooltip(label, { direction: 'top' }).addTo(layer);
// The tooltip goes on the HIT circle too, and it is the one that matters:
// being on top, it takes the hover as well as the click, and binding it
// only to the dot underneath left the map silent from the moment the dots
// became clickable — the callsign and report an operator reads by pointing
// at a station had simply gone.
const hit = L.circleMarker([to.lat, to.lon], {
radius: 9, opacity: 0, fillOpacity: 0, interactive: true,
}).bindTooltip(label, { direction: 'top' }).addTo(layer);
for (const target of [mk, hit]) {
target.on('click', (e) => {
// Not to the map: a click on a station is not a click on the water.
L.DomEvent.stopPropagation(e as unknown as Event);
window.clearTimeout(clickTimer.current);
clickTimer.current = window.setTimeout(() => selectRef.current?.(d), 250);
});
target.on('dblclick', (e) => {
// stop(), not stopPropagation(): the map zooms on a double click, and
// answering a station is not a request to zoom in on it.
L.DomEvent.stop(e as unknown as Event);
window.clearTimeout(clickTimer.current);
callRef.current?.(d);
});
}
}
}, [decodes, myGrid]);
+12 -3
View File
@@ -8,6 +8,7 @@ import { useI18n } from '@/lib/i18n';
import { cn } from '@/lib/utils';
import { BASEMAPS, addBasemap, loadBasemap, type BasemapKey } from '@/components/MainMap';
import { writeUiPref } from '@/lib/uiPref';
import { loadMapView, saveMapView, MAP_VIEW_GRIDS } from '@/lib/mapView';
// GridSquareMap — every Maidenhead square in the log, drawn on a world map.
//
@@ -131,8 +132,16 @@ export function GridSquareMap({ myGrid, className }: { myGrid?: string; classNam
}).setView([20, 0], 2);
// The whole world, once, whatever the window is shaped like — computed by
// Leaflet from the container rather than guessed with a zoom number.
m.fitWorld({ animate: false });
// Leaflet from the container rather than guessed with a zoom number. Unless
// the operator has already chosen a view: theirs is the answer, and fitting
// the world over it would undo the choice on every tab switch.
const saved = loadMapView(MAP_VIEW_GRIDS);
if (saved) m.setView([saved.lat, saved.lon], saved.zoom);
else m.fitWorld({ animate: false });
m.on('moveend', () => {
const c = m.getCenter();
saveMapView(MAP_VIEW_GRIDS, c.lat, c.lng, m.getZoom());
});
mapRef.current = m;
layerRef.current = L.layerGroup().addTo(m);
// Leaflet measures its container ONCE, when the map is created, and never
@@ -144,7 +153,7 @@ export function GridSquareMap({ myGrid, className }: { myGrid?: string; classNam
// fitWorld above ran against a container that may still have had no size —
// the tab is mounted hidden. Fit ONCE more the first time it really has one,
// and never again: after that the view belongs to the operator.
let fitted = false;
let fitted = !!saved; // a remembered view is already the right size
const ro = new ResizeObserver(() => {
m.invalidateSize({ animate: false });
const el = hostRef.current;
+49 -12
View File
@@ -5,15 +5,13 @@ import { nightPolygon } from '../lib/greyline';
import { gridToLatLon, gridSquareBounds, greatCirclePoints, pathBetween, destinationPoint } from '@/lib/maidenhead';
import { writeUiPref } from '@/lib/uiPref';
import { formatDistance } from '@/lib/units';
import { loadMapView, saveMapView, MAP_VIEW_WORLD } from '@/lib/mapView';
// Persisted free-pan view of the world map (when auto-zoom is off).
function loadMapView(): { lat: number; lon: number; zoom: number } | null {
try { const v = JSON.parse(localStorage.getItem('opslog.mapView') || 'null'); return v && typeof v.zoom === 'number' ? v : null; }
catch { return null; }
}
function saveMapView(m: L.Map) {
const loadWorldView = () => loadMapView(MAP_VIEW_WORLD);
function saveWorldView(m: L.Map) {
const c = m.getCenter();
writeUiPref('opslog.mapView', JSON.stringify({ lat: c.lat, lon: c.lng, zoom: m.getZoom() }));
saveMapView(MAP_VIEW_WORLD, c.lat, c.lng, m.getZoom());
}
// The Main tab is built from two independent map panes that the operator can
@@ -28,6 +26,26 @@ function saveMapView(m: L.Map) {
// unwrapLon makes a lat/lon ring continuous in longitude (each point within
// 180° of the previous) so a polygon crossing the antimeridian doesn't snap
// across the whole map. Coords may exceed ±180; Leaflet (worldCopyJump) is fine.
// homeView is where a world map should open for THIS station.
//
// Centred on 0° a world map puts Europe in the middle and leaves an Australian
// looking at their own country in the bottom-right corner, with the paths to
// everywhere they work running off both edges. Centred on their own longitude
// the same map reads the way their antenna does: the Americas to the east,
// Europe and Africa to the west. Leaflet repeats the world horizontally
// (worldCopyJump), so this is a choice of viewpoint and costs nothing — the
// tiles either side are the same world, and the great-circle code already draws
// across the seam (see unwrapLon).
//
// The latitude is damped, not followed: a station at 69° north centred on itself
// would spend half the map on the Arctic. It leans towards the operator's
// hemisphere and stops well short of the pole.
function homeView(grid: string): [number, number] {
const home = gridToLatLon(grid);
if (!home) return [20, 0];
return [Math.max(-35, Math.min(45, home.lat * 0.6 + 8)), home.lon];
}
function unwrapLon(ring: [number, number][]): [number, number][] {
const out: [number, number][] = [];
let prev = NaN;
@@ -178,31 +196,50 @@ export function WorldMap({ fromGrid, toGrid, fromLabel, toLabel, beamAzimuths, b
const autoZoomRef = useRef(autoZoom);
useEffect(() => { autoZoomRef.current = autoZoom; }, [autoZoom]);
// WAIT FOR THE SQUARE BEFORE PAINTING.
//
// The station's own locator arrives from the profile a moment after this
// component mounts. Building the map immediately meant painting the world at
// 0°, then moving it to the operator's longitude — a screenful of tiles
// fetched from Esri and thrown away on every first run. The map is built once,
// when it knows where it is looking.
//
// Not for ever, though: an operator with no locator set (or a profile still
// loading after two seconds) gets the default view rather than a blank panel.
const [mapReady, setMapReady] = useState(() => !!gridToLatLon(fromGrid) || !!loadWorldView());
useEffect(() => {
if (mapReady) return;
if (gridToLatLon(fromGrid)) { setMapReady(true); return; }
const t = window.setTimeout(() => setMapReady(true), 2000);
return () => window.clearTimeout(t);
}, [fromGrid, mapReady]);
// One-time map creation.
useEffect(() => {
if (worldRef.current && !worldMap.current) {
if (worldRef.current && !worldMap.current && mapReady) {
// preferCanvas: the beam lobe is a dense FAN of translucent radials — up to
// ~120 thick strokes with a bidirectional Ultrabeam. As SVG that is ~120
// composited paths re-rasterised on every pan, zoom and redraw, which is
// enough to blow WebView2's raster budget and leave the window painting in
// patches. On canvas it is a single layer.
const m = L.map(worldRef.current, { zoomControl: true, attributionControl: true, worldCopyJump: true, preferCanvas: true })
.setView([20, 0], 1);
.setView(homeView(fromGrid), 1);
addBasemap(m, basemap, baseLayer, labelsLayer);
worldOverlay.current = L.layerGroup().addTo(m);
worldMap.current = m;
const sv = loadMapView();
const sv = loadWorldView();
if (!autoZoomRef.current && sv) m.setView([sv.lat, sv.lon], sv.zoom);
m.on('moveend', () => { if (!autoZoomRef.current) saveMapView(m); });
m.on('moveend', () => { if (!autoZoomRef.current) saveWorldView(m); });
}
const t = window.setTimeout(() => { worldMap.current?.invalidateSize(); }, 80);
// Resizing the pane is the ONLY thing that needs invalidateSize. Calling it on
// every overlay redraw (as before) forced a full repaint of the map each time
// the rotor moved a degree.
const ro = new ResizeObserver(() => worldMap.current?.invalidateSize());
if (worldRef.current) ro.observe(worldRef.current);
return () => { window.clearTimeout(t); ro.disconnect(); };
}, []);
}, [mapReady]);
// Swap the basemap (and its optional place-name overlay) when the operator
// picks a different one. Vector overlays (path/beam) live in Leaflet's
@@ -427,7 +464,7 @@ export function WorldMap({ fromGrid, toGrid, fromLabel, toLabel, beamAzimuths, b
setAutoZoom(v);
writeUiPref('opslog.mapAutoZoomDX', v ? '1' : '0');
const m = worldMap.current;
if (!v && m) saveMapView(m);
if (!v && m) saveWorldView(m);
}}
title={autoZoom ? 'Auto-zoom to DX is ON — click for free pan/zoom (remembered)' : 'Free pan/zoom — click to auto-zoom to the DX'}
className={`absolute top-1 right-1 z-[500] rounded-md px-2 py-1 text-[11px] font-medium shadow border backdrop-blur transition-colors ${
+7 -3
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import { Trash2, Search, Loader2, CalendarDays } from 'lucide-react';
import { LookupCallsign, LookupCallsignFresh, DXCCForCountry, GetAwardDefs, ComputeQSOAwardRefs, GetListsSettings, OpenExternalURL, SetOpsLogQSLReceived } from '../../wailsjs/go/main/App';
import { rstOptions, type RSTLists } from '@/lib/rst';
import { rstOptions, stepRST, type RSTLists } from '@/lib/rst';
import { AwardRefSelector } from '@/components/AwardRefSelector';
import { AdifExtrasEditor } from '@/components/AdifExtrasEditor';
import { applyAwardRefs } from '@/lib/awardRefs';
@@ -598,9 +598,13 @@ export function QSOEditModal({ qso, onSave, onDelete, onClose, countries = [], b
value={draft.callsign ?? ''} onChange={(e) => set('callsign', e.target.value)} />
</div>
<div className="flex flex-col w-20"><Label>S</Label>
<Combobox value={draft.rst_sent ?? ''} options={rstOptions(draft.mode ?? '', rstLists)} commitOnType onChange={(v) => set('rst_sent', v)} /></div>
<Combobox value={draft.rst_sent ?? ''} options={rstOptions(draft.mode ?? '', rstLists)} commitOnType
onChange={(v) => set('rst_sent', v)}
onWheelStep={(d) => set('rst_sent', stepRST(draft.rst_sent ?? '', d, draft.mode ?? ''))} /></div>
<div className="flex flex-col w-20"><Label>R</Label>
<Combobox value={draft.rst_rcvd ?? ''} options={rstOptions(draft.mode ?? '', rstLists)} commitOnType onChange={(v) => set('rst_rcvd', v)} /></div>
<Combobox value={draft.rst_rcvd ?? ''} options={rstOptions(draft.mode ?? '', rstLists)} commitOnType
onChange={(v) => set('rst_rcvd', v)}
onWheelStep={(d) => set('rst_rcvd', stepRST(draft.rst_rcvd ?? '', d, draft.mode ?? ''))} /></div>
<Button type="button" variant="outline" className="h-10" onClick={fetchLookup} disabled={looking}
title={t('qedit.fetchTitle')}>
{looking ? <Loader2 className="size-4 animate-spin" /> : <Search className="size-4" />} {t('qedit.fetch')}
+107 -60
View File
@@ -70,6 +70,12 @@ const TARGET_FADE_MS = 500;
// in four colour schemes stops being readable. The chrome around it — card,
// borders, buttons — follows the theme as everything else does.
const COMPASS_ORANGE = '#F97316';
// Three things are drawn on this dial and they must never be mistaken for one
// another: where the antenna IS (green, as everywhere else in OpsLog), where
// the mouse would send it (orange, the dial's own colour), and where it has
// been ORDERED to go (yellow, the same yellow as the figure under the readout).
const BEAM_GREEN = '#22C55E';
type BeamKind = 'antenna' | 'hover';
// The target is yellow in BOTH places it appears: the figure under the current
// azimuth and the dot on the dial. One idea, one colour.
const TARGET_YELLOW = '#FBBF24';
@@ -118,7 +124,7 @@ function unwrapRotation(nextAngle: number, previousRotation: number | null): num
function RotorCompassDial({
azimuth, secondary, boom, targetAzimuth, targetFading,
shortPath, longPath, centerLat, centerLon, onGoto,
shortPath, longPath, centerLat, centerLon, onGoto, onHoverAzimuth,
}: {
azimuth: number | null;
// The second lobe of a bidirectional Ultrabeam, and the mechanical boom when
@@ -132,6 +138,10 @@ function RotorCompassDial({
centerLat?: number | null;
centerLon?: number | null;
onGoto?: (az: number) => void;
// What the mouse is over, so the readout can show it. The figure belongs
// beside the current heading, not on the map: a number floating over a beam
// is read by moving the eye, and this one is read while aiming.
onHoverAzimuth?: (az: number | null) => void;
}) {
// Gradient and mask ids must be unique per instance: two compasses on one
// screen (docked widget + Station Control) would otherwise share the first
@@ -144,16 +154,19 @@ function RotorCompassDial({
const SIZE = 320;
const CENTER = SIZE / 2;
// The scale is a SQUARE ring, not a circle: it puts the tick marks at the
// edge of the panel, which is where the room is.
const SCALE_HALF = 108;
const CARDINAL_TICK_OUTER_HALF = SCALE_HALF + 7;
const MAJOR_TICK_INNER_HALF = SCALE_HALF - 17;
// A CIRCLE, not a square ring. The square put the ticks in the corners of
// the panel, which is where the room is — and made every distance from the
// centre depend on the direction, so a marker at 45° sat further out than one
// at north. A dial is read by angle; the ring it is read against has to be
// the same distance away all the way round.
const SCALE_RADIUS = 112;
const CARDINAL_TICK_OUTER_RADIUS = SCALE_RADIUS + 7;
const MAJOR_TICK_INNER_RADIUS = SCALE_RADIUS - 17;
const POINTER_TIP_RADIUS = 72;
const CARDINAL_LABEL_INSET = 23;
const CARDINAL_LABEL_RADIUS = SCALE_RADIUS + 24;
const CENTER_DOT_RADIUS = 4.2;
const MAP_RADIUS = CENTER - 1;
// Around the centre the cursor's direction is meaningless — a pixel either
// Around the centre the cursors direction is meaningless — a pixel either
// way is forty degrees — so no heading is derived there.
const HOVER_DEAD_ZONE = 14;
@@ -171,34 +184,15 @@ function RotorCompassDial({
return geoPath(projection as any)(LAND as any) || '';
}, [centerLat, centerLon]);
// A point on the square scale at a given azimuth.
const squarePoint = (angle: number, halfExtent: number) => {
const radians = (normalizeAzimuth(angle) * Math.PI) / 180;
const dx = Math.sin(radians);
const dy = -Math.cos(radians);
const divisor = Math.max(Math.abs(dx), Math.abs(dy), 0.0001);
const scale = halfExtent / divisor;
return { x: CENTER + dx * scale, y: CENTER + dy * scale };
};
const radialPoint = (angle: number, radius: number) => {
const radians = (normalizeAzimuth(angle) * Math.PI) / 180;
return { x: CENTER + Math.sin(radians) * radius, y: CENTER - Math.cos(radians) * radius };
};
const radialDistanceToSquare = (angle: number, halfExtent: number) => {
const radians = (normalizeAzimuth(angle) * Math.PI) / 180;
const dx = Math.sin(radians);
const dy = -Math.cos(radians);
return halfExtent / Math.max(Math.abs(dx), Math.abs(dy), 0.0001);
};
// Markers sit halfway between the pointer's tip and the scale, so they stay
// clear of both whatever direction they are in — the ring is a square.
const markerRadius = (angle: number) => {
const tickInnerRadius = radialDistanceToSquare(angle, MAJOR_TICK_INNER_HALF);
return POINTER_TIP_RADIUS + (tickInnerRadius - POINTER_TIP_RADIUS) / 2;
};
// Markers sit halfway between the beams tip and the scale, clear of both.
// One number now: on a circular ring the answer no longer depends on which
// way the marker lies.
const markerRadius = POINTER_TIP_RADIUS + (MAJOR_TICK_INNER_RADIUS - POINTER_TIP_RADIUS) / 2;
const azimuthFromMouseEvent = (event: ReactMouseEvent<SVGSVGElement>): number | null => {
const rect = event.currentTarget.getBoundingClientRect();
@@ -214,6 +208,7 @@ function RotorCompassDial({
const clearHover = () => {
setHoverAzimuth(null);
onHoverAzimuth?.(null);
setHoverRotation(null);
hoverRotationRef.current = null;
};
@@ -225,6 +220,7 @@ function RotorCompassDial({
const nextRotation = unwrapRotation(nextAzimuth, hoverRotationRef.current);
hoverRotationRef.current = nextRotation;
setHoverAzimuth(nextAzimuth);
onHoverAzimuth?.(nextAzimuth);
setHoverRotation(nextRotation);
};
@@ -239,7 +235,7 @@ function RotorCompassDial({
const degreeLabels = [30, 60, 120, 150, 210, 240, 300, 330];
const renderPathDot = (angle: number, type: 'sp' | 'lp') => {
const point = radialPoint(angle, markerRadius(angle));
const point = radialPoint(angle, markerRadius);
return (
<circle cx={point.x} cy={point.y} r="4.2" fill="currentColor"
className={type === 'sp' ? 'text-success' : 'text-destructive'}
@@ -248,36 +244,46 @@ function RotorCompassDial({
};
const renderTargetDot = (angle: number) => {
const point = radialPoint(angle, markerRadius(angle));
const point = radialPoint(angle, markerRadius);
return (
<circle cx={point.x} cy={point.y} r="4.2" fill={TARGET_YELLOW} pointerEvents="none"
style={{ opacity: targetFading ? 0 : 0.95, transition: `opacity ${TARGET_FADE_MS}ms ease-out` }} />
);
};
// The pointer is drawn once and rotated, so the browser animates the turn
// instead of the component redrawing a triangle every telemetry read.
const renderPointer = (rotation: number, colour: string | null, opacity: number, animated: boolean) => {
const tipY = 88;
const baseY = 110;
const innerTipY = 98;
// A BEAM, not an arrow. The dial answers "where is the antenna looking", and
// an antenna does not look along a line — it looks through a lobe. Drawn as a
// sector that fades outwards, which is also the shape of the thing it stands
// for; the arrow said a precision the beamwidth does not have.
//
// Drawn pointing north and rotated as a whole, so the browser animates the
// turn instead of the component recomputing an arc on every telemetry read —
// and rotation is the ONLY source of angle here, which is what keeps the
// mouse preview exactly under the cursor.
const BEAM_HALF_ANGLE = 17.5;
const renderBeam = (rotation: number, kind: BeamKind, opacity: number, animated: boolean) => {
const left = radialPoint(-BEAM_HALF_ANGLE, SCALE_RADIUS);
const right = radialPoint(BEAM_HALF_ANGLE, SCALE_RADIUS);
return (
<g
className={colour ? undefined : 'text-success'}
pointerEvents="none"
style={{
transform: `rotate(${rotation}deg)`,
transformOrigin: `${CENTER}px ${CENTER}px`,
opacity,
transition: animated ? 'transform 350ms ease-out' : 'transform 70ms linear, opacity 120ms ease-out',
transition: animated
? 'transform 500ms cubic-bezier(0.16,1,0.3,1), opacity 500ms ease-out'
: 'transform 70ms linear, opacity 120ms ease-out',
}}
>
<path d={`M ${CENTER - 13} ${baseY} L ${CENTER} ${tipY} L ${CENTER + 13} ${baseY}`}
fill="none" stroke={colour ?? 'currentColor'} strokeWidth="5.5"
strokeLinecap="round" strokeLinejoin="round" />
<path d={`M ${CENTER - 4.5} ${baseY - 2} L ${CENTER} ${innerTipY} L ${CENTER + 4.5} ${baseY - 2}`}
fill="none" stroke={colour ?? 'currentColor'} strokeWidth="2"
strokeLinecap="round" strokeLinejoin="round" opacity="0.6" />
<path
d={`M ${CENTER} ${CENTER} L ${left.x} ${left.y} A ${SCALE_RADIUS} ${SCALE_RADIUS} 0 0 1 ${right.x} ${right.y} Z`}
fill={`url(#beam-${kind}-${uid})`}
/>
{/* The axis: the heading itself, to the rim, fading outwards so the
eye is drawn to where it starts rather than where it ends. */}
<line x1={CENTER} y1={CENTER} x2={CENTER} y2={CENTER - SCALE_RADIUS}
stroke={`url(#axis-${kind}-${uid})`} strokeWidth="2" strokeLinecap="round" />
</g>
);
};
@@ -312,6 +318,24 @@ function RotorCompassDial({
<mask id={mapFadeMaskId}>
<rect x="0" y="0" width={SIZE} height={SIZE} fill={`url(#${mapFadeGradientId})`} />
</mask>
{/* One pair per beam kind: the sector's wash and its axis. Both fade
outwards — a lobe has no edge, and drawing one would claim a
beamwidth the antenna does not have. */}
{([['antenna', BEAM_GREEN], ['hover', COMPASS_ORANGE]] as const).map(([kind, colour]) => (
<g key={kind}>
<linearGradient id={`beam-${kind}-${uid}`} x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stopColor={colour} stopOpacity="0.45" />
<stop offset="55%" stopColor={colour} stopOpacity="0.22" />
<stop offset="100%" stopColor={colour} stopOpacity="0" />
</linearGradient>
<linearGradient id={`axis-${kind}-${uid}`} x1="0" y1={CENTER} x2="0" y2={CENTER - SCALE_RADIUS}
gradientUnits="userSpaceOnUse">
<stop offset="0%" stopColor={colour} stopOpacity="1" />
<stop offset="55%" stopColor={colour} stopOpacity="0.45" />
<stop offset="100%" stopColor={colour} stopOpacity="0" />
</linearGradient>
</g>
))}
</defs>
<rect x="0" y="0" width={SIZE} height={SIZE} fill={`url(#${bgGradientId})`} />
@@ -329,8 +353,8 @@ function RotorCompassDial({
const cardinal = angle % 90 === 0;
const major = angle % 30 === 0;
const medium = !major && angle % 10 === 0;
const outer = squarePoint(angle, cardinal ? CARDINAL_TICK_OUTER_HALF : SCALE_HALF);
const inner = squarePoint(angle, major ? MAJOR_TICK_INNER_HALF : medium ? SCALE_HALF - 11 : SCALE_HALF - 6);
const outer = radialPoint(angle, cardinal ? CARDINAL_TICK_OUTER_RADIUS : SCALE_RADIUS);
const inner = radialPoint(angle, major ? MAJOR_TICK_INNER_RADIUS : medium ? SCALE_RADIUS - 11 : SCALE_RADIUS - 6);
return (
<line key={`tick-${angle}`} x1={inner.x} y1={inner.y} x2={outer.x} y2={outer.y}
stroke="currentColor" strokeLinecap="round"
@@ -343,7 +367,7 @@ function RotorCompassDial({
<g pointerEvents="none">
{degreeLabels.map((angle) => {
const position = squarePoint(angle, SCALE_HALF + 20);
const position = radialPoint(angle, SCALE_RADIUS + 22);
return (
<text key={`degree-${angle}`} x={position.x} y={position.y}
textAnchor="middle" dominantBaseline="middle" fill="currentColor"
@@ -354,22 +378,25 @@ function RotorCompassDial({
})}
</g>
{/* The cardinals sit on the same circle as everything else. Each carries
a small outward nudge: the letters are not the same height, and set
on a true circle S and W read as if they had slipped inwards. */}
<g pointerEvents="none">
{([['N', CENTER, CARDINAL_LABEL_INSET], ['E', SIZE - CARDINAL_LABEL_INSET, CENTER],
['S', CENTER, SIZE - CARDINAL_LABEL_INSET], ['W', CARDINAL_LABEL_INSET, CENTER]] as const).map(
([label, x, y]) => (
<text key={label} x={x} y={y} textAnchor="middle" dominantBaseline="middle"
{([['N', 0, 0], ['E', 90, 2], ['S', 180, 4], ['W', 270, 3]] as const).map(([label, angle, nudge]) => {
const position = radialPoint(angle, CARDINAL_LABEL_RADIUS + nudge);
return (
<text key={label} x={position.x} y={position.y} textAnchor="middle" dominantBaseline="middle"
fill={COMPASS_ORANGE} className="text-[27px] font-black">
{label}
</text>
),
)}
);
})}
</g>
{/* Where the mouse is pointing, in the same shape as the antenna's own
pointer: the click sends the antenna there, so the preview should
look like what it will produce. */}
{hoverAzimuth != null && hoverRotation != null && renderPointer(hoverRotation, COMPASS_ORANGE, 0.78, false)}
{hoverAzimuth != null && hoverRotation != null && renderBeam(hoverRotation, 'hover', 1, false)}
{shortPath != null && renderPathDot(shortPath, 'sp')}
{longPath != null && renderPathDot(longPath, 'lp')}
@@ -391,9 +418,10 @@ function RotorCompassDial({
);
})()}
{/* The second lobe of a bidirectional antenna: same pointer, dimmed. */}
{secondary != null && renderPointer(normalizeAzimuth(secondary), null, 0.42, true)}
{azimuth != null && renderPointer(normalizeAzimuth(azimuth), null, 0.96, true)}
{/* The second lobe of a bidirectional antenna: the same beam, dimmed
it radiates as much, and it is not where the operator aimed. */}
{secondary != null && renderBeam(normalizeAzimuth(secondary), 'antenna', 0.45, true)}
{azimuth != null && renderBeam(normalizeAzimuth(azimuth), 'antenna', 1, true)}
<circle cx={CENTER} cy={CENTER} r={CENTER_DOT_RADIUS} fill={COMPASS_ORANGE} pointerEvents="none" />
</svg>
@@ -435,6 +463,8 @@ export function RotorCompass({
() => rememberedTargets.get(rotorKey) ?? null,
);
const [targetFading, setTargetFading] = useState(false);
// Where the mouse is aiming, while it is over the dial.
const [hoverAzimuth, setHoverAzimuth] = useState<number | null>(null);
const flashTimerRef = useRef<number | undefined>(undefined);
const movementTimerRef = useRef<number | undefined>(undefined);
@@ -723,13 +753,29 @@ export function RotorCompass({
{/* Where the antenna is, and under it — smaller, yellow, and only while it
matters — where it was told to go. */}
<div className="h-full min-h-0 rounded-md border border-border bg-background/30 px-1 text-center relative overflow-hidden">
{/* Two readings in ONE place, cross-faded: where the antenna is, and —
while the mouse is over the dial — where a click would send it. The
aiming figure is what the operator is reading at that moment, and
putting it somewhere else means looking away from the beam to find
it. The green one does not move, so nothing jumps when the mouse
leaves the dial. */}
<div className={cn(
'absolute left-1/2 top-1/2 -translate-x-1/2 font-mono text-[30px] leading-none font-bold tabular-nums whitespace-nowrap transition-all duration-300 ease-out',
targetAzimuth != null ? '-translate-y-[72%]' : '-translate-y-1/2',
hoverAzimuth != null ? 'opacity-0 scale-95' : 'opacity-100 scale-100',
displayAzimuth != null ? 'text-success' : 'text-muted-foreground',
)}>
{displayAzimuth != null ? `${displayAzimuth}°` : '—'}
</div>
<div className={cn(
'absolute left-1/2 top-1/2 -translate-x-1/2 font-mono text-[30px] leading-none font-bold tabular-nums whitespace-nowrap transition-all duration-300 ease-out',
targetAzimuth != null ? '-translate-y-[72%]' : '-translate-y-1/2',
hoverAzimuth != null ? 'opacity-100 scale-100' : 'opacity-0 scale-95 pointer-events-none',
)}
style={{ color: COMPASS_ORANGE }}>
{hoverAzimuth != null ? `${hoverAzimuth}°` : ''}
</div>
{targetAzimuth != null && (
<div
className={cn(
@@ -812,6 +858,7 @@ export function RotorCompass({
centerLat={centerLat}
centerLon={centerLon}
onGoto={onGoto ? gotoAzimuth : undefined}
onHoverAzimuth={setHoverAzimuth}
/>
);
+19 -6
View File
@@ -1621,6 +1621,11 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
const [listenPref, setListenPref] = useState(true);
const [activeRadio, setActiveRadioId] = useState('');
const [radioBusy, setRadioBusy] = useState(false);
// "Other (custom address)" has to STAY chosen. The dropdown is derived from
// the address, so picking Other while the address still matched a listed rig
// put the list straight back on that rig — the operator saw it jump back to
// IC-7610 the moment they chose Other.
const [icomCustom, setIcomCustom] = useState(false);
const [catCfg, setCatCfg] = useState<CATSettings>({
enabled: false, backend: 'omnirig', omnirig_rig: 1, omnirig_vfo: '', flex_host: '', flex_port: 4992, flex_spots: false, flex_decode_spots: false, flex_decode_secs: 120, flex_dvk_dax: false,
yaesu_port: '', yaesu_baud: 38400, yaesu_low_lines: false, kenwood_low_lines: false, kenwood_port: '', kenwood_baud: 9600, kenwood_host: '', kenwood_link: 'usb', kenwood_data_mode: 'usb', xiegu_port: '', xiegu_baud: 19200, xiegu_addr: 0x70, xiegu_ptt_line: '',
@@ -2101,7 +2106,7 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
const [chaseSotaOn, setChaseSotaOn] = useState(() => localStorage.getItem('opslog.chaseSota') !== '0');
const [chaseNew, setChaseNew] = useState(false);
const [pskTgt, setPskTgt] = useState<any>({ enabled: false, scope: 'target' });
const [ac, setAc] = useState<any>({ enabled: false, only: '', attempts: 7, watched_attempts: 15, misses: 3, max_rounds: 3, rest_min: 2, on_screen_only: true });
const [ac, setAc] = useState<any>({ enabled: false, only: '', attempts: 7, watched_attempts: 15, misses: 3, max_rounds: 3, rest_periods: 1, on_screen_only: true });
// The named contest callsigns. Raw text in state, written on blur: it is a
// multi-line list, and normalising it on every keystroke would fight the
// Return key — the one key this box is built around.
@@ -3628,8 +3633,12 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
<div className="space-y-1">
<Label>{t('cat.icomModel')}</Label>
<Select
value={ICOM_MODELS.find((m) => m.addr === (catCfg.icom_addr ?? 0x98))?.name ?? '_custom'}
onValueChange={(v) => { const m = ICOM_MODELS.find((x) => x.name === v); if (m) setCatCfg((s) => ({ ...s, icom_addr: m.addr })); }}>
value={icomCustom ? '_custom' : (ICOM_MODELS.find((m) => m.addr === (catCfg.icom_addr ?? 0x98))?.name ?? '_custom')}
onValueChange={(v) => {
const m = ICOM_MODELS.find((x) => x.name === v);
setIcomCustom(!m);
if (m) setCatCfg((s) => ({ ...s, icom_addr: m.addr }));
}}>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectContent>
{ICOM_MODELS.map((m) => <SelectItem key={m.name} value={m.name}>{m.name}</SelectItem>)}
@@ -3655,8 +3664,12 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
<div className="space-y-1">
<Label>{t('cat.icomModel')}</Label>
<Select
value={ICOM_MODELS.find((m) => m.addr === (catCfg.icom_addr ?? 0x98))?.name ?? '_custom'}
onValueChange={(v) => { const m = ICOM_MODELS.find((x) => x.name === v); if (m) setCatCfg((s) => ({ ...s, icom_addr: m.addr })); }}>
value={icomCustom ? '_custom' : (ICOM_MODELS.find((m) => m.addr === (catCfg.icom_addr ?? 0x98))?.name ?? '_custom')}
onValueChange={(v) => {
const m = ICOM_MODELS.find((x) => x.name === v);
setIcomCustom(!m);
if (m) setCatCfg((s) => ({ ...s, icom_addr: m.addr }));
}}>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectContent>
{ICOM_MODELS.map((m) => <SelectItem key={m.name} value={m.name}>{m.name}</SelectItem>)}
@@ -5553,7 +5566,7 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
['watched_attempts', t('ac.watchedAttempts'), 1, 60],
['misses', t('ac.misses'), 1, 10],
['max_rounds', t('ac.rounds'), 1, 10],
['rest_min', t('ac.rest'), 1, 60],
['rest_periods', t('ac.rest'), 1, 20],
] as [string, string, number, number][]).map(([k, label, min, max]) => (
<span key={k} className="inline-flex items-center gap-1.5">
<span className="text-xs text-muted-foreground">{label}</span>
@@ -3,6 +3,7 @@ import { Plus, Trash2, Edit2, RefreshCcw, ArrowDownToLine, ArrowUpFromLine } fro
import {
ListUDPIntegrations, SaveUDPIntegration, DeleteUDPIntegration, ReloadUDPIntegrations,
GetWsjtHighlight, SetWsjtHighlight, GetWsjtHighlightWorked, SetWsjtHighlightWorked, GetWsjtFollowMode, SetWsjtFollowMode,
GetWsjtHighlightColours, SetWsjtHighlightColours,
} from '../../wailsjs/go/main/App';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -161,9 +162,13 @@ type Props = { onError: (msg: string) => void };
export function UDPIntegrationsPanel({ onError }: Props) {
const [highlightOn, setHighlightOn] = useState(false);
const [hlWorked, setHlWorked] = useState(false);
// The palette, as chosen. Background per verdict; the text colour is the
// backends business (see colourFor).
const [colours, setColours] = useState({ watchlist: '#F472B6', new_dxcc: '#16823C', new_band: '#E27A18', worked: '#4B5563' });
const [followMode, setFollowMode] = useState(true);
useEffect(() => {
GetWsjtHighlight().then((v) => setHighlightOn(!!v)).catch(() => {});
GetWsjtHighlightColours().then((c: any) => { if (c) setColours(c); }).catch(() => {});
GetWsjtHighlightWorked().then((v) => setHlWorked(!!v)).catch(() => {});
GetWsjtHighlightWorked().then((v) => setHlWorked(!!v)).catch(() => {});
GetWsjtFollowMode().then((v) => setFollowMode(!!v)).catch(() => {});
@@ -249,16 +254,52 @@ export function UDPIntegrationsPanel({ onError }: Props) {
<span className="block text-[11px] text-muted-foreground">{t('udpp.highlightHint')}</span>
</span>
</label>
{/* The palette, nested under the switch for the same reason as the box
below it. One colour per verdict, and the background only: the text
colour is worked out from it, so a chosen colour cannot come back
unreadable in the decoder's window. */}
{highlightOn && (
<div className="pl-6 max-w-2xl space-y-1.5">
<div className="text-[11px] text-muted-foreground">{t('udpp.hlColours')}</div>
<div className="flex flex-wrap gap-3">
{([
['watchlist', t('udpp.hlWatchlist')],
['new_dxcc', t('udpp.hlNewDxcc')],
['new_band', t('udpp.hlNewBand')],
['worked', t('udpp.hlWorkedC')],
] as const).map(([k, label]) => (
<label key={k} className="inline-flex items-center gap-1.5 text-xs">
<input
type="color"
value={(colours as any)[k] || '#000000'}
onChange={(e) => {
const next = { ...colours, [k]: e.target.value.toUpperCase() };
setColours(next);
void SetWsjtHighlightColours(next as any);
}}
className="h-6 w-8 rounded border border-border bg-background p-0.5 cursor-pointer"
/>
{label}
</label>
))}
<button type="button" className="text-xs text-muted-foreground underline hover:text-foreground"
onClick={() => {
const def = { watchlist: '#F472B6', new_dxcc: '#16823C', new_band: '#E27A18', worked: '#4B5563' };
setColours(def as any);
void SetWsjtHighlightColours(def as any);
}}>
{t('udpp.hlReset')}
</button>
</div>
</div>
)}
{/* Nested under the switch above: the same feature, and meaningless
while that one is off. */}
{highlightOn && (
<label className="flex items-start gap-2 text-sm cursor-pointer max-w-2xl pl-6">
<Checkbox checked={hlWorked}
onCheckedChange={(c) => { setHlWorked(!!c); void SetWsjtHighlightWorked(!!c); }} />
<span>
{t('udpp.hlWorked')}
<span className="block text-[11px] text-muted-foreground">{t('udpp.hlWorkedHint')}</span>
</span>
<span>{t('udpp.hlWorked')}</span>
</label>
)}
<label className="flex items-start gap-2 text-sm cursor-pointer max-w-2xl">
+20 -1
View File
@@ -9,7 +9,7 @@ import { cn } from '@/lib/utils';
// can't hold a typo'd value that isn't in the list.
export function Combobox({
value, onChange, options, placeholder, className, allowFreeText = false, commitOnType = false,
showToggle = false,
showToggle = false, onWheelStep,
}: {
value: string;
onChange: (v: string) => void;
@@ -21,6 +21,10 @@ export function Combobox({
// fields read live by other actions — e.g. RST, so a CW macro sent without
// leaving the field uses the value just typed.
commitOnType?: boolean;
// Wheel over the field steps the value. The control cannot know what a step
// means — a decibel here, an S-unit there — so it reports the direction and
// the owner decides.
onWheelStep?: (dir: 1 | -1) => void;
// Draw a chevron that opens the full list on click.
//
// Without it this control is indistinguishable from a plain text box: it opens
@@ -42,6 +46,21 @@ export function Combobox({
// leave the list floating over the wrong row.
const [menuPos, setMenuPos] = useState({ top: 0, left: 0, width: 0 });
// A NATIVE, non-passive listener: React attaches onWheel passively, where
// preventDefault does nothing at all and the panel scrolls away under the
// field being adjusted.
useEffect(() => {
const el = ref.current;
if (!el || !onWheelStep) return;
const onWheel = (e: WheelEvent) => {
if (e.deltaY === 0) return;
e.preventDefault();
onWheelStep(e.deltaY < 0 ? 1 : -1); // up is a better report
};
el.addEventListener('wheel', onWheel, { passive: false });
return () => el.removeEventListener('wheel', onWheel);
}, [onWheelStep]);
useEffect(() => {
function onDoc(e: MouseEvent) {
if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);
+6 -6
View File
@@ -193,8 +193,8 @@ const en: Dict = {
'ac.ladder': 'Order of priority: every callsign on the watch list first (among themselves: new entity, band, mode, slot), then new entity, new band, new mode, new slot. A real need comes before one that exists only because a QSL never came. A station calling YOU is answered whatever the log makes of it. A station in the middle of a QSO with somebody else is never called — it cannot answer.',
'ac.only': 'Chase only', 'ac.onlyPh': 'VP6D 3Y0J (space or comma)', 'ac.onlyHint': 'one or more callsigns — nothing else is called; empty means call whatever the log needs',
'ac.attempts': 'Calls before giving up', 'ac.watchedAttempts': 'if watched', 'ac.misses': 'Missed periods',
'ac.rounds': 'Series per station', 'ac.rest': 'Rest (min)', 'ac.trace': 'Log every decision', 'ac.traceHint': '— one line per period in the diagnostic log: what was on the air, why each station was refused, and what was decided. For working out why nothing is being called. A line every fifteen seconds, so leave it off otherwise.', 'ac.onScreen': 'Call only what the decodes list is showing', 'ac.onScreenHint': '— the filters above the list (CQ only, LoTW only, the new-category chips, continents, report, search) steer the transmitter too: a station filtered off the screen is not called. With the list closed nothing is filtered.',
'dec.chasePh': 'chase…', 'dec.chaseTip': 'Call ONLY these stations — one or more callsigns, spaces or commas. Empty means call whatever the log needs. Same field as Preferences → DXHunter.', 'dec.autoWaitTip': '{call} is wanted and is working somebody else — it is called the moment it is free.', 'dec.autoStoppedTip': 'Auto-call has given up on a station from the chase list — click to switch it off, or Halt to clear it.',
'ac.rounds': 'Series per station', 'ac.rest': 'Rest (overs)', 'ac.trace': 'Log every decision', 'ac.traceHint': '— one line per period in the diagnostic log: what was on the air, why each station was refused, and what was decided. For working out why nothing is being called. A line every fifteen seconds, so leave it off otherwise.', 'ac.onScreen': 'Call only what the decodes list is showing', 'ac.onScreenHint': '— the filters above the list (CQ only, LoTW only, the new-category chips, continents, report, search) steer the transmitter too: a station filtered off the screen is not called. With the list closed nothing is filtered.',
'dec.chasePh': 'chase…', 'dec.chaseTip': 'Call ONLY these stations — one or more callsigns, spaces or commas. Empty means call whatever the log needs. Same field as Preferences → DXHunter.', 'dec.autoCalls': 'calls', 'dec.autoMisses': 'missed', 'dec.autoWaiting': 'waiting', 'dec.autoTargetTip': 'Auto-call is calling {call} — calls made of the allowance, and periods of its own it was not decoded in.', 'dec.autoWaitTip': '{call} is wanted and is working somebody else — it is called the moment it is free.', 'dec.autoStoppedTip': 'Auto-call has given up on a station from the chase list — click to switch it off, or Halt to clear it.',
// Contest watchlist (Settings → DXHunter): how a special-event fleet joins the list on its own
'wlc.title': 'Contest', 'wlc.pattern': 'Auto-add on', 'wlc.patternPh': 'WWA', 'wlc.patternHint': 'any spotted callsign CONTAINING this joins the watchlist as a contest entry (TM29WWA, HB9WWA, F4WWA/P)',
'wlc.calls': 'And these callsigns, one per line', 'wlc.callsPh': 'R7W DL0ABC', 'wlc.callsHint': 'For the entries a pattern cannot catch: a station taking part under a callsign that says nothing about the event. Named here, it joins the contest watchlist the moment it is spotted. Commas and spaces work too.',
@@ -508,7 +508,7 @@ const en: Dict = {
'ncp.newNetPrompt': 'New NET name:', 'ncp.renamePrompt': 'Rename NET:', 'ncp.deleteConfirm': 'Delete NET "{name}" and its roster? This cannot be undone.', 'ncp.closeConfirm': "{n} station(s) still on the air will be dropped WITHOUT logging. Close anyway?", 'ncp.removeConfirm': "Remove {n} station(s) from this NET's roster?", 'ncp.colCallsign': 'Callsign', 'ncp.colName': 'Name', 'ncp.colTimeOn': 'Time on', 'ncp.colBand': 'Band', 'ncp.colMode': 'Mode', 'ncp.colComment': 'Comment', 'ncp.colCountry': 'Country', 'ncp.colDate': 'Date', 'ncp.workedBefore': 'Worked before', 'ncp.wbHint': 'Click a station (on air or roster) to see prior QSOs', 'ncp.wbNone': 'No prior QSO with', 'ncp.wbFirst': 'first', 'ncp.wbLast': 'last', 'ncp.wbResize': 'Drag to resize', 'ncp.newNet': 'New NET', 'ncp.closeToSwitch': 'Close the NET to switch', 'ncp.selectNetTitle': 'Select a NET', 'ncp.selectNetOption': '— select a NET —', 'ncp.closeNet': 'Close NET', 'ncp.openNet': 'Open NET', 'ncp.rename': 'Rename', 'ncp.delete': 'Delete', 'ncp.netOpenBadge': 'NET OPEN', 'ncp.onAir': 'On air:', 'ncp.roster': 'Roster:', 'ncp.onAirActive': 'On air — active QSOs', 'ncp.activeHint': 'mic-pass order · ⬆⬇ to reorder · double-click → edit · "Log & end" to save', 'ncp.moveUp': 'Move up the mic-pass order', 'ncp.moveDown': 'Move down the mic-pass order', 'ncp.logEndSelected': 'Log & end selected', 'ncp.logAll': 'Log everyone ({n})', 'ncp.logAllConfirm': 'Log all {n} on-air station(s) to the logbook?', 'ncp.netUsersRoster': 'NET users — roster', 'ncp.rosterHint': 'double-click → put on air', 'ncp.addContact': 'Add contact', 'ncp.remove': 'Remove', 'ncp.putOnAir': 'Put selected on air', 'ncp.addContactTitle': 'Add contact to NET', 'ncp.addContactDesc': "Saved in this NET's roster (reused next time you open it).", 'ncp.callsign': 'Callsign', 'ncp.search': 'Search', 'ncp.name': 'Name', 'ncp.country': 'Country', 'ncp.cancel': 'Cancel', 'ncp.saveInNet': 'Save in NET',
'udpp.relayInstead': 'For an antenna switch or a relay board, use Station Control → relays instead: it holds the state, reads the boards at startup and does not re-switch while you tune inside a band. A home-made switch is the “HTTP relay” type there.',
'udpp.svcCustomLabel': 'Custom message', 'udpp.svcCustomHint': 'You choose what fires it and what it says. A UDP datagram or an HTTP request — the latter is how most antenna switches are driven.', 'udpp.trigger': 'Fires on', 'udpp.trgBand': 'Band change (radio)', 'udpp.trgQso': 'QSO logged', 'udpp.trgRotator': 'Rotator command', 'udpp.trgLookup': 'Callsign lookup', 'udpp.transport': 'Sends as', 'udpp.transportUdp': 'UDP message', 'udpp.transportUrl': 'URL (HTTP GET)', 'udpp.url': 'URL', 'udpp.urlHint': 'Values are URL-encoded. Credentials may be included as http://user:pass@host/… — stored as typed, so keep it to your own network.', 'udpp.template': 'Message', 'udpp.lineEnd': 'Line end', 'udpp.lineEndNone': 'None', 'udpp.fieldsAvailable': 'Fields for this trigger', 'udpp.fieldsHint': 'Anything else renders empty.',
'udpp.svcWsjtLabel': 'WSJT-X / JTDX / MSHV', 'udpp.svcWsjtHint': 'Auto-logs FT8/FT4/etc. QSOs and fills the entry callsign live.', 'udpp.svcAdifLabel': 'ADIF message (JTAlert, GridTracker)', 'udpp.svcAdifHint': 'Receives a single ADIF record per packet and logs it.', 'udpp.svcN1mmLabel': 'N1MM Logger+ (contest XML)', 'udpp.svcN1mmHint': 'Receives contest QSOs as XML messages.', 'udpp.svcRemoteLabel': 'Remote callsign (DXHunter, custom)', 'udpp.svcRemoteHint': 'A short text packet containing just a callsign — fills the entry field.', 'udpp.svcWsjtRelayLabel': 'Relay the WSJT-X stream', 'udpp.svcWsjtRelayHint': 'Re-sends every datagram received from WSJT-X / JTDX / MSHV, byte for byte, to another program — JTAlert, GridTracker, a second logger. The sender only talks to one address, so this is what lets them run alongside OpsLog. Point it at the OTHER programs port, never at one of OpsLogs own.', 'udpp.svcWsjtLogLabel': 'WSJT-X logged QSO', 'udpp.svcWsjtLogHint': 'Announces each logged QSO on the WSJT-X UDP interface — both messages WSJT-X itself sends. For any logger that listens there rather than for plain-text ADIF (Logger32s additional UDP sockets, for one).', 'udpp.svcDbLabel': 'ADIF Message', 'udpp.svcDbHint': 'Sends the ADIF of every QSO you log to a remote listener (Cloudlog UDP, N1MM, …).', 'udpp.svcPstLabel': 'PstRotator frequency', 'udpp.svcPstHint': 'Sends the rig frequency as <PST><FREQUENCY> whenever it changes — set PstRotatorAz tracker to DXLog.net (default port 12040).', 'udpp.svcN1mmRadioLabel': 'N1MM RadioInfo (freq + mode)', 'udpp.svcN1mmRadioHint': 'Broadcasts the rig frequency/mode as N1MM Logger+ RadioInfo XML on every change — consumed by PstRotator (N1MM tracker) and many other tools.', 'udpp.deleteConfirm': 'Delete this UDP connection?', 'udpp.loading': 'Loading…', 'udpp.intro': 'Connections let OpsLog talk to other ham radio software. Inbound connections receive QSOs or callsigns and update the logbook live; outbound connections notify other apps when you log a QSO locally. Enable multicast to share a port with another listener without conflict — required for the typical WSJT-X 2237 setup.', 'udpp.highlight': 'Highlight decodes in WSJT-X / JTDX', 'udpp.hlWorked': 'Grey out stations already worked', 'udpp.hlWorkedHint': 'The same callsign already in your log on this band AND in this mode — a duplicate. Grey, not a colour: the other three say look at this, and this one says the opposite. Off by default, because on a well-filled log it can match most of a period.', 'udpp.highlightHint': 'Colours callsigns in the decoders own Band Activity window from your log: watchlist members pink, a new DXCC green, a new band for its entity orange. Applied live as decodes arrive.', 'udpp.followMode': 'Switch the decoder\u2019s mode from spots', 'udpp.followModeHint': 'Clicking an FT4 spot while WSJT-X / JTDX sits in FT8 switches its mode too (Configure message).', 'udpp.inboundTitle': 'Inbound — OpsLog listens', 'udpp.outboundTitle': 'Outbound — OpsLog sends', 'udpp.reloadAll': 'Reload all', 'udpp.reloadHint': 'Restarts every enabled listener after a manual change.', 'udpp.add': 'Add', 'udpp.noConnection': 'No connection.', 'udpp.unnamed': '(unnamed)', 'udpp.dialogTitle': '{action} {direction} connection', 'udpp.new': 'New', 'udpp.edit': 'Edit', 'udpp.directionInbound': 'inbound', 'udpp.directionOutbound': 'outbound', 'udpp.name': 'Name', 'udpp.namePhInbound': 'WSJT-X log', 'udpp.namePhOutbound': 'Cloudlog notify', 'udpp.serviceType': 'Service type', 'udpp.port': 'Port', 'udpp.multicast': 'Multicast', 'udpp.multicastGroup': 'Multicast group', 'udpp.multicastHint': 'Use the same group address as the sending app. WSJT-X default is 224.0.0.1.', 'udpp.destinationIp': 'Destination IP', 'udpp.enabled': 'Enabled', 'udpp.cancel': 'Cancel', 'udpp.save': 'Save',
'udpp.svcWsjtLabel': 'WSJT-X / JTDX / MSHV', 'udpp.svcWsjtHint': 'Auto-logs FT8/FT4/etc. QSOs and fills the entry callsign live.', 'udpp.svcAdifLabel': 'ADIF message (JTAlert, GridTracker)', 'udpp.svcAdifHint': 'Receives a single ADIF record per packet and logs it.', 'udpp.svcN1mmLabel': 'N1MM Logger+ (contest XML)', 'udpp.svcN1mmHint': 'Receives contest QSOs as XML messages.', 'udpp.svcRemoteLabel': 'Remote callsign (DXHunter, custom)', 'udpp.svcRemoteHint': 'A short text packet containing just a callsign — fills the entry field.', 'udpp.svcWsjtRelayLabel': 'Relay the WSJT-X stream', 'udpp.svcWsjtRelayHint': 'Re-sends every datagram received from WSJT-X / JTDX / MSHV, byte for byte, to another program — JTAlert, GridTracker, a second logger. The sender only talks to one address, so this is what lets them run alongside OpsLog. Point it at the OTHER programs port, never at one of OpsLogs own.', 'udpp.svcWsjtLogLabel': 'WSJT-X logged QSO', 'udpp.svcWsjtLogHint': 'Announces each logged QSO on the WSJT-X UDP interface — both messages WSJT-X itself sends. For any logger that listens there rather than for plain-text ADIF (Logger32s additional UDP sockets, for one).', 'udpp.svcDbLabel': 'ADIF Message', 'udpp.svcDbHint': 'Sends the ADIF of every QSO you log to a remote listener (Cloudlog UDP, N1MM, …).', 'udpp.svcPstLabel': 'PstRotator frequency', 'udpp.svcPstHint': 'Sends the rig frequency as <PST><FREQUENCY> whenever it changes — set PstRotatorAz tracker to DXLog.net (default port 12040).', 'udpp.svcN1mmRadioLabel': 'N1MM RadioInfo (freq + mode)', 'udpp.svcN1mmRadioHint': 'Broadcasts the rig frequency/mode as N1MM Logger+ RadioInfo XML on every change — consumed by PstRotator (N1MM tracker) and many other tools.', 'udpp.deleteConfirm': 'Delete this UDP connection?', 'udpp.loading': 'Loading…', 'udpp.intro': 'Connections let OpsLog talk to other ham radio software. Inbound connections receive QSOs or callsigns and update the logbook live; outbound connections notify other apps when you log a QSO locally. Enable multicast to share a port with another listener without conflict — required for the typical WSJT-X 2237 setup.', 'udpp.highlight': 'Highlight decodes in WSJT-X / JTDX', 'udpp.hlWorked': 'Mark stations already worked', 'udpp.hlColours': 'Colours — the background of each verdict; the text colour follows it.', 'udpp.hlWatchlist': 'Watch list', 'udpp.hlNewDxcc': 'New DXCC', 'udpp.hlNewBand': 'New band', 'udpp.hlWorkedC': 'Worked', 'udpp.hlReset': 'Reset to the defaults', 'udpp.highlightHint': 'Colours callsigns in the decoders own Band Activity window from your log — a watch-list member, a new DXCC, a new band for its entity. Applied live as decodes arrive.', 'udpp.followMode': 'Switch the decoder\u2019s mode from spots', 'udpp.followModeHint': 'Clicking an FT4 spot while WSJT-X / JTDX sits in FT8 switches its mode too (Configure message).', 'udpp.inboundTitle': 'Inbound — OpsLog listens', 'udpp.outboundTitle': 'Outbound — OpsLog sends', 'udpp.reloadAll': 'Reload all', 'udpp.reloadHint': 'Restarts every enabled listener after a manual change.', 'udpp.add': 'Add', 'udpp.noConnection': 'No connection.', 'udpp.unnamed': '(unnamed)', 'udpp.dialogTitle': '{action} {direction} connection', 'udpp.new': 'New', 'udpp.edit': 'Edit', 'udpp.directionInbound': 'inbound', 'udpp.directionOutbound': 'outbound', 'udpp.name': 'Name', 'udpp.namePhInbound': 'WSJT-X log', 'udpp.namePhOutbound': 'Cloudlog notify', 'udpp.serviceType': 'Service type', 'udpp.port': 'Port', 'udpp.multicast': 'Multicast', 'udpp.multicastGroup': 'Multicast group', 'udpp.multicastHint': 'Use the same group address as the sending app. WSJT-X default is 224.0.0.1.', 'udpp.destinationIp': 'Destination IP', 'udpp.enabled': 'Enabled', 'udpp.cancel': 'Cancel', 'udpp.save': 'Save',
'fltb.fCallsign': 'Callsign', 'fltb.fCreated': 'Added to the log on', 'fltb.fDate': 'Date / time (UTC)', 'fltb.fEndDate': 'End date / time', 'fltb.fBand': 'Band', 'fltb.fRxBand': 'RX band', 'fltb.fMode': 'Mode', 'fltb.fSubmode': 'Submode', 'fltb.fFreq': 'Frequency (Hz)', 'fltb.fRxFreq': 'RX frequency (Hz)', 'fltb.fRstSent': 'RST sent', 'fltb.fRstRcvd': 'RST rcvd', 'fltb.fName': 'Name', 'fltb.fQth': 'QTH', 'fltb.fAddress': 'Address', 'fltb.fEmail': 'E-mail', 'fltb.fGrid': 'Grid', 'fltb.fCountry': 'Country', 'fltb.fState': 'State', 'fltb.fCounty': 'County', 'fltb.fDxcc': 'DXCC #', 'fltb.fContinent': 'Continent', 'fltb.fCqz': 'CQ zone', 'fltb.fItuz': 'ITU zone', 'fltb.fIota': 'IOTA', 'fltb.fSota': 'SOTA ref', 'fltb.fPota': 'POTA ref', 'fltb.fWwff': 'WWFF ref', 'fltb.fRig': 'Rig', 'fltb.fAntenna': 'Antenna', 'fltb.fQslSent': 'Paper QSL sent status', 'fltb.fQslSentDate': 'Paper QSL sent date', 'fltb.fQslRcvd': 'Paper QSL received status', 'fltb.fQslRcvdDate': 'Paper QSL received date', 'fltb.fQslSentVia': 'QSL sent via', 'fltb.fQslRcvdVia': 'QSL rcvd via', 'fltb.fQslVia': 'QSL via', 'fltb.fLotwSent': 'LoTW sent status', 'fltb.fLotwSentDate': 'LoTW sent date', 'fltb.fLotwRcvd': 'LoTW received status', 'fltb.fLotwRcvdDate': 'LoTW received date', 'fltb.fEqslSent': 'eQSL sent status', 'fltb.fEqslSentDate': 'eQSL sent date', 'fltb.fEqslRcvd': 'eQSL received status', 'fltb.fEqslRcvdDate': 'eQSL received date', 'fltb.fQrzSent': 'QRZ.com sent status', 'fltb.fQrzSentDate': 'QRZ.com sent date', 'fltb.fQrzRcvd': 'QRZ.com received status', 'fltb.fQrzRcvdDate': 'QRZ.com received date', 'fltb.fClublogSent': 'Club Log sent status', 'fltb.fClublogSentDate': 'Club Log sent date', 'fltb.fClublogRcvd': 'Club Log match status', 'fltb.fClublogRcvdDate': 'Club Log match date', 'fltb.fHrdlogSent': 'HRDLog sent status', 'fltb.fHrdlogSentDate': 'HRDLog sent date', 'fltb.fHamqthSent': 'HamQTH sent status', 'fltb.fHamqthSentDate': 'HamQTH sent date', 'bulk.fHamqthSent': 'HamQTH sent status', 'bulk.fHamqthSentDate': 'HamQTH sent date', 'rqg.c.hamqth_sent': 'HamQTH sent', 'rqg.h.hamqth_sent': 'HamQTH sent', 'rqg.c.hamqth_sent_date': 'HamQTH sent date', 'rqg.h.hamqth_sent_date': 'HamQTH S date', 'fltb.fHamlogSent': 'HAMLOG.online sent', 'fltb.fHamlogSentDate': 'HAMLOG.online sent date', 'fltb.fHamlogRcvd': 'HAMLOG.online received', 'fltb.fHamlogRcvdDate': 'HAMLOG.online received date', 'fltb.fContestId': 'Contest ID', 'fltb.fSerialRcvd': 'Serial rcvd', 'fltb.fSerialSent': 'Serial sent', 'fltb.fPropMode': 'Propagation mode', 'fltb.fSatellite': 'Satellite', 'fltb.fMyCallsign': 'Station callsign (my call)', 'fltb.fOperator': 'Operator', 'fltb.fOwnerCallsign': 'Owner callsign', 'fltb.fMyGrid': 'My grid', 'fltb.fMyCountry': 'My country', 'fltb.fMyState': 'My state', 'fltb.fMyCounty': 'My county', 'fltb.fMyIota': 'My IOTA', 'fltb.fMySota': 'My SOTA ref', 'fltb.fMyPota': 'My POTA ref', 'fltb.fMyWwff': 'My WWFF ref', 'fltb.fMyStreet': 'My street', 'fltb.fMyCity': 'My city', 'fltb.fMyPostal': 'My postal code', 'fltb.fMyRig': 'My rig', 'fltb.fMyAntenna': 'My antenna', 'fltb.fTxPower': 'TX power (W)', 'fltb.fComment': 'Comment', 'fltb.fNotes': 'Notes', 'fltb.opEq': 'equals (=)', 'fltb.opNe': 'not equal (≠)', 'fltb.opContains': 'contains', 'fltb.opStartsWith': 'starts with', 'fltb.opEndsWith': 'ends with', 'fltb.opGt': 'greater than (>)', 'fltb.opLt': 'less than (<)', 'fltb.opGe': 'greater or equal (≥)', 'fltb.opLe': 'less or equal (≤)', 'fltb.opEmpty': 'is empty', 'fltb.opIn': 'is one of', 'fltb.opNotIn': 'is none of', 'fltb.listPh': '2m, 70cm — comma separated', 'fltb.opNotEmpty': 'is not empty', 'fltb.title': 'QSO filter', 'fltb.match': 'Match', 'fltb.all': 'ALL (AND)', 'fltb.any': 'ANY (OR)', 'fltb.loadPreset': 'Load preset…', 'fltb.noConditions': 'No conditions — the list shows all QSOs. Add one below.', 'fltb.where': 'WHERE', 'fltb.valuePh': 'value', 'fltb.remove': 'Remove', 'fltb.addCondition': 'Add condition', 'fltb.presetNamePh': 'Preset name…', 'fltb.presetSaved': 'Filter “{name}” saved', 'fltb.savePreset': 'Save preset', 'fltb.clear': 'Clear', 'fltb.cancel': 'Cancel', 'fltb.applyClose': 'Apply & close',
'detp.propAS': 'Aircraft Scatter', 'detp.propAUR': 'Aurora', 'detp.propAUE': 'Aurora-E', 'detp.propBS': 'Back Scatter', 'detp.propEME': 'Earth-Moon-Earth', 'detp.propES': 'Sporadic E', 'detp.propFAI': 'Field Aligned Irregularities', 'detp.propF2': 'F2 Reflection', 'detp.propGWAVE': 'Ground Wave', 'detp.propINTERNET': 'Internet-assisted', 'detp.propION': 'Ionoscatter', 'detp.propLOS': 'Line of Sight', 'detp.propMS': 'Meteor Scatter', 'detp.propRPT': 'Terrestrial / atmospheric repeater', 'detp.propRS': 'Rain Scatter', 'detp.propSAT': 'Satellite', 'detp.propTEP': 'Trans-Equatorial', 'detp.propTR': 'Tropospheric Ducting', 'detp.pathShort': 'Short Path', 'detp.pathLong': 'Long Path', 'detp.pathGrayline': 'Grayline', 'detp.pathOther': 'Other', 'detp.tabStats': 'Stats', 'detp.tabInfo': 'Info', 'detp.tabAwards': 'Awards', 'detp.tabMy': 'My', 'detp.tabExtended': 'Extended', 'detp.statePref': 'State / pref', 'detp.county': 'County', 'detp.newCounty': 'NEW', 'detp.newCountyTip': 'County never worked before', 'detp.prefix': 'Prefix', 'detp.cqZone': 'CQ', 'detp.ituZone': 'ITU', 'detp.dxcc': 'DXCC #', 'detp.azimuthLp': 'Azimuth LP', 'detp.distanceSp': 'Distance SP', 'detp.distanceLp': 'Distance LP', 'detp.address': 'Address', 'detp.qslMessage': 'QSL message', 'detp.qslVia': 'QSL via (manager)', 'detp.detected': 'Detected — this contact will count for:', 'detp.ambiguous': 'Ambiguous — pick one:', 'detp.azimuth': 'Azimuth (°)', 'detp.elevation': 'Elevation (°)', 'detp.txPower': 'TX power (W)', 'detp.satelliteMode': 'Satellite mode', 'detp.antPath': 'Ant. path', 'detp.propagation': 'Propagation', 'detp.rig': 'Rig', 'detp.antenna': 'Antenna', 'detp.satName': 'Satellite name', 'detp.contestId': 'Contest ID', 'detp.rcvdExchangePh': 'rcvd exchange', 'detp.sentExchangePh': 'sent exchange', 'detp.contactedEmail': 'Contacted email', 'detp.contactedWeb': 'Website',
// Awards (ref picker / ref selector / awards panel / award editor)
@@ -750,8 +750,8 @@ const fr: Dict = {
'ac.ladder': "Ordre de priorité : d'abord tout indicatif de la liste de surveillance (entre eux : nouvelle entité, bande, mode, slot), puis nouvelle entité, nouvelle bande, nouveau mode, nouveau slot. Un vrai besoin passe devant un besoin qui n'existe que faute de QSL. Une station qui VOUS appelle est toujours prise, quoi qu'en dise le log. Une station en plein QSO avec quelqu'un d'autre n'est jamais appelée — elle ne peut pas répondre.",
'ac.only': 'Chasser uniquement', 'ac.onlyPh': 'VP6D 3Y0J (espace ou virgule)', 'ac.onlyHint': 'un ou plusieurs indicatifs — rien dautre nest appelé ; vide = appeler ce dont le log a besoin',
'ac.attempts': 'Appels avant abandon', 'ac.watchedAttempts': 'si surveillé', 'ac.misses': 'Périodes manquées',
'ac.rounds': 'Séries par station', 'ac.rest': 'Repos (min)', 'ac.trace': 'Journaliser chaque décision', 'ac.traceHint': '— une ligne par période dans le journal de diagnostic : ce quil y avait sur lair, pourquoi chaque station a été écartée, et ce qui a été décidé. Pour comprendre pourquoi rien nest appelé. Une ligne toutes les quinze secondes : à laisser éteint le reste du temps.', 'ac.onScreen': 'Nappeler que ce quaffiche la liste des décodages', 'ac.onScreenHint': '— les filtres au-dessus de la liste (CQ seuls, LoTW, les pastilles de catégorie, continents, report, recherche) pilotent aussi l’émetteur : une station filtrée hors écran nest pas appelée. La liste fermée, rien nest filtré.',
'dec.chasePh': 'chasser…', 'dec.chaseTip': "N'appeler QUE ces stations — un ou plusieurs indicatifs, espaces ou virgules. Vide = appeler ce dont le log a besoin. Même champ que Réglages → DXHunter.", 'dec.autoWaitTip': '{call} est voulue et travaille quelquun dautre — elle sera appelée dès quelle sera libre.', 'dec.autoStoppedTip': "L'appel automatique a renoncé à une station de la liste de chasse — cliquez pour l'éteindre, ou Stop pour effacer.",
'ac.rounds': 'Séries par station', 'ac.rest': 'Repos (tours)', 'ac.trace': 'Journaliser chaque décision', 'ac.traceHint': '— une ligne par période dans le journal de diagnostic : ce quil y avait sur lair, pourquoi chaque station a été écartée, et ce qui a été décidé. Pour comprendre pourquoi rien nest appelé. Une ligne toutes les quinze secondes : à laisser éteint le reste du temps.', 'ac.onScreen': 'Nappeler que ce quaffiche la liste des décodages', 'ac.onScreenHint': '— les filtres au-dessus de la liste (CQ seuls, LoTW, les pastilles de catégorie, continents, report, recherche) pilotent aussi l’émetteur : une station filtrée hors écran nest pas appelée. La liste fermée, rien nest filtré.',
'dec.chasePh': 'chasser…', 'dec.chaseTip': "N'appeler QUE ces stations — un ou plusieurs indicatifs, espaces ou virgules. Vide = appeler ce dont le log a besoin. Même champ que Réglages → DXHunter.", 'dec.autoCalls': 'appels', 'dec.autoMisses': 'ratés', 'dec.autoWaiting': 'en attente', 'dec.autoTargetTip': 'Lauto-call appelle {call} — appels effectués sur lallocation, et périodes à lui où il na pas été décodé.', 'dec.autoWaitTip': '{call} est voulue et travaille quelquun dautre — elle sera appelée dès quelle sera libre.', 'dec.autoStoppedTip': "L'appel automatique a renoncé à une station de la liste de chasse — cliquez pour l'éteindre, ou Stop pour effacer.",
// Watchlist contest (Réglages → DXHunter) : comment une flotte d’événement rejoint la liste toute seule
'wlc.title': 'Contest', 'wlc.pattern': 'Ajout auto sur', 'wlc.patternPh': 'WWA', 'wlc.patternHint': 'tout indicatif spotté CONTENANT ceci rejoint la watchlist comme entrée contest (TM29WWA, HB9WWA, F4WWA/P)',
'wlc.calls': 'Et ces indicatifs, un par ligne', 'wlc.callsPh': 'R7W DL0ABC', 'wlc.callsHint': 'Pour les participants quaucun motif ne peut attraper : une station engagée sous un indicatif qui ne dit rien de l’événement. Nommée ici, elle rejoint la watchlist contest dès quelle est spottée. Les virgules et les espaces marchent aussi.',
@@ -1050,7 +1050,7 @@ const fr: Dict = {
'ncp.newNetPrompt': 'Nom du nouveau NET :', 'ncp.renamePrompt': 'Renommer le NET :', 'ncp.deleteConfirm': 'Supprimer le NET « {name} » et son répertoire ? Cette action est irréversible.', 'ncp.closeConfirm': "{n} station(s) encore en l'air seront retirées SANS être enregistrées. Fermer quand même ?", 'ncp.removeConfirm': 'Retirer {n} station(s) du répertoire de ce NET ?', 'ncp.colCallsign': 'Indicatif', 'ncp.colName': 'Nom', 'ncp.colTimeOn': 'Heure début', 'ncp.colBand': 'Bande', 'ncp.colMode': 'Mode', 'ncp.colComment': 'Commentaire', 'ncp.colCountry': 'Pays', 'ncp.colDate': 'Date', 'ncp.workedBefore': 'Déjà contacté', 'ncp.wbHint': 'Cliquer une station (on air ou roster) pour voir les QSO précédents', 'ncp.wbNone': 'Aucun QSO précédent avec', 'ncp.wbFirst': 'premier', 'ncp.wbLast': 'dernier', 'ncp.wbResize': 'Glisser pour redimensionner', 'ncp.newNet': 'Nouveau NET', 'ncp.closeToSwitch': 'Ferme le NET pour changer', 'ncp.selectNetTitle': 'Sélectionne un NET', 'ncp.selectNetOption': '— sélectionner un NET —', 'ncp.closeNet': 'Fermer le NET', 'ncp.openNet': 'Ouvrir le NET', 'ncp.rename': 'Renommer', 'ncp.delete': 'Supprimer', 'ncp.netOpenBadge': 'NET OUVERT', 'ncp.onAir': "En l'air :", 'ncp.roster': 'Répertoire :', 'ncp.onAirActive': "En l'air — QSO actifs", 'ncp.activeHint': 'ordre de passage du micro · ⬆⬇ pour réordonner · double-clic → éditer · « Logger & terminer »', 'ncp.moveUp': "Monter dans l'ordre de passage", 'ncp.moveDown': "Descendre dans l'ordre de passage", 'ncp.logEndSelected': 'Logger & terminer la sélection', 'ncp.logAll': 'Logger tout le monde ({n})', 'ncp.logAllConfirm': 'Logger les {n} station(s) on air dans le logbook ?', 'ncp.netUsersRoster': 'Membres du NET — répertoire', 'ncp.rosterHint': "double-clic → mettre en l'air", 'ncp.addContact': 'Ajouter un contact', 'ncp.remove': 'Retirer', 'ncp.putOnAir': "Mettre la sélection en l'air", 'ncp.addContactTitle': 'Ajouter un contact au NET', 'ncp.addContactDesc': 'Enregistré dans le répertoire de ce NET (réutilisé à la prochaine ouverture).', 'ncp.callsign': 'Indicatif', 'ncp.search': 'Rechercher', 'ncp.name': 'Nom', 'ncp.country': 'Pays', 'ncp.cancel': 'Annuler', 'ncp.saveInNet': 'Enregistrer dans le NET',
'udpp.relayInstead': 'Pour un commutateur dantennes ou une carte de relais, préférez Station Control → relais : il tient l’état, relit les cartes au démarrage et ne recommute pas quand vous bougez dans la même bande. Un commutateur fait main sy déclare en type « Relais HTTP ».',
'udpp.svcCustomLabel': 'Message personnalisé', 'udpp.svcCustomHint': 'Vous choisissez ce qui le déclenche et ce quil dit. Datagramme UDP ou requête HTTP — cette dernière est la façon dont se pilotent la plupart des commutateurs dantennes.', 'udpp.trigger': 'Déclencheur', 'udpp.trgBand': 'Changement de bande (radio)', 'udpp.trgQso': 'QSO enregistré', 'udpp.trgRotator': 'Commande de rotor', 'udpp.trgLookup': 'Recherche dindicatif', 'udpp.transport': 'Envoi', 'udpp.transportUdp': 'Message UDP', 'udpp.transportUrl': 'URL (HTTP GET)', 'udpp.url': 'URL', 'udpp.urlHint': 'Les valeurs sont encodées pour lURL. Les identifiants peuvent s’écrire http://user:pass@hôte/… — stockés tels quels, à réserver à votre réseau local.', 'udpp.template': 'Message', 'udpp.lineEnd': 'Fin de ligne', 'udpp.lineEndNone': 'Aucune', 'udpp.fieldsAvailable': 'Champs de ce déclencheur', 'udpp.fieldsHint': 'Tout autre champ rendra du vide.',
'udpp.svcWsjtLabel': 'WSJT-X / JTDX / MSHV', 'udpp.svcWsjtHint': "Logue automatiquement les QSO FT8/FT4/etc. et remplit l'indicatif de saisie en direct.", 'udpp.svcAdifLabel': 'Message ADIF (JTAlert, GridTracker)', 'udpp.svcAdifHint': 'Reçoit un seul enregistrement ADIF par paquet et le logue.', 'udpp.svcN1mmLabel': 'N1MM Logger+ (XML contest)', 'udpp.svcN1mmHint': 'Reçoit les QSO de contest sous forme de messages XML.', 'udpp.svcRemoteLabel': 'Indicatif distant (DXHunter, personnalisé)', 'udpp.svcRemoteHint': 'Un court paquet texte contenant juste un indicatif — remplit le champ de saisie.', 'udpp.svcWsjtRelayLabel': 'Relayer le flux WSJT-X', 'udpp.svcWsjtRelayHint': 'Réémet chaque datagramme reçu de WSJT-X / JTDX / MSHV, octet pour octet, vers un autre logiciel — JTAlert, GridTracker, un second carnet. L’émetteur ne parle qu’à une seule adresse : cest ce qui permet de les faire tourner à côté dOpsLog. À pointer sur le port de lAUTRE logiciel, jamais sur un port d’écoute dOpsLog.', 'udpp.svcWsjtLogLabel': 'QSO enregistré WSJT-X', 'udpp.svcWsjtLogHint': 'Annonce chaque QSO enregistré sur linterface UDP WSJT-X — les deux messages que WSJT-X émet lui-même. Pour tout logger qui écoute là plutôt que lADIF en texte brut (les sockets UDP supplémentaires de Logger32, par exemple).', 'udpp.svcDbLabel': "ADIF Message", 'udpp.svcDbHint': "Envoie l'ADIF de chaque QSO enregistré vers un écouteur distant (Cloudlog UDP, N1MM…).", 'udpp.svcPstLabel': 'Fréquence PstRotator', 'udpp.svcPstHint': "Envoie la fréquence du poste en <PST><FREQUENCY> à chaque changement — règle le tracker de PstRotatorAz sur DXLog.net (port 12040 par défaut).", 'udpp.svcN1mmRadioLabel': 'N1MM RadioInfo (fréq + mode)', 'udpp.svcN1mmRadioHint': "Diffuse la fréquence/mode du poste en XML RadioInfo N1MM Logger+ à chaque changement — lu par PstRotator (tracker N1MM) et beaucoup d'autres outils.", 'udpp.deleteConfirm': 'Supprimer cette connexion UDP ?', 'udpp.loading': 'Chargement…', 'udpp.intro': "Les connexions permettent à OpsLog de dialoguer avec d'autres logiciels radioamateurs. Les connexions entrantes reçoivent des QSO ou des indicatifs et mettent le journal à jour en direct ; les connexions sortantes notifient d'autres apps quand tu enregistres un QSO localement. Active le multicast pour partager un port avec un autre écouteur sans conflit — nécessaire pour la config WSJT-X 2237 classique.", 'udpp.highlight': 'Surligner les décodages dans WSJT-X / JTDX', 'udpp.hlWorked': 'Griser les stations déjà travaillées', 'udpp.hlWorkedHint': 'Le même indicatif déjà au log sur cette bande ET dans ce mode — un doublon. En gris, pas en couleur : les trois autres disent « regarde », celle-ci dit linverse. Désactivé par défaut, car sur un log bien rempli elle peut concerner la majorité dune période.', 'udpp.highlightHint': 'Colore les indicatifs dans la fenêtre Band Activity du décodeur selon votre log : watchlist en rose, nouveau DXCC en vert, nouvelle bande pour son entité en orange. Appliqué en direct à larrivée des décodages.', 'udpp.followMode': 'Changer le mode du décodeur depuis les spots', 'udpp.followModeHint': 'Cliquer un spot FT4 pendant que WSJT-X / JTDX est en FT8 change aussi son mode.', 'udpp.inboundTitle': 'Entrant — OpsLog écoute', 'udpp.outboundTitle': 'Sortant — OpsLog envoie', 'udpp.reloadAll': 'Tout recharger', 'udpp.reloadHint': 'Redémarre chaque écouteur activé après une modification manuelle.', 'udpp.add': 'Ajouter', 'udpp.noConnection': 'Aucune connexion.', 'udpp.unnamed': '(sans nom)', 'udpp.dialogTitle': '{action} connexion {direction}', 'udpp.new': 'Nouvelle', 'udpp.edit': 'Modifier', 'udpp.directionInbound': 'entrante', 'udpp.directionOutbound': 'sortante', 'udpp.name': 'Nom', 'udpp.namePhInbound': 'Log WSJT-X', 'udpp.namePhOutbound': 'Notification Cloudlog', 'udpp.serviceType': 'Type de service', 'udpp.port': 'Port', 'udpp.multicast': 'Multicast', 'udpp.multicastGroup': 'Groupe multicast', 'udpp.multicastHint': "Utilise la même adresse de groupe que l'app émettrice. Le défaut WSJT-X est 224.0.0.1.", 'udpp.destinationIp': 'IP de destination', 'udpp.enabled': 'Activé', 'udpp.cancel': 'Annuler', 'udpp.save': 'Enregistrer',
'udpp.svcWsjtLabel': 'WSJT-X / JTDX / MSHV', 'udpp.svcWsjtHint': "Logue automatiquement les QSO FT8/FT4/etc. et remplit l'indicatif de saisie en direct.", 'udpp.svcAdifLabel': 'Message ADIF (JTAlert, GridTracker)', 'udpp.svcAdifHint': 'Reçoit un seul enregistrement ADIF par paquet et le logue.', 'udpp.svcN1mmLabel': 'N1MM Logger+ (XML contest)', 'udpp.svcN1mmHint': 'Reçoit les QSO de contest sous forme de messages XML.', 'udpp.svcRemoteLabel': 'Indicatif distant (DXHunter, personnalisé)', 'udpp.svcRemoteHint': 'Un court paquet texte contenant juste un indicatif — remplit le champ de saisie.', 'udpp.svcWsjtRelayLabel': 'Relayer le flux WSJT-X', 'udpp.svcWsjtRelayHint': 'Réémet chaque datagramme reçu de WSJT-X / JTDX / MSHV, octet pour octet, vers un autre logiciel — JTAlert, GridTracker, un second carnet. L’émetteur ne parle qu’à une seule adresse : cest ce qui permet de les faire tourner à côté dOpsLog. À pointer sur le port de lAUTRE logiciel, jamais sur un port d’écoute dOpsLog.', 'udpp.svcWsjtLogLabel': 'QSO enregistré WSJT-X', 'udpp.svcWsjtLogHint': 'Annonce chaque QSO enregistré sur linterface UDP WSJT-X — les deux messages que WSJT-X émet lui-même. Pour tout logger qui écoute là plutôt que lADIF en texte brut (les sockets UDP supplémentaires de Logger32, par exemple).', 'udpp.svcDbLabel': "ADIF Message", 'udpp.svcDbHint': "Envoie l'ADIF de chaque QSO enregistré vers un écouteur distant (Cloudlog UDP, N1MM…).", 'udpp.svcPstLabel': 'Fréquence PstRotator', 'udpp.svcPstHint': "Envoie la fréquence du poste en <PST><FREQUENCY> à chaque changement — règle le tracker de PstRotatorAz sur DXLog.net (port 12040 par défaut).", 'udpp.svcN1mmRadioLabel': 'N1MM RadioInfo (fréq + mode)', 'udpp.svcN1mmRadioHint': "Diffuse la fréquence/mode du poste en XML RadioInfo N1MM Logger+ à chaque changement — lu par PstRotator (tracker N1MM) et beaucoup d'autres outils.", 'udpp.deleteConfirm': 'Supprimer cette connexion UDP ?', 'udpp.loading': 'Chargement…', 'udpp.intro': "Les connexions permettent à OpsLog de dialoguer avec d'autres logiciels radioamateurs. Les connexions entrantes reçoivent des QSO ou des indicatifs et mettent le journal à jour en direct ; les connexions sortantes notifient d'autres apps quand tu enregistres un QSO localement. Active le multicast pour partager un port avec un autre écouteur sans conflit — nécessaire pour la config WSJT-X 2237 classique.", 'udpp.highlight': 'Surligner les décodages dans WSJT-X / JTDX', 'udpp.hlWorked': 'Marquer les stations déjà contactées', 'udpp.hlColours': 'Couleurs — le fond de chaque verdict ; la couleur du texte en coule.', 'udpp.hlWatchlist': 'Watchlist', 'udpp.hlNewDxcc': 'Nouveau DXCC', 'udpp.hlNewBand': 'Nouvelle bande', 'udpp.hlWorkedC': 'Contactée', 'udpp.hlReset': 'Rétablir les couleurs dorigine', 'udpp.highlightHint': 'Colore les indicatifs dans la fenêtre Band Activity du décodeur selon votre log — station de la watchlist, nouveau DXCC, nouvelle bande pour son entité. Appliqué en direct à larrivée des décodages.', 'udpp.followMode': 'Changer le mode du décodeur depuis les spots', 'udpp.followModeHint': 'Cliquer un spot FT4 pendant que WSJT-X / JTDX est en FT8 change aussi son mode.', 'udpp.inboundTitle': 'Entrant — OpsLog écoute', 'udpp.outboundTitle': 'Sortant — OpsLog envoie', 'udpp.reloadAll': 'Tout recharger', 'udpp.reloadHint': 'Redémarre chaque écouteur activé après une modification manuelle.', 'udpp.add': 'Ajouter', 'udpp.noConnection': 'Aucune connexion.', 'udpp.unnamed': '(sans nom)', 'udpp.dialogTitle': '{action} connexion {direction}', 'udpp.new': 'Nouvelle', 'udpp.edit': 'Modifier', 'udpp.directionInbound': 'entrante', 'udpp.directionOutbound': 'sortante', 'udpp.name': 'Nom', 'udpp.namePhInbound': 'Log WSJT-X', 'udpp.namePhOutbound': 'Notification Cloudlog', 'udpp.serviceType': 'Type de service', 'udpp.port': 'Port', 'udpp.multicast': 'Multicast', 'udpp.multicastGroup': 'Groupe multicast', 'udpp.multicastHint': "Utilise la même adresse de groupe que l'app émettrice. Le défaut WSJT-X est 224.0.0.1.", 'udpp.destinationIp': 'IP de destination', 'udpp.enabled': 'Activé', 'udpp.cancel': 'Annuler', 'udpp.save': 'Enregistrer',
'fltb.fCallsign': 'Callsign', 'fltb.fCreated': 'Ajouté au journal le', 'fltb.fDate': 'Date / time (UTC)', 'fltb.fEndDate': 'End date / time', 'fltb.fBand': 'Band', 'fltb.fRxBand': 'RX band', 'fltb.fMode': 'Mode', 'fltb.fSubmode': 'Submode', 'fltb.fFreq': 'Frequency (Hz)', 'fltb.fRxFreq': 'RX frequency (Hz)', 'fltb.fRstSent': 'RST sent', 'fltb.fRstRcvd': 'RST rcvd', 'fltb.fName': 'Name', 'fltb.fQth': 'QTH', 'fltb.fAddress': 'Address', 'fltb.fEmail': 'E-mail', 'fltb.fGrid': 'Grid', 'fltb.fCountry': 'Country', 'fltb.fState': 'State', 'fltb.fCounty': 'County', 'fltb.fDxcc': 'DXCC #', 'fltb.fContinent': 'Continent', 'fltb.fCqz': 'CQ zone', 'fltb.fItuz': 'ITU zone', 'fltb.fIota': 'IOTA', 'fltb.fSota': 'SOTA ref', 'fltb.fPota': 'POTA ref', 'fltb.fWwff': 'WWFF ref', 'fltb.fRig': 'Rig', 'fltb.fAntenna': 'Antenna', 'fltb.fQslSent': 'Paper QSL sent status', 'fltb.fQslSentDate': 'Paper QSL sent date', 'fltb.fQslRcvd': 'Paper QSL received status', 'fltb.fQslRcvdDate': 'Paper QSL received date', 'fltb.fQslSentVia': 'QSL envoyée via', 'fltb.fQslRcvdVia': 'QSL reçue via', 'fltb.fQslVia': 'QSL via', 'fltb.fLotwSent': 'LoTW sent status', 'fltb.fLotwSentDate': 'LoTW sent date', 'fltb.fLotwRcvd': 'LoTW received status', 'fltb.fLotwRcvdDate': 'LoTW received date', 'fltb.fEqslSent': 'eQSL sent status', 'fltb.fEqslSentDate': 'eQSL sent date', 'fltb.fEqslRcvd': 'eQSL received status', 'fltb.fEqslRcvdDate': 'eQSL received date', 'fltb.fQrzSent': 'QRZ.com sent status', 'fltb.fQrzSentDate': 'QRZ.com sent date', 'fltb.fQrzRcvd': 'QRZ.com received status', 'fltb.fQrzRcvdDate': 'QRZ.com received date', 'fltb.fClublogSent': 'Club Log sent status', 'fltb.fClublogSentDate': 'Club Log sent date', 'fltb.fClublogRcvd': 'Statut match Club Log', 'fltb.fClublogRcvdDate': 'Date match Club Log', 'fltb.fHrdlogSent': 'HRDLog sent status', 'fltb.fHrdlogSentDate': 'HRDLog sent date', 'fltb.fHamqthSent': 'Statut envoi HamQTH', 'fltb.fHamqthSentDate': 'Date denvoi HamQTH', 'bulk.fHamqthSent': 'Statut envoi HamQTH', 'bulk.fHamqthSentDate': 'Date denvoi HamQTH', 'rqg.c.hamqth_sent': 'HamQTH env', 'rqg.h.hamqth_sent': 'HamQTH env.', 'rqg.c.hamqth_sent_date': 'Date env HamQTH', 'rqg.h.hamqth_sent_date': 'HamQTH env.', 'fltb.fHamlogSent': 'HAMLOG.online envoyé', 'fltb.fHamlogSentDate': "HAMLOG.online date d'envoi", 'fltb.fHamlogRcvd': 'HAMLOG.online reçu', 'fltb.fHamlogRcvdDate': 'HAMLOG.online date de réception', 'fltb.fContestId': 'Contest ID', 'fltb.fSerialRcvd': 'Serial rcvd', 'fltb.fSerialSent': 'Serial sent', 'fltb.fPropMode': 'Propagation mode', 'fltb.fSatellite': 'Satellite', 'fltb.fMyCallsign': 'Station callsign (my call)', 'fltb.fOperator': 'Operator', 'fltb.fOwnerCallsign': 'Owner callsign', 'fltb.fMyGrid': 'My grid', 'fltb.fMyCountry': 'My country', 'fltb.fMyState': 'My state', 'fltb.fMyCounty': 'My county', 'fltb.fMyIota': 'My IOTA', 'fltb.fMySota': 'My SOTA ref', 'fltb.fMyPota': 'My POTA ref', 'fltb.fMyWwff': 'My WWFF ref', 'fltb.fMyStreet': 'My street', 'fltb.fMyCity': 'My city', 'fltb.fMyPostal': 'My postal code', 'fltb.fMyRig': 'My rig', 'fltb.fMyAntenna': 'My antenna', 'fltb.fTxPower': 'TX power (W)', 'fltb.fComment': 'Comment', 'fltb.fNotes': 'Notes', 'fltb.opEq': 'égal (=)', 'fltb.opNe': 'différent (≠)', 'fltb.opContains': 'contient', 'fltb.opStartsWith': 'commence par', 'fltb.opEndsWith': 'finit par', 'fltb.opGt': 'supérieur à (>)', 'fltb.opLt': 'inférieur à (<)', 'fltb.opGe': 'supérieur ou égal (≥)', 'fltb.opLe': 'inférieur ou égal (≤)', 'fltb.opEmpty': 'est vide', 'fltb.opIn': 'est parmi', 'fltb.opNotIn': 'n est pas parmi', 'fltb.listPh': '2m, 70cm — séparés par des virgules', 'fltb.opNotEmpty': "n'est pas vide", 'fltb.title': 'Filtre QSO', 'fltb.match': 'Correspondance', 'fltb.all': 'TOUS (ET)', 'fltb.any': 'AU MOINS UN (OU)', 'fltb.loadPreset': 'Charger un préréglage…', 'fltb.noConditions': 'Aucune condition — la liste affiche tous les QSO. Ajoutes-en une ci-dessous.', 'fltb.where': 'OÙ', 'fltb.valuePh': 'valeur', 'fltb.remove': 'Retirer', 'fltb.addCondition': 'Ajouter une condition', 'fltb.presetNamePh': 'Nom du préréglage…', 'fltb.presetSaved': 'Filtre « {name} » enregistré', 'fltb.savePreset': 'Enregistrer le préréglage', 'fltb.clear': 'Effacer', 'fltb.cancel': 'Annuler', 'fltb.applyClose': 'Appliquer & fermer',
'detp.propAS': 'Diffusion par avion', 'detp.propAUR': 'Aurore', 'detp.propAUE': 'Aurore-E', 'detp.propBS': 'Rétrodiffusion', 'detp.propEME': 'Terre-Lune-Terre', 'detp.propES': 'Sporadique E', 'detp.propFAI': 'Irrégularités alignées au champ', 'detp.propF2': 'Réflexion F2', 'detp.propGWAVE': 'Onde de sol', 'detp.propINTERNET': 'Assisté par Internet', 'detp.propION': 'Diffusion ionosphérique', 'detp.propLOS': 'Vue directe', 'detp.propMS': 'Diffusion météoritique', 'detp.propRPT': 'Répéteur terrestre / atmosphérique', 'detp.propRS': 'Diffusion par la pluie', 'detp.propSAT': 'Satellite', 'detp.propTEP': 'Trans-équatorial', 'detp.propTR': 'Conduit troposphérique', 'detp.pathShort': 'Chemin court', 'detp.pathLong': 'Chemin long', 'detp.pathGrayline': 'Ligne grise', 'detp.pathOther': 'Autre', 'detp.tabStats': 'Stats', 'detp.tabInfo': 'Info', 'detp.tabAwards': 'Diplômes', 'detp.tabMy': 'Moi', 'detp.tabExtended': 'Étendu', 'detp.statePref': 'État / préf', 'detp.county': 'Comté', 'detp.newCounty': 'NOUV', 'detp.newCountyTip': 'Comté jamais contacté', 'detp.prefix': 'Préfixe', 'detp.cqZone': 'CQ', 'detp.ituZone': 'ITU', 'detp.dxcc': 'DXCC #', 'detp.azimuthLp': 'Azimut LP', 'detp.distanceSp': 'Distance SP', 'detp.distanceLp': 'Distance LP', 'detp.address': 'Adresse', 'detp.qslMessage': 'Message QSL', 'detp.qslVia': 'QSL via (manager)', 'detp.detected': 'Détecté — ce contact comptera pour :', 'detp.ambiguous': 'Ambigu — choisissez :', 'detp.azimuth': 'Azimut (°)', 'detp.elevation': 'Élévation (°)', 'detp.txPower': 'Puissance TX (W)', 'detp.satelliteMode': 'Mode satellite', 'detp.antPath': 'Chemin ant.', 'detp.propagation': 'Propagation', 'detp.rig': 'Station', 'detp.antenna': 'Antenne', 'detp.satName': 'Nom du satellite', 'detp.contestId': 'ID contest', 'detp.rcvdExchangePh': 'échange reçu', 'detp.sentExchangePh': 'échange envoyé', 'detp.contactedEmail': 'E-mail du contact', 'detp.contactedWeb': 'Site web',
'awrp.remove': 'Retirer', 'awrp.searchLabel': 'Rechercher {label}…', 'awrp.searching': 'Recherche…', 'awrp.noMatch': 'Aucune correspondance.', 'awrp.noMatchDxcc': 'Aucune correspondance pour ce DXCC.',
+31
View File
@@ -0,0 +1,31 @@
// Remembered map views — where each map was left, per map.
//
// Panning and zooming a map is an operator saying "this is the part of the world
// I work". Throwing that away on every tab switch made the maps something to
// set up again each time rather than something to glance at, and the world map
// was the only one that remembered anything.
//
// One key per map, and portable (see lib/uiPref) like the world map's own: a
// copied data folder brings the views with it.
import { writeUiPref } from '@/lib/uiPref';
export type MapView = { lat: number; lon: number; zoom: number };
// The keys in use. Named here rather than typed at each call site so a rename
// cannot silently orphan somebody's saved view.
export const MAP_VIEW_WORLD = 'opslog.mapView';
export const MAP_VIEW_FT = 'opslog.ftMapView';
export const MAP_VIEW_GRIDS = 'opslog.gridMapView';
export function loadMapView(key: string): MapView | null {
try {
const v = JSON.parse(localStorage.getItem(key) || 'null');
return v && typeof v.zoom === 'number' && typeof v.lat === 'number' && typeof v.lon === 'number' ? v : null;
} catch {
return null; // corrupt or unreadable → open where the map would by default
}
}
export function saveMapView(key: string, lat: number, lon: number, zoom: number): void {
writeUiPref(key, JSON.stringify({ lat, lon, zoom }));
}
+82
View File
@@ -36,3 +36,85 @@ export function rstOptions(mode: string, lists: RSTLists): string[] {
if (l && l.length) return l;
return cat === 'phone' ? ['59', '58', '57'] : cat === 'cw' ? ['599', '589', '579'] : ['+00', '-10', '-20'];
}
// stepRST moves a report one step up or down, the way an operator would say it.
//
// The dropdown beside these fields is a list of the values worth having to hand,
// not of every legal report: nobody keeps 41 dB figures in it. So the wheel
// works on the VALUE, not on the list — a digital report moves by a decibel and
// an RST by one S-unit, which is what the hand on the wheel is asking for.
//
// dir is +1 for wheel up (a better report) and -1 for down.
export function stepRST(value: string, dir: number, mode: string): string {
const v = (value || '').trim();
if (v === '') return v;
if (rstCategory(mode) === 'digital') {
// A dB report: "-12", "+05", "0". Kept in its own shape — signed and two
// digits — because that is how every decoder writes it and how the operator
// reads it back off the screen.
const n = parseInt(v, 10);
if (!Number.isFinite(n)) return v;
// The range WSJT-X itself reports in, with room either side. Beyond it the
// number stops meaning anything.
const next = Math.max(-30, Math.min(35, n + dir));
return (next < 0 ? '-' : '+') + String(Math.abs(next)).padStart(2, '0');
}
// RST/RS, and the S9+ ladder above it. What an operator counts through is
//
// … 57 58 59 59+5 59+10 59+15 59+20 …
//
// — one S-unit up to nine, then five decibels at a time, because that is how
// a strong signal is reported and how the S-meter is read (see sMeterRST).
// Stepping the S digit and leaving the "+20" where it was would have gone
// from 59+20 to 58+20, which nobody has ever said on the air.
//
// R and T do not move: they are judgements about readability and tone, and a
// wheel has no business changing them.
const m = /^(\d)(\d)(\d?)(?:\+(\d+))?$/.exec(v);
if (!m) return v;
const head = m[1];
const tone = m[3];
let sUnit = parseInt(m[2], 10);
let over = m[4] === undefined ? 0 : parseInt(m[4], 10);
if (over > 0) {
// Above S9: five at a time, and back down through +5 to a plain 59.
over = Math.max(0, Math.min(60, over + dir * 5));
} else if (sUnit >= 9 && dir > 0) {
over = 5; // 59 → 59+5
} else {
sUnit = Math.max(1, Math.min(9, sUnit + dir));
}
return head + String(sUnit) + tone + (over > 0 ? '+' + over : '');
}
// rstFitsMode says whether a report belongs to the family a mode reports in.
//
// The three families are written differently and are not interchangeable: a
// signed decibel figure ("+00"), a three-figure RST ("599"), a two-figure RS
// ("59", with an optional "+20" above S9). "+00" on SSB is not a weak report,
// it is not a report at all.
export function rstFitsMode(value: string, mode: string): boolean {
const v = (value || '').trim();
if (v === '') return false;
switch (rstCategory(mode)) {
case 'digital': return /^[+-]\d{1,2}$/.test(v);
case 'cw': return /^\d{3}(\+\d+)?$/.test(v);
default: return /^\d{2}(\+\d+)?$/.test(v);
}
}
// convertRST carries a report across the CW/phone divide, keeping the operator's
// own judgement of the signal: 57 becomes 579, 599 becomes 59.
//
// Only between those two — a decibel figure says nothing about readability and
// an RST says nothing in decibels, so there the preset is the honest answer.
// Returns '' when it cannot be done.
export function convertRST(value: string, toMode: string): string {
const v = (value || '').trim();
const to = rstCategory(toMode);
if (to === 'digital') return '';
const m = /^(\d)(\d)(\d?)((?:\+\d+)?)$/.exec(v);
if (!m) return '';
if (to === 'cw') return m[1] + m[2] + '9' + m[4]; // RS → RST, tone 9
return m[1] + m[2] + m[4]; // RST → RS, tone dropped
}
+7 -4
View File
@@ -15,12 +15,15 @@ export function cleanSpotter(s: string): string {
// alone instead of guessing wrong.
export function inferSpotMode(comment: string, freqHz: number): string {
const c = (comment || '').toUpperCase();
// SuperFox and Fox/Hound are FT8 — they are WSJT-X's DXpedition transmit
// modes, not modes of their own. A spot commented "super fox" fell through to
// the band plan and came out DATA, and that verdict is not cosmetic: the
// SuperFox and Fox/Hound are FT8 — they are WSJT-X's DXpedition transmit modes,
// not modes of their own, and they turn up in a comment written every way an
// operator can shorten them: "super fox", SFOX, S/F, F/H.
//
// A spot commented "super fox" fell through to the band plan and came out
// DATA, and that verdict is not cosmetic: the
// band+mode status is computed from this answer, so a ZD8 on 21.071 read as a
// new DATA slot rather than the new FT8 one it is.
if (/\bSUPER\s*FOX\b|\bSFOX\b|\bFOX\s*\/?\s*HOUND\b|\bF\/H\b/.test(c)) return 'FT8';
if (/\bSUPER\s*FOX\b|\bSFOX\b|\bS\/F\b|\bFOX\s*\/?\s*HOUND\b|\bF\/H\b/.test(c)) return 'FT8';
if (/\bFT8\b/.test(c)) return 'FT8';
if (/\bFT4\b/.test(c)) return 'FT4';
if (/\bJS8\b/.test(c)) return 'JS8';
+3
View File
@@ -29,6 +29,9 @@ const PORTABLE_KEYS = [
'opslog.bandMapBands', // bands shown side-by-side in the Band Map tab
'opslog.mapAutoZoomDX', // Main map: auto-zoom to the DX (vs free pan/zoom)
'opslog.mapView', // Main map: remembered free-pan view (lat/lon/zoom)
// The same, for the FT decodes map and the grid-square map: a view an
// operator set up is theirs, and it should follow the folder like the rest.
'opslog.ftMapView', 'opslog.gridMapView',
'opslog.lookupOnBlur', // run the callsign lookup on blur instead of while typing
'opslog.groupDigitalSlots', // matrix + cluster: all digital modes count as ONE (DXCC-style) instead of per-mode slots
'opslog.clusterShowFilters', // cluster filter sidebar shown (tab + Main pane)
+1 -1
View File
@@ -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.27.13';
export const APP_VERSION = '0.27.15';
// Author / credits, shown in Help -> About.
export const APP_AUTHOR = 'F4BPO';
+4
View File
@@ -648,6 +648,8 @@ export function GetWsjtFollowMode():Promise<boolean>;
export function GetWsjtHighlight():Promise<boolean>;
export function GetWsjtHighlightColours():Promise<main.WsjtHighlightColours>;
export function GetWsjtHighlightWorked():Promise<boolean>;
export function GetYaesuBandAntennas():Promise<Record<string, number>>;
@@ -1308,6 +1310,8 @@ export function SetWsjtFollowMode(arg1:boolean):Promise<void>;
export function SetWsjtHighlight(arg1:boolean):Promise<void>;
export function SetWsjtHighlightColours(arg1:main.WsjtHighlightColours):Promise<void>;
export function SetWsjtHighlightWorked(arg1:boolean):Promise<void>;
export function SetYaesuAFGain(arg1:number):Promise<void>;
+8
View File
@@ -1230,6 +1230,10 @@ export function GetWsjtHighlight() {
return window['go']['main']['App']['GetWsjtHighlight']();
}
export function GetWsjtHighlightColours() {
return window['go']['main']['App']['GetWsjtHighlightColours']();
}
export function GetWsjtHighlightWorked() {
return window['go']['main']['App']['GetWsjtHighlightWorked']();
}
@@ -2550,6 +2554,10 @@ export function SetWsjtHighlight(arg1) {
return window['go']['main']['App']['SetWsjtHighlight'](arg1);
}
export function SetWsjtHighlightColours(arg1) {
return window['go']['main']['App']['SetWsjtHighlightColours'](arg1);
}
export function SetWsjtHighlightWorked(arg1) {
return window['go']['main']['App']['SetWsjtHighlightWorked'](arg1);
}
+20 -2
View File
@@ -1961,7 +1961,7 @@ export namespace main {
watched_attempts: number;
misses: number;
max_rounds: number;
rest_min: number;
rest_periods: number;
on_screen_only: boolean;
trace: boolean;
@@ -1977,7 +1977,7 @@ export namespace main {
this.watched_attempts = source["watched_attempts"];
this.misses = source["misses"];
this.max_rounds = source["max_rounds"];
this.rest_min = source["rest_min"];
this.rest_periods = source["rest_periods"];
this.on_screen_only = source["on_screen_only"];
this.trace = source["trace"];
}
@@ -4592,6 +4592,24 @@ export namespace main {
return a;
}
}
export class WsjtHighlightColours {
watchlist: string;
new_dxcc: string;
new_band: string;
worked: string;
static createFrom(source: any = {}) {
return new WsjtHighlightColours(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.watchlist = source["watchlist"];
this.new_dxcc = source["new_dxcc"];
this.new_band = source["new_band"];
this.worked = source["worked"];
}
}
}
+69 -5
View File
@@ -120,12 +120,36 @@ func (e *Exporter) writeDoc(ctx context.Context, w io.Writer, iter iterator) (in
func SingleRecordADIF(q qso.QSO) string {
var b strings.Builder
bw := bufio.NewWriter(&b)
// Uploads target other services — keep it standard (no app-specific tags).
// Uploads target other services — keep it standard (no app-specific tags),
// and say nothing about the receive side when there is nothing to say: in
// ADIF an absent BAND_RX/FREQ_RX means "same as transmit", and a logger
// given both draws both. Wavelog reads a simplex FT8 contact uploaded with
// BAND_RX filled in as split and shows it as "17m/17m".
writeRecord(bw, q, false, nil)
bw.Flush()
return b.String()
}
// ForwardRecordADIF is the record sent to ANOTHER LOGGER on the UDP link.
//
// The receive side is written even when it repeats the transmit side, which is
// the opposite of the upload rule above and is deliberate: Log4OM reads BAND_RX
// and found nothing there for contacts logged by a path that left it blank. A
// logger on the same desk is being handed a copy of our record, not published
// to a service that will draw conclusions from every tag present.
func ForwardRecordADIF(q qso.QSO) string {
var b strings.Builder
bw := bufio.NewWriter(&b)
writeRecord(bw, q, false, nil, keepRX)
bw.Flush()
return b.String()
}
// keepRX marks a record whose receive side must be written out in full.
type rxMode int
const keepRX rxMode = 1
// FullRecordADIF serialises one QSO LOSSLESSLY — including the APP_* extras —
// so it can be written out and read back with nothing dropped. Used by the
// offline queue: a QSO parked in the safety file must come back identical
@@ -161,7 +185,18 @@ func BatchRecordsADIF(records []string) string {
// Empty fields are omitted. MODE/SUBMODE are massaged so a "promoted"
// mode (e.g. FT4 stored without a parent) is exported as the canonical
// pair MODE=MFSK SUBMODE=FT4 — round-trips cleanly with strict loggers.
func writeRecord(bw *bufio.Writer, q qso.QSO, includeApp bool, allow map[string]bool) {
func writeRecord(bw *bufio.Writer, q qso.QSO, includeApp bool, allow map[string]bool, rx ...rxMode) {
// The receive side, unless it merely repeats the transmit side. See
// SingleRecordADIF and ForwardRecordADIF.
bandRX, freqRX := q.BandRX, q.FreqRXHz
if len(rx) == 0 || rx[0] != keepRX {
if strings.EqualFold(strings.TrimSpace(bandRX), strings.TrimSpace(q.Band)) {
bandRX = ""
}
if freqRX != nil && q.FreqHz != nil && *freqRX == *q.FreqHz {
freqRX = nil
}
}
// allow == nil → write every promoted field (standard/full behaviour).
// Otherwise a promoted tag is written only when it's in the chosen set.
// w/wi/wf wrap the raw writers with that gate so the ~150 field lines below
@@ -194,7 +229,7 @@ func writeRecord(bw *bufio.Writer, q qso.QSO, includeApp bool, allow map[string]
w("TIME_OFF", q.QSODateOff.UTC().Format("150405"))
}
w("BAND", q.Band)
w("BAND_RX", q.BandRX)
w("BAND_RX", bandRX)
mode, submode := modeForExport(q.Mode, q.Submode)
w("MODE", mode)
@@ -203,8 +238,8 @@ func writeRecord(bw *bufio.Writer, q qso.QSO, includeApp bool, allow map[string]
if q.FreqHz != nil && *q.FreqHz > 0 {
w("FREQ", strconv.FormatFloat(float64(*q.FreqHz)/1_000_000, 'f', 6, 64))
}
if q.FreqRXHz != nil && *q.FreqRXHz > 0 {
w("FREQ_RX", strconv.FormatFloat(float64(*q.FreqRXHz)/1_000_000, 'f', 6, 64))
if freqRX != nil && *freqRX > 0 {
w("FREQ_RX", strconv.FormatFloat(float64(*freqRX)/1_000_000, 'f', 6, 64))
}
w("RST_SENT", q.RSTSent)
@@ -372,12 +407,41 @@ func writeRecord(bw *bufio.Writer, q qso.QSO, includeApp bool, allow map[string]
// length is the byte count (ADIF spec), which matches len(v) in Go since v is
// already a UTF-8 byte string.
func writeField(bw *bufio.Writer, tag, v string) {
v = oneLine(v)
if v == "" {
return
}
fmt.Fprintf(bw, "<%s:%d>%s ", tag, len(v), v)
}
// oneLine flattens a value onto a single line.
//
// ADIF counts bytes, so a value carrying line breaks is still read correctly —
// and it turns the file into something nobody can read. ADDRESS is a multi-line
// field by the standard, and callbooks and other loggers fill it that way: a
// value of "Kabul" followed by four blank lines and "Afghanistan" came out of
// OpsLog as one record spread down a dozen lines, with the next record
// apparently starting in the middle of the page.
//
// The breaks are dropped rather than escaped: the parts are trimmed and joined
// with a comma, which is how an address reads on one line anyway, and empty
// fragments go. The length prefix is computed after this, so the record stays
// exact.
func oneLine(v string) string {
if !strings.ContainsAny(v, "\r\n\t") {
return v
}
parts := strings.FieldsFunc(v, func(r rune) bool { return r == '\r' || r == '\n' })
out := make([]string, 0, len(parts))
for _, part := range parts {
part = strings.TrimSpace(strings.ReplaceAll(part, "\t", " "))
if part != "" {
out = append(out, part)
}
}
return strings.Join(out, ", ")
}
func writeIntPtr(bw *bufio.Writer, tag string, p *int) {
if p == nil {
return
+46
View File
@@ -0,0 +1,46 @@
package adif
import (
"bufio"
"strings"
"testing"
"hamlog/internal/qso"
)
// An exported record has to fit on its own line. ADDRESS is a multi-line field
// by the standard and callbooks fill it that way, so an OpsLog export was one
// record spread down a dozen lines with the next apparently starting in the
// middle of the page.
func TestAMultiLineValueIsWrittenOnOneLine(t *testing.T) {
var b strings.Builder
bw := bufio.NewWriter(&b)
writeField(bw, "ADDRESS", "Kabul\r\n\r\n\r\n\r\nAfghanistan\r\n")
bw.Flush()
got := b.String()
if strings.ContainsAny(got, "\r\n") {
t.Fatalf("the record still breaks across lines: %q", got)
}
if want := "<ADDRESS:18>Kabul, Afghanistan "; got != want {
t.Errorf("got %q, want %q", got, want)
}
}
// And the whole record, the way an operator reads the file.
func TestARecordIsOneLine(t *testing.T) {
hz := int64(28555000)
rec := SingleRecordADIF(qso.QSO{
Callsign: "T6T", Band: "10m", Mode: "SSB", FreqHz: &hz,
Address: "Kabul\n\n\nAfghanistan", Name: "Shuravi\t(Vyacheslav)",
})
if n := strings.Count(strings.TrimRight(rec, "\r\n"), "\n"); n != 0 {
t.Errorf("the record spans %d extra lines:\n%s", n, rec)
}
if !strings.Contains(rec, "Kabul, Afghanistan") {
t.Errorf("the address lost its parts:\n%s", rec)
}
if !strings.Contains(rec, "Shuravi (Vyacheslav)") {
t.Errorf("a tab was left in the value:\n%s", rec)
}
}
+32 -3
View File
@@ -15,6 +15,12 @@ type Manager struct {
mu sync.Mutex
recStop chan struct{}
recDone chan recResult
// Said once each: "the audio is reaching the speakers" and "it is arriving
// with nobody listening". Both are answers to the same evening — sound
// switched on, nothing out of the speakers — and neither is worth a line per
// packet at fifty packets a second.
gotAudioOnce sync.Once
noSinkOnce sync.Once
// monGainPct scales what the RX monitor plays, 100 = as captured.
//
// The "From radio" slider used to reach only the QSO recorder, so an
@@ -224,6 +230,10 @@ func (m *Manager) StartMonitor(inputDev, outputDev string) error {
return m.startMonitor(inputDev, outputDev, true)
}
// Logf receives this package's diagnostic lines. Set to applog.Printf by the
// app; a no-op in tests and for anything that vendors the package alone.
var Logf = func(string, ...any) {}
// StartMonitorSink starts ONLY the render side (no USB capture) so an external
// producer — the network 50003 stream — can feed decoded RX PCM via
// PushMonitorAudio. Same output path as StartMonitor, minus the capture goroutine.
@@ -255,8 +265,17 @@ func (m *Manager) startMonitor(inputDev, outputDev string, capture bool) error {
}()
}
// Consumer: render the ring to the output device at the internal 16 kHz mono.
//
// The error was thrown away, and that is the whole of "I turned the sound on
// and nothing comes out": a Listening device that has been unplugged, renamed
// by Windows or cannot open at 16 kHz fails here, silently, while everything
// upstream reports success — the stream is up, the packets arrive, the
// monitor says it started. Said out loud, the operator knows to look at the
// device rather than at the radio.
go func() {
_ = renderStream(outputDev, sampleRate, channels, bitsPerSample, stop, ring)
if err := renderStream(outputDev, sampleRate, channels, bitsPerSample, stop, ring); err != nil {
Logf("audio: the Listening device could not be opened (%q): %v", outputDev, err)
}
}()
m.notify()
return nil
@@ -321,9 +340,19 @@ func (m *Manager) PushMonitorAudio(pcm []byte) {
m.mu.Lock()
ring := m.monRing
m.mu.Unlock()
if ring != nil {
ring.Push(pcm)
if ring == nil {
// Nothing is listening: the stream is feeding the recorder and the voice
// keyer only. Said ONCE, because the alternative — silence in the log for
// silence in the speakers — is what makes this take an evening to find.
m.noSinkOnce.Do(func() {
Logf("audio: network RX audio is arriving but no monitor is running — the speakers are off (Listening)")
})
return
}
m.gotAudioOnce.Do(func() {
Logf("audio: network RX audio reaching the Listening device (%d-byte chunks)", len(pcm))
})
ring.Push(pcm)
}
// ---- TX audio passthrough (Phase 3: live mic → rig over USB) --------------
+62 -12
View File
@@ -169,11 +169,17 @@ type Settings struct {
// Misses is how many of the station's OWN transmit periods may pass with no
// decode of it before it is given up on.
Misses int
// Rest is how long a released callsign waits before it can be picked again,
// and MaxRounds how many such series it gets before being parked for the
// session.
Rest time.Duration
MaxRounds int
// RestPeriods is how many of the station's OWN OVERS a released callsign sits
// out before it can be picked again, and MaxRounds how many such series it
// gets before being parked for the session.
//
// Counted in overs, not in minutes, because that is the unit the thing is
// happening in: an operator who has called a DX seven times without an answer
// listens through one of its transmissions and calls again if it is still
// there. Two minutes is four overs on FT8 — the DX has worked four other
// callers by then, and half the time it has gone.
RestPeriods int
MaxRounds int
// MaxHold is the wall-clock backstop on one target.
MaxHold time.Duration
// OnScreenOnly restricts the calling to what the decodes panel is actually
@@ -195,7 +201,7 @@ type Settings struct {
func Defaults() Settings {
return Settings{
Attempts: 7, WatchedAttempts: 15, Misses: 3,
Rest: 2 * time.Minute, MaxRounds: 3, MaxHold: 4 * time.Minute,
RestPeriods: 1, MaxRounds: 3, MaxHold: 4 * time.Minute,
}
}
@@ -210,8 +216,8 @@ func (s Settings) withDefaults() Settings {
if s.Misses <= 0 {
s.Misses = d.Misses
}
if s.Rest <= 0 {
s.Rest = d.Rest
if s.RestPeriods <= 0 {
s.RestPeriods = d.RestPeriods
}
if s.MaxRounds <= 0 {
s.MaxRounds = d.MaxRounds
@@ -284,6 +290,12 @@ type Engine struct {
heldSince time.Time
attempts int
misses int
// seenKey is the period in which the target was last DECODED. A period is
// judged more than once — the decodes arrive in bursts and stragglers follow —
// and a later judgement holds a partial view of it, not evidence of absence:
// the station answered in that very period and the counter still read one
// miss out of three.
seenKey string
lastMiss string // period already counted, so one period counts once
txSlot int // which of the two slots the target transmits in; -1 unknown
stopped bool // an explicit "Only" target gave up: needs a restart
@@ -735,7 +747,7 @@ func (e *Engine) OnPeriod(p Period) Action {
// The decode is refreshed so a reply carries a current timestamp; the
// hold clock is NOT — see heldSince.
e.target = seen
e.misses, e.lastMiss = 0, ""
e.misses, e.lastMiss, e.seenKey = 0, "", p.Key
e.txSlot = slotOf(p.At, periodSecs(p, *seen))
// In QSO: the decoder is sequencing the exchange on its own and the
// attempt counter has done its job. Interrupting it with another
@@ -780,6 +792,10 @@ func (e *Engine) OnPeriod(p Period) Action {
if p.TX.Transmitting {
return Action{}
}
// Nor a period it was already decoded in: see seenKey.
if e.seenKey == p.Key {
return Action{}
}
if e.txSlot >= 0 && slotOf(p.At, periodSecs(p, t)) != e.txSlot {
return Action{}
}
@@ -1000,7 +1016,19 @@ func (e *Engine) judge(c Candidate, p Period, only []string) (bool, string) {
if rank(c) == 0 {
return false, "nothing-needed"
}
if e.rounds[call] >= e.set.MaxRounds {
// A WATCHED callsign is never parked.
//
// Parking is the answer to "it will not answer, stop wasting the evening on
// it" — a fair verdict about a station the LOG picked out, and the wrong one
// about a station the OPERATOR did. A DXpedition running a pileup takes more
// than two series of calls to get through to, which is precisely why it was
// put on the list; watched ZD8GB was refused for the rest of the session
// after fourteen unanswered calls, while it went on transmitting six streams
// a period.
//
// The rest between series still applies, so it does not monopolise the
// transmitter — it simply never becomes ineligible.
if e.rounds[call] >= e.set.MaxRounds && !c.Watched {
return false, "parked" // its series are spent for the session
}
// RESTING. A series that ended in a brake is followed by a real pause,
@@ -1082,7 +1110,7 @@ func (e *Engine) preempt(p Period) (Action, bool) {
// is picked again like any other the moment it is.
func (e *Engine) drop() {
e.target, e.attempts, e.misses, e.txSlot, e.lastMiss = nil, 0, 0, -1, ""
e.targetInst, e.answered = "", false
e.targetInst, e.answered, e.seenKey = "", false, ""
}
// addressee is who a message is being sent to — the first token, which is the
@@ -1121,7 +1149,7 @@ func (e *Engine) giveUp(call string, t Candidate) {
if at.IsZero() {
at = time.Now()
}
e.rested[call] = at.Add(e.set.Rest)
e.rested[call] = at.Add(restFor(e.set.RestPeriods, candidateSecs(t)))
// An explicit "call this station" that runs out of attempts stops the
// feature instead of moving on. There is nothing else it was asked to do.
if strings.TrimSpace(e.set.Only) != "" {
@@ -1223,6 +1251,28 @@ func workedNow(decodes []Candidate, call string) bool {
return false
}
// restFor turns a number of the station's own overs into a deadline.
//
// A station transmits every OTHER slot, so one of its overs is two T/R periods —
// and the extra half-cycle is what makes the answer stable: without it the
// deadline lands exactly on the station's next transmission, where a
// millisecond of clock skew decides whether it is called or passed over. Landing
// it mid-cycle makes "sit out one over" mean one over, every time.
func restFor(overs, trSec int) time.Duration {
if overs <= 0 {
return time.Duration(trSec) * time.Second // no rest: its next over will do
}
return time.Duration(overs*2*trSec+trSec) * time.Second
}
// candidateSecs is the station's own T/R period in seconds, defaulting to FT8's.
func candidateSecs(c Candidate) int {
if c.TRPeriod > 0 {
return c.TRPeriod
}
return 15
}
func periodSecs(p Period, c Candidate) int {
if c.TRPeriod > 0 {
return c.TRPeriod
+65 -11
View File
@@ -244,24 +244,28 @@ func TestAReleasedStationYieldsToAnythingBetter(t *testing.T) {
}
}
func TestAReleasedStationRestsBeforeItIsCalledAgain(t *testing.T) {
// A series that ended in a brake is followed by ONE of the station's own overs
// passed over — long enough to be a pause, short enough that the DX everybody
// is chasing is still there when the calling resumes. It used to be two
// minutes, which on FT8 is four overs: by then the DX has worked four other
// callers, and half the time it has gone.
func TestAReleasedStationSitsOutOneOfItsOvers(t *testing.T) {
e := on()
e.OnPeriod(period(0, cq("DX", NeedBand, -5)))
tx := TXState{Transmitting: true, Msg: "DX " + me + " JN36"}
for i := 0; i < 7; i++ {
e.NoteTX(tx)
}
// Still the only thing on the air, and still resting: seven calls, a halt,
// and the same station called again four seconds later is not a rest.
for _, n := range []int{2, 4, 6} { // all inside the two minutes
if a := e.OnPeriod(period(n, cq("DX", NeedBand, -5))); a.Kind != DoNothing {
t.Fatalf("period %d: called again during the rest: %+v", n, a)
}
// Its very next over is passed over, whatever else is on the air: seven
// calls, a halt, and the same station called again four seconds later is not
// a rest, it is a stutter.
if a := e.OnPeriod(period(2, cq("DX", NeedBand, -5))); a.Kind != DoNothing {
t.Fatalf("called again during the rest: %+v", a)
}
// Two minutes later (period 8 × 15 s = 2 min past the give-up) it may go
// again — the station is still there and nothing better is.
if a := e.OnPeriod(period(9, cq("DX", NeedBand, -5))); a.Kind != DoReply {
t.Errorf("after the rest: %+v, want the station called again", a)
// And the one after that goes: still there, still wanted, and the operator
// has listened through an over.
if a := e.OnPeriod(period(4, cq("DX", NeedBand, -5))); a.Kind != DoReply {
t.Errorf("after one over: %+v, want the station called again", a)
}
}
@@ -922,3 +926,53 @@ func TestTheFirstCallStartsWithNoMisses(t *testing.T) {
t.Fatalf("misses=%d — the station's own silent period was not counted", e.misses)
}
}
// Parking answers "it will not answer, stop wasting the evening on it" — which
// is a verdict about a station the LOG picked out, not about one the OPERATOR
// did. From the air: a watched ZD8GB, six streams a period, refused for the
// rest of the session after two series of unanswered calls.
func TestAWatchedCallsignIsNeverParked(t *testing.T) {
spent := func(c Candidate) *Engine {
e := New(Settings{Enabled: true, MaxRounds: 2})
e.OnPeriod(period(0)) // the engine's clock, so the rest below is period time
for i := 0; i < 2; i++ {
e.giveUp(strings.ToUpper(c.Call), c) // a series ended by a brake
}
return e
}
// Period 8, well past the rest that follows a series: what is left is the
// parking, and only the parking.
plain := cq("PLAIN", NeedDXCC, 0)
if a := spent(plain).OnPeriod(period(8, plain)); a.Kind == DoReply {
t.Errorf("%+v — a station whose series are spent was called again", a)
}
dx := cq("ZD8GB", NeedDXCC, 0, watched)
if a := spent(dx).OnPeriod(period(8, dx)); a.Kind != DoReply {
t.Errorf("%+v — a watched DXpedition was parked for the session", a)
}
}
// A period is judged more than once — the decodes arrive in a burst and
// stragglers follow — and a later judgement of it holds a partial view, not
// evidence that the station has gone. From the air: D2ACE answered in the very
// period the counter then read as a miss.
func TestAPeriodTheTargetWasSeenInIsNeverAMiss(t *testing.T) {
e := on()
if a := e.OnPeriod(period(1, cq("D2ACE", NeedBand, 13))); a.Kind != DoReply {
t.Fatalf("%+v", a)
}
// Its own next period: decoded, so the exchange is under way.
p := period(3, callsMe("D2ACE", NeedBand, 13))
e.OnPeriod(p)
if e.Status().Misses != 0 {
t.Fatalf("misses=%d after being decoded", e.Status().Misses)
}
// The same period again, this time from a flush that carries only the
// stragglers — the target is not among them.
e.OnPeriod(period(3))
if got := e.Status().Misses; got != 0 {
t.Errorf("misses=%d — a second flush of a period it was seen in counted against it", got)
}
}
+30
View File
@@ -60,3 +60,33 @@ func TestIcomSilenceBackoff(t *testing.T) {
t.Errorf("backoff overshot the ceiling: %s", g)
}
}
// A new session must not be judged on the previous one's silence.
//
// From an operator's log: a rig switched to standby, then a dial-and-drop loop
// every forty seconds for as long as it was left there. lastGoodAt bounds "the
// link answers but no CI-V comes back"; it belongs to a session, and it was
// never cleared when a new one opened, so every fresh session started already
// past the grace — and the Icom console, where the power-ON button lives,
// blinked away on every pass.
func TestAFreshSessionStartsWithACleanSilenceClock(t *testing.T) {
b := &IcomSerial{
lastGoodAt: time.Now().Add(-30 * time.Minute), // a session from before standby
readFails: 9,
silentGrace: icomSilentGraceMax,
}
// What Connect does once the transport is open, before anything is sent.
b.lastGoodAt = time.Time{}
b.readFails = 0
b.silentGrace = icomSilentGrace
if !b.lastGoodAt.IsZero() {
t.Fatal("the previous session's last good read survived into this one")
}
tolerate := func(lastGood time.Time, silentFor, grace time.Duration) bool {
return lastGood.IsZero() || silentFor < grace
}
if !tolerate(b.lastGoodAt, time.Hour, b.silentGrace) {
t.Error("a session silent since connect was torn down — that is a rig in standby, and where the ON button has to work")
}
}
+15 -1
View File
@@ -67,12 +67,26 @@ type icomAudio struct {
txOuter uint16
txSend uint16
lastRx atomic.Int64 // UnixNano of last packet (liveness)
rxCount atomic.Int64 // packets delivered on this stream
done chan struct{}
closeOnce sync.Once
}
func (a *icomAudio) markRx() { a.lastRx.Store(time.Now().UnixNano()) }
func (a *icomAudio) markRx() {
a.lastRx.Store(time.Now().UnixNano())
a.rxCount.Add(1)
}
// packets reports whether the stream is actually delivering — the difference
// between "audio is on" and "audio is arriving", which is what makes it worth
// naming as a suspect when CI-V has gone quiet on the same session.
func (a *icomAudio) packets() int64 {
if a == nil {
return 0
}
return a.rxCount.Load()
}
// Close tears the audio stream down (disconnect a few times; UDP is lossy).
func (a *icomAudio) Close() {
+79 -4
View File
@@ -43,7 +43,7 @@ var icnBE = binary.BigEndian
// = CI-V only (the proven default). The audio stream is fully separate from CAT,
// so enabling it can't affect freq/mode/DSP control.
func NewIcomNet(host, user, pass string, civAddr int, digitalDefault string, audioSink func([]byte)) *IcomSerial {
if civAddr <= 0 || civAddr > 0xFF {
if civAddr < 0 || civAddr > 0xFF {
civAddr = 0x98 // IC-7610
}
if digitalDefault == "" {
@@ -132,6 +132,13 @@ type icomNet struct {
// loop, not the rig — and RS-BA1 showing no such dropouts points that way.
txCiv atomic.Uint32
txAtData atomic.Uint32
// WHAT was asked, not just how much. A rig that answers at connect and then
// never again has usually been sent something it does not like, and counting
// the unanswered commands says nothing about which one that was. The last few
// command headers are kept so the silence report can name them — the only way
// to find a poison command on a radio nobody here has.
cmdMu sync.Mutex
lastCmd []string
rx chan []byte // CI-V byte chunks from civPump → Read (control replies)
scopeRx chan []byte // scope (0x27) frames, kept off rx so the panadapter
@@ -268,6 +275,7 @@ func (n *icomNet) Write(p []byte) (int, error) {
n.vCivSeq++
n.seqMu.Unlock()
n.txCiv.Add(1)
n.noteCmd(p)
pkt := icnCivData(seq, n.vID, n.vRemote, civSeq, p)
n.sentMu.Lock()
n.sentBuf[seq] = pkt
@@ -280,6 +288,35 @@ func (n *icomNet) Write(p []byte) (int, error) {
return len(p), nil
}
// noteCmd remembers the command bytes of a CI-V frame — everything after the
// preamble and the two addresses, up to four bytes, which is command,
// sub-command and the first of the data.
func (n *icomNet) noteCmd(p []byte) {
if len(p) < 5 {
return
}
body := p[4:]
if len(body) > 4 {
body = body[:4]
}
n.cmdMu.Lock()
n.lastCmd = append(n.lastCmd, fmt.Sprintf("% X", body))
if len(n.lastCmd) > 8 {
n.lastCmd = n.lastCmd[len(n.lastCmd)-8:]
}
n.cmdMu.Unlock()
}
// recentCmds is what noteCmd collected, oldest first.
func (n *icomNet) recentCmds() string {
n.cmdMu.Lock()
defer n.cmdMu.Unlock()
if len(n.lastCmd) == 0 {
return "none"
}
return strings.Join(n.lastCmd, " | ")
}
// icnTrace toggles verbose per-frame CI-V request/reply logging for diagnosing
// the network transport. Off by default (the connect-step logs stay); flip to
// true to trace every TX/RX again.
@@ -496,6 +533,18 @@ func (n *icomNet) civPump() {
}
debugLog.Printf("icom net: no CI-V DATA for 10 s (transport last heard %s ago; last scope frame %s ago; last socket error: %v; missing-seq backlog: %d; CI-V commands SENT since the last answer: %d)",
time.Since(lastPkt).Round(time.Second), scopeAge, lastErr, len(n.rxMissing), n.txCiv.Load()-n.txAtData.Load())
debugLog.Printf("icom net: the last CI-V commands sent, oldest first: %s", n.recentCmds())
// THE AUDIO STREAM IS THE FIRST SUSPECT, AND ONLY THE LOG CAN SAY SO.
//
// The RX audio stream is experimental and shares the rig's session with
// CI-V. The shape seen in the field is exactly this one: audio packets
// arriving by the hundred while not one CI-V reply comes back, the
// watchdog tearing the session down, and the whole thing beginning
// again — a loop an operator reads as "the Icom keeps disconnecting",
// with nothing pointing at the switch that would end it.
if n.audio != nil && n.audio.packets() > 0 {
debugLog.Printf("icom net: the RX audio stream is running and still delivering while CI-V has gone quiet — that option is experimental and shares this session. If the drops continue, turn OFF \"Stream RX audio over the network\" in Settings → CAT and see whether control steadies.")
}
// And try the gentle repair before the 30 s watchdog tears the whole
// session down: if the rig quietly closed the CI-V data flow (the
// transport is still chatting, so the session itself stands), saying
@@ -808,20 +857,46 @@ func dialIcomNet(host, user, pass, compName string, rigAddr byte, cancel <-chan
n.vTracked++
n.vCivSeq++
go n.ctrlPump()
go n.civPump()
// Optional RX audio stream (50003). The rig was told (conninfo rxEnable=1) to
// stream audio; open the socket + handshake now. A failure here is NON-fatal:
// CAT works without audio, so we log and continue rather than tear down a
// perfectly good control/CI-V session.
//
// BEFORE the pumps start, because the conninfo below touches the control-
// stream auth state, and after ctrlPump is running that state belongs to it.
if wantAudio {
if a, err := dialIcomAudio(host, audioSink, cancel); err != nil {
debugLog.Printf("icom net: audio stream FAILED (CAT unaffected): %v", err)
} else {
n.audio = a
// AND THE CONNINFO AGAIN, NOW THAT SOMEBODY IS LISTENING ON 50003.
//
// The first one goes out during the login, before this socket exists —
// it has to, since it is what authorises the stream. So the rig is told
// to send audio to a port nothing is bound to yet, and what comes back
// is an ICMP port-unreachable; it then backs off, and the audio appears
// only when its own retry timer comes round. An operator timed that at
// twenty to thirty seconds of silence after switching the speakers on,
// and one log here shows a minute and a half.
//
// Re-sent once the port is open, so the rig starts streaming into a
// socket that is ready for it. Idempotent — the same message the session
// already carries, which is why RS-BA1 repeats it too.
pkt := icnConnInfo(n.cTracked, n.cAuthSeq, n.cTokReq, n.cID, n.cRemote, n.cToken, user, rigMAC, 50002, 50003, 0x01)
n.cSentBuf[n.cTracked] = pkt
n.cTracked++
n.cAuthSeq++
if _, err := ctrl.Write(pkt); err != nil {
debugLog.Printf("icom net: could not re-send the conninfo after opening the audio port: %v", err)
} else {
debugLog.Printf("icom net: conninfo re-sent now that :50003 is listening — the rig can start the audio at once")
}
}
}
go n.ctrlPump()
go n.civPump()
return n, nil
}
+18 -2
View File
@@ -172,12 +172,13 @@ const (
)
// NewIcomSerial builds an (unconnected) Icom serial backend. baud defaults to
// 115200, rig address to the IC-7610's 0x98 when out of range.
// 115200, rig address to the IC-7610's 0x98 when out of range — and 0x00 is in
// range: it is a valid CI-V address that some rigs and interfaces are set to.
func NewIcomSerial(portName string, baud, civAddr int, digitalDefault string) *IcomSerial {
if baud <= 0 {
baud = 115200
}
if civAddr <= 0 || civAddr > 0xFF {
if civAddr < 0 || civAddr > 0xFF {
civAddr = 0x98 // IC-7610
}
if digitalDefault == "" {
@@ -231,6 +232,21 @@ func (b *IcomSerial) Connect() error {
_ = port.SetRTS(false)
b.port = port
b.model = civ.ModelName(b.rigAddr)
// A NEW SESSION IS NOT JUDGED ON THE OLD ONE'S SILENCE.
//
// lastGoodAt bounds "the control link answers but no CI-V comes back". It
// belongs to a session, and it was never cleared when a new one opened —
// so a rig that went to standby half an hour ago handed every fresh session
// a half-hour-old "last good read", which is past the grace before the first
// command is even sent. The session was torn down at once, redialled twenty
// seconds later, and torn down again: a loop with no way out, and the Icom
// console (with its power-ON button) blinking away on every pass.
//
// Cleared, the rule reads as it was written: silent since connect is a rig in
// standby, and the session is kept so the operator can wake it.
b.lastGoodAt = time.Time{}
b.readFails = 0
b.silentGrace = icomSilentGrace
// Start the reader before any request: recv() now waits on respCh, which only
// the reader feeds. respCh is buffered so a burst (or the scope stream) never
+79
View File
@@ -0,0 +1,79 @@
package extsvc
import (
"fmt"
"strings"
)
// Configured reports what a service still needs before it can be uploaded to.
//
// It exists so the answer lives NEXT TO THE UPLOADERS that enforce it. Written
// once in the app instead, it drifted immediately: Club Log was refused for a
// missing API key, which nobody has ever set — OpsLog carries its own
// application key (see clublogAppAPIKey) and the account is an email, a password
// and the logbook callsign. An operator whose live upload had been working for
// months was told his service was not configured.
//
// Each case mirrors the guard at the top of the matching Upload* function. It
// answers "can this be attempted", not "are these credentials right": only the
// service can say that, and it says it by refusing the upload.
func Configured(svc Service, cfg ExternalServices) error {
missing := func(service string, fields ...string) error {
return fmt.Errorf("%s is not configured — %s", service, strings.Join(fields, ", "))
}
set := func(v string) bool { return strings.TrimSpace(v) != "" }
var need []string
add := func(ok bool, what string) {
if !ok {
need = append(need, what)
}
}
switch svc {
case ServiceQRZ:
add(set(cfg.QRZ.APIKey), "the logbook API key")
if len(need) > 0 {
return missing("QRZ.com", need...)
}
case ServiceClublog:
// No API key: OpsLog's own application key is embedded.
add(set(cfg.Clublog.Email), "the account email")
add(set(cfg.Clublog.Password), "the password")
add(set(cfg.Clublog.Callsign), "the logbook callsign")
if len(need) > 0 {
return missing("Club Log", need...)
}
case ServiceHRDLog:
add(set(cfg.HRDLog.Callsign), "the station callsign")
add(set(cfg.HRDLog.Code), "the upload code")
if len(need) > 0 {
return missing("HRDLog.net", need...)
}
case ServiceEQSL:
add(set(cfg.EQSL.Username), "the username (callsign)")
add(set(cfg.EQSL.Password), "the password")
if len(need) > 0 {
return missing("eQSL.cc", need...)
}
case ServiceHamQTH:
add(set(cfg.HamQTH.Username), "the username")
add(set(cfg.HamQTH.Password), "the password")
if len(need) > 0 {
return missing("HamQTH", need...)
}
case ServiceCloudlog:
add(set(cfg.Cloudlog.URL), "the instance URL")
add(set(cfg.Cloudlog.APIKey), "the API key")
add(set(cfg.Cloudlog.StationID), "the station profile")
if len(need) > 0 {
return missing("Cloudlog / Wavelog", need...)
}
case ServiceLoTW:
add(set(cfg.LoTW.TQSLPath), "the path to tqsl.exe")
add(set(cfg.LoTW.StationLocation), "the TQSL station location")
if len(need) > 0 {
return missing("LoTW", need...)
}
}
return nil
}
+23 -5
View File
@@ -279,13 +279,9 @@ func (w *Watcher) Watch(target, mode string, dialHz int64) error {
return nil
}
w.mu.Lock()
// The window belongs to the target it was collected for. Keeping it across a
// change would answer the new question with the old station's evidence.
if changed {
w.spots = w.spots[:0]
w.dropWindowOfPreviousTarget()
}
w.mu.Unlock()
if err := w.resubscribe(client); err != nil {
return err
@@ -301,6 +297,28 @@ func (w *Watcher) Watch(target, mode string, dialHz int64) error {
return nil
}
// dropWindowOfPreviousTarget empties the collected window when it belonged to
// the station being left behind.
//
// WHOSE WINDOW IS IT? Under the narrow scope the subscription IS the target —
// three filters about one station — so the window is his, and keeping it across
// a change would answer the new question with the old station's evidence.
//
// Under the band-wide scope it is the BAND's: every FTx report on it, filtered
// by target only when the analysis is drawn. Clearing it there threw away an
// hour of accumulated evidence on every click, and a panel that had been showing
// hundreds of reports read zero — the operator clicking a decode to ask "can he
// hear me" is the very moment that history is worth something, and it was being
// deleted in order to answer the question.
func (w *Watcher) dropWindowOfPreviousTarget() {
w.mu.Lock()
defer w.mu.Unlock()
if w.cfg.Scope == ScopeBand {
return
}
w.spots = w.spots[:0]
}
// resubscribe replaces every filter with the ones the current target and scope
// want. Takes the old ones down first: a target change that only ADDED filters
// would leave the previous station's reports arriving for ever.
+23
View File
@@ -156,3 +156,26 @@ func TestACrowdedPassbandStillGetsAnAnswer(t *testing.T) {
t.Errorf("suggested %d Hz, want the quietest slot around 2400", got)
}
}
// Under the band-wide scope the window is the BAND's, not the target's: it is
// every FTx report on it, filtered by target only when the analysis is drawn.
// Clearing it on a target change threw away an hour of accumulated evidence at
// the exact moment it was worth something — the operator clicking a decode to
// ask "can he hear me" saw the report count drop to zero.
func TestBandScopeKeepsItsWindowAcrossATargetChange(t *testing.T) {
for _, tc := range []struct {
scope Scope
keep bool
}{{ScopeBand, true}, {ScopeTarget, false}} {
w := &Watcher{cfg: Config{Scope: tc.scope, Logf: func(string, ...any) {}}}
w.target, w.mode = "OLD", "FT8"
w.spots = []spot{{TxCall: "OLD", RxCall: "F4BPO", at: time.Now()}}
w.dropWindowOfPreviousTarget()
w.target = "NEW"
if got := len(w.spots) > 0; got != tc.keep {
t.Errorf("%s scope: window kept = %v, want %v", tc.scope, got, tc.keep)
}
}
}
+41
View File
@@ -0,0 +1,41 @@
package steppir
import (
"testing"
"time"
)
// The controller says nothing until its own poll comes round, so a move has to
// be reported from the moment it is COMMANDED. Without it the app's "block TX
// while the elements travel" had a hole: the grace covering the command ran out
// before the first poll that would have seen the movement, and the transmitter
// was released in the middle of a move.
func TestAJustCommandedMoveReportsMotion(t *testing.T) {
c := &Client{}
c.lastStatus = &Status{Connected: true} // idle, as the controller last said
if st, _ := c.GetStatus(); st.MotorsMoving != 0 {
t.Fatal("an idle antenna reports motion")
}
c.statusMu.Lock()
c.moveCmdAt = time.Now()
c.statusMu.Unlock()
st, _ := c.GetStatus()
if st.MotorsMoving == 0 {
t.Error("a move commanded a moment ago is not reported as motion")
}
if c.lastStatus.MotorsMoving != 0 {
t.Error("the optimistic flag leaked into the cached status the poll owns")
}
// Bounded: an antenna that never reports motion must not latch the transmit
// inhibit on for ever.
c.statusMu.Lock()
c.moveCmdAt = time.Now().Add(-moveOptimisticWindow - time.Second)
c.statusMu.Unlock()
if st, _ := c.GetStatus(); st.MotorsMoving != 0 {
t.Error("the optimistic window never expires")
}
}
+57 -2
View File
@@ -65,6 +65,25 @@ const (
// self-corrects instead of lying forever.
const pendingDirTTL = 45 * time.Second
// The same two cadences the Ultrabeam uses, and for the same reason: transmit
// is inhibited while the elements travel, so every poll interval between the
// motors stopping and this client noticing is a second the operator cannot call
// with the antenna already in place.
const (
pollIdle = 2 * time.Second
pollMoving = 250 * time.Millisecond
)
// moveOptimisticWindow is how long after a commanded move GetStatus reports
// motion before the controller has had a chance to say so.
//
// The SteppIR reports nothing until its own poll comes round, so without this
// the app's "block TX while moving" had a hole in it: the grace that covers the
// command ran out before the first poll that would have seen the movement, and
// the transmitter was released in the middle of a move. Bounded, so an antenna
// that never reports motion cannot latch the inhibit on for ever.
const moveOptimisticWindow = 3 * time.Second
// Transport says how to reach the controller.
type Transport struct {
Mode string // "tcp" | "serial"
@@ -103,6 +122,8 @@ type Client struct {
statusMu sync.RWMutex
lastStatus *Status
lastSetKHz int
// moveCmdAt is when a move was last COMMANDED — see moveOptimisticWindow.
moveCmdAt time.Time
// lastDriftKHz is the frequency last reported for a controller that had gone
// somewhere other than where it was told, so the disagreement is stated once
// and not on every poll. Zero when it is where it should be.
@@ -191,7 +212,28 @@ func (c *Client) GetStatus() (*Status, error) {
if c.lastStatus == nil {
return &Status{Connected: false}, nil
}
return c.lastStatus, nil
// A COPY, so the optimistic flag below can never leak into the status the
// poll goroutine owns — and so a caller holding the value cannot see it
// change under them mid-read.
st := *c.lastStatus
if st.Connected && st.MotorsMoving == 0 && c.movingOptimisticallyLocked() {
st.MotorsMoving = 1 // sentinel: commanded, not yet reported (read as != 0)
}
return &st, nil
}
// movingOptimisticallyLocked reports a move commanded too recently for the
// controller to have answered. Callers hold statusMu.
func (c *Client) movingOptimisticallyLocked() bool {
return !c.moveCmdAt.IsZero() && time.Since(c.moveCmdAt) < moveOptimisticWindow
}
// MovingOptimistically is the same question from outside the lock — the poll
// loop asks it to decide its cadence.
func (c *Client) MovingOptimistically() bool {
c.statusMu.RLock()
defer c.statusMu.RUnlock()
return c.movingOptimisticallyLocked()
}
// open dials the transport. Callers hold connMu.
@@ -266,8 +308,9 @@ func (c *Client) pollLoop() {
close(c.done)
}
}()
ticker := time.NewTicker(2 * time.Second)
ticker := time.NewTicker(pollIdle)
defer ticker.Stop()
fast := false
for {
select {
case <-c.stopChan:
@@ -315,6 +358,17 @@ func (c *Client) pollLoop() {
c.lastStatus = st
c.statusMu.Unlock()
c.checkDrift(st)
// Follow the motors with the poll rate; changed only when it changes,
// since the antenna is polled for hours on end.
if moving := st.MotorsMoving != 0 || c.MovingOptimistically(); moving != fast {
fast = moving
if fast {
ticker.Reset(pollMoving)
} else {
ticker.Reset(pollIdle)
}
}
}
}
}
@@ -639,6 +693,7 @@ func (c *Client) SetFrequency(freqKhz int, direction int) error {
c.statusMu.Lock()
c.lastSetKHz = freqKhz
c.pendingDir, c.pendingDirAt, c.pendingDirSet = direction, time.Now(), true
c.moveCmdAt = time.Now() // report motion at once — see moveOptimisticWindow
c.statusMu.Unlock()
return nil
}
+44 -1
View File
@@ -134,6 +134,23 @@ type Client struct {
// clears rather than latching the TX-inhibit on for ever.
const ubMoveOptimisticWindow = 3 * time.Second
// Poll cadences: what an idle antenna is worth, and what a moving one is worth.
// See the poll loop.
const (
ubPollIdle = 2 * time.Second
ubPollMoving = 250 * time.Millisecond
)
// movingOptimistically reports whether a move was commanded so recently that the
// antenna cannot have answered yet — the same window GetStatus reports motion
// for, so the fast poll starts with the movement rather than one interval into
// it.
func (c *Client) movingOptimistically() bool {
c.statusMu.RLock()
defer c.statusMu.RUnlock()
return !c.moveCmdAt.IsZero() && time.Since(c.moveCmdAt) < ubMoveOptimisticWindow
}
// LastSetKHz returns the frequency (kHz) most recently commanded to the antenna,
// or 0 if none yet.
func (c *Client) LastSetKHz() int {
@@ -312,8 +329,22 @@ func (c *Client) pollLoop() {
close(c.done)
}
}()
ticker := time.NewTicker(2 * time.Second) // Increased from 500ms to 2s
// TWO CADENCES, and the fast one is what matters.
//
// An idle antenna has nothing to say, so two seconds is generous. A MOVING
// one has one thing to say and it is urgent: transmit is inhibited while the
// elements travel, so every poll interval between the motors stopping and
// this loop noticing is a second the operator cannot call — with the antenna
// already in place and the rig still gagged. Reported from the air as "it
// stays orange one or two seconds after it has finished".
//
// While the motors run — or a move has just been commanded — the antenna is
// asked four times a second. The controller answers a status query in
// milliseconds; this is nothing to it, and it lasts only as long as the
// movement does.
ticker := time.NewTicker(ubPollIdle)
defer ticker.Stop()
fast := false
pollCount := 0
pollFails := 0 // consecutive failed status polls (transient timeouts tolerated)
@@ -436,6 +467,18 @@ func (c *Client) pollLoop() {
c.lastStatus = status
c.statusMu.Unlock()
// Follow the motors with the poll rate. Changed only when it actually
// changes: Reset on a ticker is cheap but not free, and the antenna is
// polled for hours on end.
if moving := status.MotorsMoving != 0 || c.movingOptimistically(); moving != fast {
fast = moving
if fast {
ticker.Reset(ubPollMoving)
} else {
ticker.Reset(ubPollIdle)
}
}
case <-c.stopChan:
return
}
+16 -1
View File
@@ -10,6 +10,10 @@ import (
// A contact that was not split still has a receive side, and the record
// forwarded to another logger has to carry it: Log4OM reads BAND_RX.
//
// The record UPLOADED to a service must not: in ADIF an absent BAND_RX means
// "same as transmit", and Wavelog shown both draws "17m/17m" on a simplex FT8
// contact — reported by OE6CLD, who had never logged a split QSO in his life.
func TestFillRXDefaults(t *testing.T) {
hz := int64(14074000)
q := qso.QSO{Callsign: "F4BPO", Band: "20m", FreqHz: &hz}
@@ -22,7 +26,7 @@ func TestFillRXDefaults(t *testing.T) {
}
// Assert on the RECORD another logger reads, not merely on the struct:
// both halves of the receive side have to reach it.
rec := strings.ToUpper(adif.SingleRecordADIF(q))
rec := strings.ToUpper(adif.ForwardRecordADIF(q))
if !strings.Contains(rec, "<BAND_RX:3>20M") {
t.Errorf("BAND_RX missing from the forwarded record:\n%s", rec)
}
@@ -40,3 +44,14 @@ func TestFillRXDefaultsKeepsSplit(t *testing.T) {
t.Errorf("split QSO was overwritten: band_rx=%q freq_rx=%v", q.BandRX, q.FreqRXHz)
}
}
// A genuine split contact is uploaded AS split: the rule above is about a
// receive side that repeats the transmit side, not about dropping one.
func TestSplitIsUploadedWithItsReceiveSide(t *testing.T) {
tx, rx := int64(14195000), int64(18100000)
q := qso.QSO{Callsign: "F4BPO", Band: "20m", BandRX: "17m", FreqHz: &tx, FreqRXHz: &rx}
up := strings.ToUpper(adif.SingleRecordADIF(q))
if !strings.Contains(up, "<BAND_RX:3>17M") || !strings.Contains(up, "<FREQ_RX:9>18.100000") {
t.Errorf("a cross-band contact lost its receive side:\n%s", up)
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ import (
const (
// appVersion is stamped on every heartbeat (and could feed the About box).
appVersion = "0.27.13"
appVersion = "0.27.15"
// posthogHost is the PostHog ingestion endpoint. EU cloud by default; change
// to https://us.i.posthog.com for a US project.
+74
View File
@@ -0,0 +1,74 @@
package main
import (
"strings"
"testing"
"hamlog/internal/extsvc"
)
// An upload to a service with no credentials used to look exactly like one that
// worked: it ran on its own goroutine and reported into the QSL Manager's
// console, which is not open when the command came from the QSO list.
func TestUploadRefusesAnUnconfiguredService(t *testing.T) {
var empty extsvc.ExternalServices
for _, svc := range []extsvc.Service{
extsvc.ServiceCloudlog, extsvc.ServiceQRZ, extsvc.ServiceClublog,
extsvc.ServiceHRDLog, extsvc.ServiceEQSL, extsvc.ServiceHamQTH, extsvc.ServiceLoTW,
} {
err := uploadConfigured(svc, empty)
if err == nil {
t.Errorf("%s: an unconfigured service was accepted", svc)
continue
}
if !strings.Contains(err.Error(), "Settings") {
t.Errorf("%s: %q does not say where to fix it", svc, err)
}
}
}
// And a CONFIGURED service is not turned away. Club Log is the one that was:
// its API key is OpsLog's own application key, embedded and never entered, so
// demanding it refused every operator who had the service working.
func TestAConfiguredServiceIsAccepted(t *testing.T) {
var cfg extsvc.ExternalServices
cfg.Clublog.Email, cfg.Clublog.Password, cfg.Clublog.Callsign = "[email protected]", "secret", "F4BPO"
cfg.QRZ.APIKey = "1234-5678"
cfg.Cloudlog.URL, cfg.Cloudlog.APIKey, cfg.Cloudlog.StationID = "https://log.example.com", "cl-key", "3"
cfg.EQSL.Username, cfg.EQSL.Password = "F4BPO", "secret"
cfg.HamQTH.Username, cfg.HamQTH.Password = "f4bpo", "secret"
cfg.HRDLog.Callsign, cfg.HRDLog.Code = "F4BPO", "12345"
cfg.LoTW.TQSLPath, cfg.LoTW.StationLocation = `C:\Program Files (x86)\TrustedQSL\tqsl.exe`, "Home"
for _, svc := range []extsvc.Service{
extsvc.ServiceCloudlog, extsvc.ServiceQRZ, extsvc.ServiceClublog,
extsvc.ServiceHRDLog, extsvc.ServiceEQSL, extsvc.ServiceHamQTH, extsvc.ServiceLoTW,
} {
if err := uploadConfigured(svc, cfg); err != nil {
t.Errorf("%s: a configured service was refused: %v", svc, err)
}
}
}
// The message names what is actually missing, so the operator opens the right
// field rather than checking three that were already filled in.
func TestTheRefusalNamesTheMissingFields(t *testing.T) {
var cfg extsvc.ExternalServices
cfg.Clublog.Email = "[email protected]"
err := uploadConfigured(extsvc.ServiceClublog, cfg)
if err == nil {
t.Fatal("a half-configured Club Log was accepted")
}
msg := err.Error()
if strings.Contains(msg, "email") {
t.Errorf("%q asks for the one field that IS set", msg)
}
for _, want := range []string{"password", "logbook callsign"} {
if !strings.Contains(msg, want) {
t.Errorf("%q does not mention the missing %s", msg, want)
}
}
if strings.Contains(strings.ToLower(msg), "api key") {
t.Errorf("%q asks for the API key — it is OpsLog's own, embedded", msg)
}
}
+47
View File
@@ -0,0 +1,47 @@
package main
import (
"testing"
udp "hamlog/internal/integrations/udp"
)
// The text colour is derived from the background, never stored: an operator who
// picks a dark blue must not end up with black text on it in somebody else's
// window and conclude the feature is broken.
func TestHighlightForegroundFollowsTheBackground(t *testing.T) {
var a App
for _, tc := range []struct {
bg string
want udp.RGB
}{
{"#111827", hlWhite}, // near-black
{"#16823C", hlWhite}, // the new-DXCC green
{"#F472B6", hlBlack}, // the watchlist pink
{"#FFFFFF", hlBlack},
{"#E27A18", hlBlack}, // orange
} {
bg, fg := a.colourFor("", tc.bg)
if got, ok := parseHexRGB(tc.bg); !ok || got != bg {
t.Errorf("%s: background came back as %v", tc.bg, bg)
}
if fg != tc.want {
t.Errorf("%s: foreground %v, want %v", tc.bg, fg, tc.want)
}
}
}
// A colour that cannot be read is refused rather than half-read: silently
// becoming black is worse than keeping the default.
func TestHighlightColourParsing(t *testing.T) {
for _, s := range []string{"#F472B6", "f472b6", " #F472B6 "} {
if c, ok := parseHexRGB(s); !ok || c != (udp.RGB{R: 244, G: 114, B: 182}) {
t.Errorf("%q → %v ok=%v", s, c, ok)
}
}
for _, s := range []string{"", "#FFF", "pink", "#GGGGGG", "#F472B6F"} {
if _, ok := parseHexRGB(s); ok {
t.Errorf("%q was accepted", s)
}
}
}