Actually set AutoEndSwitchOwnership from PLC input.

This commit is contained in:
Patrick Fairbank
2018-09-29 10:05:29 -07:00
parent 8e726abc4e
commit ea638f381a

View File

@@ -753,6 +753,8 @@ func (arena *Arena) handlePlcInput() {
redScore.AutoSwitchOwnershipSec, _ = arena.RedSwitch.GetRedSeconds(matchStartTime, currentTime)
blueScore.AutoScaleOwnershipSec, _ = arena.Scale.GetBlueSeconds(matchStartTime, currentTime)
blueScore.AutoSwitchOwnershipSec, _ = arena.BlueSwitch.GetBlueSeconds(matchStartTime, currentTime)
redScore.AutoEndSwitchOwnership = arena.RedSwitch.GetOwnedBy() == game.RedAlliance
blueScore.AutoEndSwitchOwnership = arena.BlueSwitch.GetOwnedBy() == game.BlueAlliance
} else {
redScore.TeleopScaleOwnershipSec, redScore.TeleopScaleBoostSec =
arena.Scale.GetRedSeconds(teleopStartTime, currentTime)