feat: grey line on the world map; fix: trace checkboxes lied about their state

Grey line — the day/night terminator and its twilight band, off by default,
redrawn every minute so a map left open all day is not silently wrong by
evening. Its own Leaflet pane below the overlays, non-interactive, so it never
hides the path or beam nor swallows a click.

The solar maths is pure and was checked against known positions before being
wired to anything: both solstices, the March equinox, the subsolar longitude at
12 UTC, and day/night at Paris, Tokyo, New York, Sydney and Reykjavik across
seasons and hemispheres. That last set is what caught the real bug: the equation
has TWO solutions per meridian and the naive branch put New York in daylight at
02:00 in December — the terminator at +63° where it belongs at −63°. A shaded
map that looks entirely plausible and is exactly mirrored. It now anchors on the
classical terminator and takes the branch nearest it, which is also what makes
the twilight band follow the terminator instead of jumping hemisphere.

Separately, from a Xiegu user: the protocol-trace checkbox does not stay ticked.
It is React state initialised to false on every mount, so a trace still running
came back unticked — the operator ticks it to "switch it on", which switches it
OFF, and the log they send contains no trace at all. Worse than a cosmetic bug:
it silently defeats the one tool asked for to diagnose their radio. Both boxes
(CAT and WinKeyer) now read their real state from the backend.
This commit is contained in:
2026-07-30 18:06:12 +02:00
parent 45e3f3edb8
commit 3b58e39eec
8 changed files with 256 additions and 2 deletions
+11
View File
@@ -14506,6 +14506,17 @@ func (a *App) SetCIVTrace(on bool) {
cat.SetCIVTrace(on)
}
// CIVTraceEnabled and WinkeyerTraceEnabled report whether each trace is running.
//
// The settings dialog needs them. Its checkboxes are React state initialised to
// false on every mount, so a trace left on came back UNTICKED while it was still
// running: the operator ticks the box to \"switch it on\", which switches it off,
// and the log they send then contains no trace at all. Reported by a Xiegu user.
func (a *App) CIVTraceEnabled() bool { return cat.CIVTraceEnabled() }
// WinkeyerTraceEnabled — same, for the keyer trace.
func (a *App) WinkeyerTraceEnabled() bool { return winkeyer.TraceEnabled() }
// WinkeyerConnect opens the serial link using the saved config.
func (a *App) WinkeyerConnect() error {
if a.winkeyer == nil {