Windowed module protocol: every op admitted inside a 3.4s window after the firmware's observed temp poll (cadence 3.5-4.2s measured, stuck-at-last-fetch stale mechanism proven and avoided), acquire/window with panic on dead heartbeat; noise column shows green on/off cycle phase, cable-missing state unchanged
This commit is contained in:
@@ -350,8 +350,9 @@ func (d *display) chipAt(i, n, cols, x, w, y, h int, c rgb) (int, int, int) {
|
||||
|
||||
// Whether rather than how many: over a window this short a count changes faster
|
||||
// than it can be read. The noise chip rides along at the end, presence rather
|
||||
// than health: red is the cable missing, not the cable failing.
|
||||
func (d *display) errChips(x, w, y int, e errs, recentCorrected, noiseMissing uint64) int {
|
||||
// than health: red is the cable missing, not the cable failing, and a present
|
||||
// cable names its cycle phase in green.
|
||||
func (d *display) errChips(x, w, y int, e errs, recentCorrected uint64, nv noiseView) int {
|
||||
n := len(errRows) + 2
|
||||
for i, r := range errRows {
|
||||
c := errColor(r.get(e))
|
||||
@@ -364,9 +365,16 @@ func (d *display) errChips(x, w, y int, e errs, recentCorrected, noiseMissing ui
|
||||
}
|
||||
cx, cw, cy := d.chipAt(len(errRows), n, gridCols, x, w, y, d.chipH(), c)
|
||||
d.centerIn(d.grid, cx, cw, cy+chipPadY, "corrected", c)
|
||||
c = errColor(noiseMissing)
|
||||
c = errColor(nv.missing)
|
||||
label := "noise"
|
||||
if nv.missing == 0 {
|
||||
label = "noise off"
|
||||
if nv.on {
|
||||
label = "noise on"
|
||||
}
|
||||
}
|
||||
cx, cw, cy = d.chipAt(len(errRows)+1, n, gridCols, x, w, y, d.chipH(), c)
|
||||
d.centerIn(d.grid, cx, cw, cy+chipPadY, "noise", c)
|
||||
d.centerIn(d.grid, cx, cw, cy+chipPadY, label, c)
|
||||
return y + d.chipsH()
|
||||
}
|
||||
|
||||
@@ -425,7 +433,7 @@ func correctedStat(v uint64) statCell {
|
||||
return statCell{scaleCount(v), "corrected", col}
|
||||
}
|
||||
|
||||
func (d *display) render(v view, elapsed time.Duration, phy phyDisplay, noiseMissing uint64) error {
|
||||
func (d *display) render(v view, elapsed time.Duration, phy phyDisplay, nv noiseView) error {
|
||||
fb := d.fb
|
||||
fb.fill(uiBg)
|
||||
|
||||
@@ -435,7 +443,7 @@ func (d *display) render(v view, elapsed time.Duration, phy phyDisplay, noiseMis
|
||||
{scaleSI(v.rxPPS), "packets/s", uiFg},
|
||||
snrStat(phy),
|
||||
})
|
||||
d.errChips(x, w, d.nowYs[1], v.window, phy.recent, noiseMissing)
|
||||
d.errChips(x, w, d.nowYs[1], v.window, phy.recent, nv)
|
||||
|
||||
x, w = d.panel(d.sincePanel, v.since.total() > 0 || phy.metresClass == clsBad)
|
||||
d.stats(d.gridB, x, w, d.sinceYs[0], []statCell{
|
||||
|
||||
Reference in New Issue
Block a user