Send reset signal to PLC on match load and again on match start.

This commit is contained in:
Patrick Fairbank
2020-04-14 20:09:09 -07:00
parent 4e74a7a4cd
commit ad509aed5a
2 changed files with 14 additions and 0 deletions

View File

@@ -214,6 +214,7 @@ func (arena *Arena) LoadMatch(match *model.Match) error {
arena.FieldVolunteers = false
arena.FieldReset = false
arena.ScoringPanelRegistry.resetScoreCommitted()
arena.Plc.ResetMatch()
// Notify any listeners about the new match.
arena.MatchLoadNotifier.Notify()
@@ -404,6 +405,7 @@ func (arena *Arena) Update() {
enabled = true
sendDsPacket = true
}
arena.Plc.ResetMatch()
case WarmupPeriod:
auto = true
enabled = false