Files
groundstation/internal/display/status.go
T
piotr a31bed8aeb feat: independent fullscreen kiosk display foundation (#1)
Kiosk process owns its display lifecycle: waits for X11, keeps the
fullscreen black canvas below video, stops deterministically on signal.
Supervisor starts it before video, restarts only on process death, and
shuts the whole process group down; X11 downtime never restarts the
supervisor. Per-target opener/template abstractions for future MIPI.
2026-09-30 23:12:06 +02:00

24 lines
580 B
Go

package display
// StatusTemplate is the fallback kiosk layout: a cleared black canvas with
// status lines. It is the "no pilot video" state of a display target.
type StatusTemplate struct {
lines []string
}
// NewStatusTemplate builds a template that draws the given status lines.
func NewStatusTemplate(lines ...string) StatusTemplate {
return StatusTemplate{lines: lines}
}
func (t StatusTemplate) Draw(canvas Canvas) {
canvas.Clear()
_, height := canvas.Size()
y := height / 2
for _, line := range t.lines {
canvas.Text(32, y, line)
y += 32
}
canvas.Flush()
}