Liveness spinner: a 30-degree gap punched through the status ring band orbits on the wall clock (one turn per 2 s, all states including link-dead and MEASURING), so a static GOOD panel can never be mistaken for a hung app; one bg-colour stroke capsule at the byte-counter-free clock phase, no new primitives

This commit is contained in:
flamingcow
2026-08-18 19:45:04 -07:00
parent 321c3c5525
commit 222749fbde
+10
View File
@@ -75,6 +75,10 @@ const (
btnBorder = 2 btnBorder = 2
holdDuration = time.Second holdDuration = time.Second
spinGap = math.Pi / 6
spinPunch = 9
spinPeriod = 2 * time.Second
versionSpotSide = 200 versionSpotSide = 200
) )
@@ -386,6 +390,12 @@ func (d *display) drawHeader(phy phyDisplay, hv histView, measuring bool,
d.fb.roundRect(rx, ry, ringD, ringD, ringD/2, col) d.fb.roundRect(rx, ry, ringD, ringD, ringD/2, col)
d.fb.roundRect(rx+ringEdge, ry+ringEdge, ringD-2*ringEdge, ringD-2*ringEdge, d.fb.roundRect(rx+ringEdge, ry+ringEdge, ringD-2*ringEdge, ringD-2*ringEdge,
ringD/2-ringEdge, uiBg) ringD/2-ringEdge, uiBg)
spin := float64(now.UnixNano()%int64(spinPeriod)) / float64(spinPeriod)
cx, cy := float64(rx)+ringD/2, float64(ry)+ringD/2
cr := (ringD - ringEdge) / 2.0
a0, a1 := 2*math.Pi*spin-spinGap/2, 2*math.Pi*spin+spinGap/2
d.fb.stroke(cx+cr*math.Sin(a0), cy-cr*math.Cos(a0),
cx+cr*math.Sin(a1), cy-cr*math.Cos(a1), spinPunch, uiBg)
switch { switch {
case measuring: case measuring:
case good: case good: