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:
@@ -629,3 +629,11 @@ func isTimeout(err error) bool {
|
||||
}
|
||||
return strings.Contains(strings.ToLower(err.Error()), "timeout")
|
||||
}
|
||||
|
||||
// TraceEnabled reports whether the protocol trace is running.
|
||||
//
|
||||
// The settings dialog needs it: the checkbox is React state that starts false on
|
||||
// every mount, so a trace switched on stayed on in the backend while the box
|
||||
// reappeared unticked — the operator ticks it again, which switches it OFF, and
|
||||
// the log they then send has no trace in it at all.
|
||||
func TraceEnabled() bool { return traceOn.Load() }
|
||||
|
||||
Reference in New Issue
Block a user