mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-10 06:06:47 -04:00
Add field reset screen to alliance station display.
This commit is contained in:
1
arena.go
1
arena.go
@@ -51,7 +51,6 @@ type RealtimeScore struct {
|
|||||||
AutoCommitted bool
|
AutoCommitted bool
|
||||||
TeleopCommitted bool
|
TeleopCommitted bool
|
||||||
FoulsCommitted bool
|
FoulsCommitted bool
|
||||||
FieldReset bool
|
|
||||||
undoScores []Score
|
undoScores []Score
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,8 @@ func RefereeDisplayWebsocketHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
// Don't allow clearing the field until the match is over.
|
// Don't allow clearing the field until the match is over.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
mainArena.redRealtimeScore.FieldReset = true
|
mainArena.allianceStationDisplayScreen = "fieldReset"
|
||||||
mainArena.blueRealtimeScore.FieldReset = true
|
mainArena.allianceStationDisplayNotifier.Notify(nil)
|
||||||
continue // Don't reload.
|
continue // Don't reload.
|
||||||
case "commitMatch":
|
case "commitMatch":
|
||||||
if mainArena.MatchState != POST_MATCH {
|
if mainArena.MatchState != POST_MATCH {
|
||||||
@@ -219,8 +219,8 @@ func RefereeDisplayWebsocketHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
mainArena.redRealtimeScore.FoulsCommitted = true
|
mainArena.redRealtimeScore.FoulsCommitted = true
|
||||||
mainArena.blueRealtimeScore.FoulsCommitted = true
|
mainArena.blueRealtimeScore.FoulsCommitted = true
|
||||||
mainArena.redRealtimeScore.FieldReset = true
|
mainArena.allianceStationDisplayScreen = "fieldReset"
|
||||||
mainArena.blueRealtimeScore.FieldReset = true
|
mainArena.allianceStationDisplayNotifier.Notify(nil)
|
||||||
mainArena.scoringStatusNotifier.Notify(nil)
|
mainArena.scoringStatusNotifier.Notify(nil)
|
||||||
default:
|
default:
|
||||||
websocket.WriteError(fmt.Sprintf("Invalid message type '%s'.", messageType))
|
websocket.WriteError(fmt.Sprintf("Invalid message type '%s'.", messageType))
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ body {
|
|||||||
body[data-mode=logo] {
|
body[data-mode=logo] {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
body[data-mode=fieldReset] {
|
||||||
|
background-color: #0a3;
|
||||||
|
}
|
||||||
|
|
||||||
/* Switching Modes */
|
/* Switching Modes */
|
||||||
.mode {
|
.mode {
|
||||||
@@ -31,7 +33,9 @@ body[data-mode=logo] .mode#logo {
|
|||||||
body[data-mode=match] .mode#match {
|
body[data-mode=match] .mode#match {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
body[data-mode=fieldReset] .mode#fieldReset {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
/* Logo Mode */
|
/* Logo Mode */
|
||||||
#logo #logoImg {
|
#logo #logoImg {
|
||||||
@@ -59,6 +63,21 @@ body[data-mode=match] .mode#match {
|
|||||||
font-size: 500px;
|
font-size: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Field Reset Mode */
|
||||||
|
#fieldReset {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 65%;
|
||||||
|
line-height: 300px;
|
||||||
|
margin: auto auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Match Mode */
|
/* Match Mode */
|
||||||
#match {
|
#match {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -152,3 +171,4 @@ body[data-position=right] #inMatch #blueScore {
|
|||||||
[data-alliance-bg=B], [data-status=B] {
|
[data-alliance-bg=B], [data-status=B] {
|
||||||
background-color: #00c;
|
background-color: #00c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
<div id="logo" class="mode">
|
<div id="logo" class="mode">
|
||||||
<img id="logoImg" src="/static/img/alliance-station-logo.png" alt="logo" />
|
<img id="logoImg" src="/static/img/alliance-station-logo.png" alt="logo" />
|
||||||
</div>
|
</div>
|
||||||
|
<div id="fieldReset" class="mode">FIELD<br />RESET</div>
|
||||||
<script>
|
<script>
|
||||||
// A unique id to differentiate this station's display from its peers.
|
// A unique id to differentiate this station's display from its peers.
|
||||||
var displayId = "{{.DisplayId}}";
|
var displayId = "{{.DisplayId}}";
|
||||||
|
|||||||
Reference in New Issue
Block a user