feat: publish adaptive-link OSD contract and keep overlay above video (#3)
This commit is contained in:
@@ -96,7 +96,14 @@ func TestBuildTargetOSDLayerRendersPublishedSnapshots(t *testing.T) {
|
||||
publisher := osd.NewFilePublisher(state, nil)
|
||||
defer publisher.Close()
|
||||
|
||||
snapshot := osd.Snapshot{Sequence: 11, Armed: true, Power: true}
|
||||
snapshot := osd.Snapshot{
|
||||
Sequence: 11,
|
||||
Armed: true,
|
||||
OpConfig: osd.OperatorConfig{MaxPower: 95},
|
||||
Policy: osd.GSPolicy{Pending: true},
|
||||
Ack: osd.VTXAck{Pending: true, Lifecycle: osd.VTXLifecyclePending},
|
||||
Link: osd.GSObservedLink{Known: false},
|
||||
}
|
||||
publisher.Publish(snapshot)
|
||||
deadline := time.Now().Add(2 * time.Second)
|
||||
for time.Now().Before(deadline) {
|
||||
@@ -117,7 +124,7 @@ func TestBuildTargetOSDLayerRendersPublishedSnapshots(t *testing.T) {
|
||||
surface := &recordingCanvas{width: 800, height: 600}
|
||||
osdLayer.Template.Draw(surface)
|
||||
|
||||
want := []string{"ARM ARMED", "PWR ON"}
|
||||
want := []string{"ARM ARMED", "VTX tbl:-- ceil:95 req:-- ack:--"}
|
||||
if len(surface.lines) != len(want) {
|
||||
t.Fatalf("OSD lines=%q want %q from the supervisor-published snapshot", surface.lines, want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user