From e6de8c98c365ba23bb6b19edaeaa8696843fd3c7 Mon Sep 17 00:00:00 2001 From: Thad House Date: Tue, 27 Sep 2016 09:31:28 -0700 Subject: [PATCH] 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. --- driver_station_connection.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver_station_connection.go b/driver_station_connection.go index 472c290..dc24002 100644 --- a/driver_station_connection.go +++ b/driver_station_connection.go @@ -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: