From 54a237993d4429f4a8bd34bd80ab9323b4dc93a6 Mon Sep 17 00:00:00 2001 From: Emily Zhai Date: Fri, 5 Apr 2024 08:27:01 -0700 Subject: [PATCH] change function light calls to detect whether there is a note in the collector --- .../java/competition/subsystems/lights/LightSubsystem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/competition/subsystems/lights/LightSubsystem.java b/src/main/java/competition/subsystems/lights/LightSubsystem.java index 095767bd..28202983 100644 --- a/src/main/java/competition/subsystems/lights/LightSubsystem.java +++ b/src/main/java/competition/subsystems/lights/LightSubsystem.java @@ -113,10 +113,10 @@ public LightsStateMessage getCurrentState() { // 0 as no camera working, 1 as all camera working, 2 as some camera working currentState = LightsStateMessage.getStringValueFromInt(base + vision.cameraWorkingState()); } else { - if (shooter.isReadyToFire() && collector.checkSensorForLights()) { + if (shooter.isReadyToFire() && collector.confidentlyHasControlOfNote()) { currentState = LightsStateMessage.ReadyToShoot; - } else if (collector.checkSensorForLights()) { + } else if (collector.confidentlyHasControlOfNote()) { currentState = LightsStateMessage.RobotContainsNote; } else if (shooter.isReadyToFire()) {