From ea638f381a8c8c6901bf119897661382a257e5f2 Mon Sep 17 00:00:00 2001 From: Patrick Fairbank Date: Sat, 29 Sep 2018 10:05:29 -0700 Subject: [PATCH] Actually set AutoEndSwitchOwnership from PLC input. --- field/arena.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/field/arena.go b/field/arena.go index 451c305..6511c71 100644 --- a/field/arena.go +++ b/field/arena.go @@ -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)