Skip to content

Commit 7828dd0

Browse files
committed
Fix conversion of currentActionTime to ref messages
1 parent 7a23f28 commit 7828dd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/app/publish/messagegenerator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (g *MessageGenerator) StateToRefereeMessage(matchState *state.State) (r *st
102102
*r.StageTimeLeft = matchState.StageTimeLeft.Nanos / 1000
103103
*r.BlueTeamOnPositiveHalf = *matchState.TeamInfo(state.Team_BLUE).OnPositiveHalf
104104
r.NextCommand = mapCommand(matchState.NextCommand)
105-
*r.CurrentActionTimeRemaining = matchState.CurrentActionTimeRemaining.Nanos / 1000
105+
*r.CurrentActionTimeRemaining = int32(matchState.CurrentActionTimeRemaining.Seconds)*1_000_000 + matchState.CurrentActionTimeRemaining.Nanos/1000
106106

107107
updateTeam(r.Yellow, matchState.TeamInfo(state.Team_YELLOW))
108108
updateTeam(r.Blue, matchState.TeamInfo(state.Team_BLUE))

0 commit comments

Comments
 (0)