mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
WIP: Austin's changes at beta testing day.
This commit is contained in:
10
arena.go
10
arena.go
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
const (
|
||||
arenaLoopPeriodMs = 10
|
||||
dsPacketPeriodMs = 250
|
||||
dsPacketPeriodMs = 20
|
||||
matchEndScoreDwellSec = 3
|
||||
)
|
||||
|
||||
@@ -335,6 +335,14 @@ func (arena *Arena) StartMatch() error {
|
||||
db.SaveMatch(arena.currentMatch)
|
||||
}
|
||||
|
||||
// At the beginning of the match, save the missed packet count.
|
||||
for _, allianceStation := range arena.AllianceStations {
|
||||
if allianceStation.DsConn != nil {
|
||||
allianceStation.DsConn.DriverStationStatus.MissedOffset =
|
||||
allianceStation.DsConn.DriverStationStatus.MissedPacketCount
|
||||
}
|
||||
}
|
||||
|
||||
arena.MatchState = START_MATCH
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user