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
jschenke488 committed Oct 29, 2024
1 parent c9cdceb commit 77cdbc7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
2 changes: 0 additions & 2 deletions field/arena.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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 @@ -253,7 +252,6 @@ func (arena *Arena) LoadMatch(match *model.Match) error {
arena.soundsPlayed = make(map[*game.MatchSound]struct{})
arena.RedScore = new(game.Score)
arena.BlueScore = new(game.Score)
arena.FieldVolunteers = false
arena.FieldReset = false
arena.Plc.ResetMatch()

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 @@ -28,11 +28,6 @@ var abortMatch = function() {
websocket.send("abortMatch");
};

// 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 Expand Up @@ -179,7 +174,6 @@ var handleArenaStatus = function(data) {
$("#matchStartReason").html(data.CanStartMatchReason);
}
$("#abortMatch").prop("disabled", true);
$("#signalVolunteers").prop("disabled", false);
$("#signalReset").prop("disabled", false);
$("#commitResults").prop("disabled", true);
$("#discardResults").prop("disabled", true);
Expand All @@ -205,7 +199,6 @@ var handleArenaStatus = function(data) {
case "TELEOP_PERIOD":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", false);
$("#signalVolunteers").prop("disabled", true);
$("#signalReset").prop("disabled", true);
$("#commitResults").prop("disabled", true);
$("#discardResults").prop("disabled", true);
Expand All @@ -221,7 +214,6 @@ var handleArenaStatus = function(data) {
case "POST_MATCH":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", true);
$("#signalVolunteers").prop("disabled", false);
$("#signalReset").prop("disabled", false);
$("#commitResults").prop("disabled", false);
$("#discardResults").prop("disabled", false);
Expand All @@ -237,7 +229,6 @@ var handleArenaStatus = function(data) {
case "TIMEOUT_ACTIVE":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", false);
$("#signalVolunteers").prop("disabled", true);
$("#signalReset").prop("disabled", true);
$("#commitResults").prop("disabled", true);
$("#discardResults").prop("disabled", true);
Expand All @@ -253,7 +244,6 @@ var handleArenaStatus = function(data) {
case "POST_TIMEOUT":
$("#startMatch").prop("disabled", true);
$("#abortMatch").prop("disabled", true);
$("#signalVolunteers").prop("disabled", true);
$("#signalReset").prop("disabled", true);
$("#commitResults").prop("disabled", true);
$("#discardResults").prop("disabled", true);
Expand Down
4 changes: 0 additions & 4 deletions templates/match_play.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,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
7 changes: 0 additions & 7 deletions web/match_play.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,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 // Don't reload.
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

0 comments on commit 77cdbc7

Please sign in to comment.