Fixes autonomous reported time to driver station

The 2 bytes should be reporting the time left in the current period, not
the time total left in the match.
This commit is contained in:
Thad House
2016-09-27 09:31:28 -07:00
parent 3c3e9ef25d
commit e6de8c98c3

View File

@@ -207,8 +207,7 @@ func (dsConn *DriverStationConnection) encodeControlPacket() [22]byte {
case START_MATCH:
fallthrough
case AUTO_PERIOD:
matchSecondsRemaining = mainArena.matchTiming.AutoDurationSec + mainArena.matchTiming.TeleopDurationSec -
int(mainArena.MatchTimeSec())
matchSecondsRemaining = mainArena.matchTiming.AutoDurationSec - int(mainArena.MatchTimeSec())
case PAUSE_PERIOD:
matchSecondsRemaining = mainArena.matchTiming.TeleopDurationSec
case TELEOP_PERIOD: