mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Add cycle time and event status to field monitor (closes #91).
This commit is contained in:
@@ -49,5 +49,6 @@ func (web *Web) fieldMonitorDisplayWebsocketHandler(w http.ResponseWriter, r *ht
|
||||
defer ws.Close()
|
||||
|
||||
// Subscribe the websocket to the notifiers whose messages will be passed on to the client.
|
||||
ws.HandleNotifiers(display.Notifier, web.arena.ArenaStatusNotifier, web.arena.ReloadDisplaysNotifier)
|
||||
ws.HandleNotifiers(display.Notifier, web.arena.ArenaStatusNotifier, web.arena.EventStatusNotifier,
|
||||
web.arena.ReloadDisplaysNotifier)
|
||||
}
|
||||
|
||||
@@ -31,4 +31,5 @@ func TestFieldMonitorDisplayWebsocket(t *testing.T) {
|
||||
// Should get a few status updates right after connection.
|
||||
readWebsocketType(t, ws, "displayConfiguration")
|
||||
readWebsocketType(t, ws, "arenaStatus")
|
||||
readWebsocketType(t, ws, "eventStatus")
|
||||
}
|
||||
|
||||
@@ -31,8 +31,4 @@ func TestPitDisplayWebsocket(t *testing.T) {
|
||||
// Should get a few status updates right after connection.
|
||||
readWebsocketType(t, ws, "displayConfiguration")
|
||||
readWebsocketType(t, ws, "eventStatus")
|
||||
|
||||
// Check forced reloading as that is the only purpose the pit websocket serves.
|
||||
web.arena.ReloadDisplaysNotifier.Notify()
|
||||
readWebsocketType(t, ws, "reload")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user