mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Decode ArmorBlock status register from PLC and surface individual statuses on Match Play page.
This commit is contained in:
@@ -72,14 +72,15 @@ func (web *Web) matchPlayHandler(w http.ResponseWriter, r *http.Request) {
|
||||
isReplay := matchResult != nil
|
||||
data := struct {
|
||||
*model.EventSettings
|
||||
PlcIsEnabled bool
|
||||
MatchesByType map[string]MatchPlayList
|
||||
CurrentMatchType string
|
||||
Match *model.Match
|
||||
AllowSubstitution bool
|
||||
IsReplay bool
|
||||
PlcIsEnabled bool
|
||||
MatchesByType map[string]MatchPlayList
|
||||
CurrentMatchType string
|
||||
Match *model.Match
|
||||
AllowSubstitution bool
|
||||
IsReplay bool
|
||||
PlcArmorBlockStatuses map[string]bool
|
||||
}{web.arena.EventSettings, web.arena.Plc.IsEnabled(), matchesByType, currentMatchType, web.arena.CurrentMatch,
|
||||
web.arena.CurrentMatch.ShouldAllowSubstitution(), isReplay}
|
||||
web.arena.CurrentMatch.ShouldAllowSubstitution(), isReplay, web.arena.Plc.GetArmorBlockStatuses()}
|
||||
err = template.ExecuteTemplate(w, "base", data)
|
||||
if err != nil {
|
||||
handleWebErr(w, err)
|
||||
|
||||
Reference in New Issue
Block a user