Skip to content

Commit

Permalink
Get rid of unused 'Signal Volunteers' button.
Browse files Browse the repository at this point in the history
  • Loading branch information
patfair committed Oct 5, 2023
1 parent 27d4a5a commit 3e13154
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions field/arena.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ type Arena struct {
lastDsPacketTime time.Time
lastPeriodicTaskTime time.Time
EventStatus EventStatus
FieldVolunteers bool
FieldReset bool
AudienceDisplayMode string
SavedMatch *model.Match
Expand Down Expand Up @@ -252,7 +251,6 @@ func (arena *Arena) LoadMatch(match *model.Match) error {
arena.soundsPlayed = make(map[*game.MatchSound]struct{})
arena.RedRealtimeScore = NewRealtimeScore()
arena.BlueRealtimeScore = NewRealtimeScore()
arena.FieldVolunteers = false
arena.FieldReset = false
arena.ScoringPanelRegistry.resetScoreCommitted()
arena.Plc.ResetMatch()
Expand Down
3 changes: 0 additions & 3 deletions static/css/referee_panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ h3 {
.control-button[data-enabled=true] {
opacity: 1;
}
#volunteerButton {
background-color: #90c;
}
#resetButton {
background-color: #093;
}
Expand Down
10 changes: 0 additions & 10 deletions static/js/match_play.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ const abortMatch = function() {
websocket.send("abortMatch");
};

// Sends a websocket message to signal to the volunteers that they may enter the field.
const signalVolunteers = function() {
websocket.send("signalVolunteers");
};

// Sends a websocket message to signal to the teams that they may enter the field.
const signalReset = function() {
websocket.send("signalReset");
Expand Down Expand Up @@ -158,7 +153,6 @@ const handleArenaStatus = function(data) {
case "PRE_MATCH":
$("#startMatch").prop("disabled", !data.CanStartMatch);
$("#abortMatch").prop("disabled", true);
$("#signalVolunteers").prop("disabled", false);
$("#signalReset").prop("disabled", false);
$("#fieldResetRadio").prop("disabled", false);
$("#commitResults").prop("disabled", true);
Expand All @@ -173,7 +167,6 @@ const handleArenaStatus = function(data) {
case "TELEOP_PERIOD":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", false);
$("#signalVolunteers").prop("disabled", true);
$("#signalReset").prop("disabled", true);
$("#fieldResetRadio").prop("disabled", true);
$("#commitResults").prop("disabled", true);
Expand All @@ -184,7 +177,6 @@ const handleArenaStatus = function(data) {
case "POST_MATCH":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", true);
$("#signalVolunteers").prop("disabled", false);
$("#signalReset").prop("disabled", false);
$("#fieldResetRadio").prop("disabled", false);
$("#commitResults").prop("disabled", false);
Expand All @@ -195,7 +187,6 @@ const handleArenaStatus = function(data) {
case "TIMEOUT_ACTIVE":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", false);
$("#signalVolunteers").prop("disabled", true);
$("#signalReset").prop("disabled", true);
$("#fieldResetRadio").prop("disabled", false);
$("#commitResults").prop("disabled", true);
Expand All @@ -206,7 +197,6 @@ const handleArenaStatus = function(data) {
case "POST_TIMEOUT":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", true);
$("#signalVolunteers").prop("disabled", true);
$("#signalReset").prop("disabled", true);
$("#fieldResetRadio").prop("disabled", false);
$("#commitResults").prop("disabled", true);
Expand Down
5 changes: 0 additions & 5 deletions static/js/referee_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ var cycleCard = function(cardButton) {
$(cardButton).attr("data-card", newCard);
};

// Sends a websocket message to signal to the volunteers that they may enter the field.
var signalVolunteers = function() {
websocket.send("signalVolunteers");
};

// Sends a websocket message to signal to the teams that they may enter the field.
var signalReset = function() {
websocket.send("signalReset");
Expand Down
4 changes: 0 additions & 4 deletions templates/match_play.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
onclick="abortMatch();" disabled>
Abort Match
</button>
<button type="button" id="signalVolunteers" class="btn btn-warning btn-lg btn-match-play"
onclick="signalVolunteers();" disabled>
Signal Volunteers
</button>
<button type="button" id="signalReset" class="btn btn-success btn-lg btn-match-play"
onclick="signalReset();" disabled>
Signal Reset
Expand Down
1 change: 0 additions & 1 deletion templates/referee_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ <h3>Fouls</h3>
</div>
<p>Note: Team and rule assignment are optional.</p>
<div id="controlButtons">
<div class="control-button" id="volunteerButton" onclick="signalVolunteers();">Signal Volunteers</div>
<div class="control-button" id="resetButton" onclick="signalReset();">Signal Reset</div>
<div class="control-button" id="commitButton" onclick="commitMatch();">Commit Match</div>
</div>
Expand Down
7 changes: 0 additions & 7 deletions web/match_play.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,6 @@ func (web *Web) matchPlayWebsocketHandler(w http.ResponseWriter, r *http.Request
ws.WriteError(err.Error())
continue
}
case "signalVolunteers":
if web.arena.MatchState != field.PostMatch && web.arena.MatchState != field.PreMatch {
// Don't allow clearing the field until the match is over.
continue
}
web.arena.FieldVolunteers = true
continue // Skip sending an arena status update.
case "signalReset":
if web.arena.MatchState != field.PostMatch && web.arena.MatchState != field.PreMatch {
// Don't allow clearing the field until the match is over.
Expand Down
6 changes: 0 additions & 6 deletions web/referee_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,6 @@ func (web *Web) refereePanelWebsocketHandler(w http.ResponseWriter, r *http.Requ
}
cards[strconv.Itoa(args.TeamId)] = args.Card
web.arena.RealtimeScoreNotifier.Notify()
case "signalVolunteers":
if web.arena.MatchState != field.PostMatch {
// Don't allow clearing the field until the match is over.
continue
}
web.arena.FieldVolunteers = true
case "signalReset":
if web.arena.MatchState != field.PostMatch {
// Don't allow clearing the field until the match is over.
Expand Down

0 comments on commit 3e13154

Please sign in to comment.