From 5f0e776a327befb7995628659a7194e5aa69d03c Mon Sep 17 00:00:00 2001 From: Jack Lingle Date: Wed, 13 Mar 2024 09:10:41 -0400 Subject: [PATCH] update logic --- .../frc/robot/subsystems/intake/IntakeSubsystem.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 9acaae1f..372427da 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -78,7 +78,7 @@ private void idle() { .getAsBoolean())) { // dont seek if note in uptake or shotoer deck state = State.SEEKING; } else if (action == IntakeAction.REVERSE - || inputs.noteSensed) { // reverse if note is found + || (inputs.noteSensed && noteInShooterDeck.getAsBoolean())) { // reverse if note is found state = State.REVERSING; } else if (action == IntakeAction.OVERRIDE) { state = State.OVERRIDE; @@ -92,8 +92,11 @@ private void seeking() { if (action != IntakeAction.INTAKE) { state = State.IDLE; } - - io.setIntakeVoltage(IntakeConstants.intakePower); + if(!inputs.noteSensed) { // run until note is in uptake + io.setIntakeVoltage(IntakeConstants.intakePower); + } else { + io.setIntakeVoltage(0); + } io.setBeltVoltage(IntakeConstants.beltPower); }