feat: show no-WFB kiosk fallback only while video absent (#2)
Build Ground Station / build (push) Successful in 44s

This commit was merged in pull request #9.
This commit is contained in:
2026-10-01 14:40:24 +02:00
parent 53ab05ce12
commit b169a64ad5
11 changed files with 715 additions and 28 deletions
+25
View File
@@ -0,0 +1,25 @@
package display
// FallbackTemplate is the no-video kiosk layout: a cleared black canvas with
// the fallback lines. While decoded video is present the fallback
// disappears: the canvas stays plain black so the video window keeps
// rendering priority without stale text around or behind it, and the exact
// fallback lines return when video ends.
type FallbackTemplate struct {
fallback StatusTemplate
video *VideoPresence
}
// NewFallbackTemplate builds a template that draws the given fallback lines
// only while the shared presence reports no video.
func NewFallbackTemplate(video *VideoPresence, lines ...string) FallbackTemplate {
return FallbackTemplate{fallback: NewStatusTemplate(lines...), video: video}
}
func (t FallbackTemplate) Draw(canvas Canvas) {
canvas.Clear()
if !t.video.Active() {
drawLines(canvas, t.fallback.lines)
}
canvas.Flush()
}