Skip to content

Commit

Permalink
AmpSpeaker.UpdateState isPlayoff
Browse files Browse the repository at this point in the history
  • Loading branch information
cpapplefamily committed Nov 30, 2024
1 parent 765b769 commit dc0701d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions field/arena.go
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,10 @@ func (arena *Arena) handlePlcInputOutput() {
redAmpSpeaker := &arena.RedRealtimeScore.CurrentScore.AmpSpeaker
blueAmpSpeaker := &arena.BlueRealtimeScore.CurrentScore.AmpSpeaker
redAmpSpeaker.UpdateState(
redAmpNoteCount, redSpeakerNoteCount, redAmplifyButton, redCoopButton, matchStartTime, currentTime,
redAmpNoteCount, redSpeakerNoteCount, redAmplifyButton, redCoopButton, matchStartTime, currentTime, arena.CurrentMatch.Type == model.Playoff,
)
blueAmpSpeaker.UpdateState(
blueAmpNoteCount, blueSpeakerNoteCount, blueAmplifyButton, blueCoopButton, matchStartTime, currentTime,
blueAmpNoteCount, blueSpeakerNoteCount, blueAmplifyButton, blueCoopButton, matchStartTime, currentTime,arena.CurrentMatch.Type == model.Playoff,
)
if !oldRedScore.Equals(redScore) || !oldBlueScore.Equals(blueScore) ||
oldRedAmplifiedTimeRemainingSec != arena.RedRealtimeScore.AmplifiedTimeRemainingSec ||
Expand Down Expand Up @@ -1167,10 +1167,10 @@ func (arena *Arena) handlePlcInputOutput() {
redAmpSpeaker := &arena.RedRealtimeScore.CurrentScore.AmpSpeaker
blueAmpSpeaker := &arena.BlueRealtimeScore.CurrentScore.AmpSpeaker
redAmpSpeaker.UpdateState(
redAmpNoteCount, redSpeakerNoteCount, redAmplifyButton, redCoopButton, matchStartTime, currentTime,
redAmpNoteCount, redSpeakerNoteCount, redAmplifyButton, redCoopButton, matchStartTime, currentTime,arena.CurrentMatch.Type == model.Playoff,
)
blueAmpSpeaker.UpdateState(
blueAmpNoteCount, blueSpeakerNoteCount, blueAmplifyButton, blueCoopButton, matchStartTime, currentTime,
blueAmpNoteCount, blueSpeakerNoteCount, blueAmplifyButton, blueCoopButton, matchStartTime, currentTime,arena.CurrentMatch.Type == model.Playoff,
)
if !oldRedScore.Equals(redScore) || !oldBlueScore.Equals(blueScore) ||
oldRedAmplifiedTimeRemainingSec != arena.RedRealtimeScore.AmplifiedTimeRemainingSec ||
Expand Down
12 changes: 8 additions & 4 deletions web/scoring_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ func (web *Web) scoringPanelWebsocketHandler(w http.ResponseWriter, r *http.Requ

_matchStartTime,

_currentTime)
_currentTime,
web.arena.CurrentMatch.Type == model.Playoff)
log.Printf("Speaker Pressed")
scoreChanged = true
case "O":
Expand Down Expand Up @@ -216,7 +217,8 @@ func (web *Web) scoringPanelWebsocketHandler(w http.ResponseWriter, r *http.Requ

_matchStartTime,

_currentTime)
_currentTime,
web.arena.CurrentMatch.Type == model.Playoff)
log.Printf("Amp Pressed")
scoreChanged = true
case "U":
Expand Down Expand Up @@ -273,7 +275,8 @@ func (web *Web) scoringPanelWebsocketHandler(w http.ResponseWriter, r *http.Requ

_matchStartTime,

_currentTime)
_currentTime,
web.arena.CurrentMatch.Type == model.Playoff)
log.Printf("amplifyButton Pressed")
scoreChanged = true
case "coopButton":
Expand All @@ -292,7 +295,8 @@ func (web *Web) scoringPanelWebsocketHandler(w http.ResponseWriter, r *http.Requ

_matchStartTime,

_currentTime)
_currentTime,
web.arena.CurrentMatch.Type == model.Playoff)
log.Printf("coopButton Pressed")
scoreChanged = true
}
Expand Down

0 comments on commit dc0701d

Please sign in to comment.