From 8b5b1aa3ee5e5cf1b1c9c589f73eeac037a101f8 Mon Sep 17 00:00:00 2001 From: PatribotsProgramming Date: Sun, 21 Jan 2024 14:19:39 -0800 Subject: [PATCH] Finalize Intake subsystem, resolves #24 --- src/main/java/frc/robot/subsystems/Intake.java | 2 +- src/main/java/frc/robot/util/Constants.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/Intake.java b/src/main/java/frc/robot/subsystems/Intake.java index ccf2bbc2..96a91d48 100644 --- a/src/main/java/frc/robot/subsystems/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake.java @@ -39,7 +39,7 @@ public Command stopCommand() { } public Trigger hasGamePieceTrigger() { - return new Trigger(() -> (intake.getOutputCurrent() <= 7.0)); + return new Trigger(() -> (intake.getOutputCurrent() > IntakeConstants.HAS_PIECE_CURRENT_THRESHOLD)); } } diff --git a/src/main/java/frc/robot/util/Constants.java b/src/main/java/frc/robot/util/Constants.java index 38d1d4e8..3c611ba5 100644 --- a/src/main/java/frc/robot/util/Constants.java +++ b/src/main/java/frc/robot/util/Constants.java @@ -262,6 +262,8 @@ public static final class IntakeConstants { public static final int INTAKE_FREE_CURRENT_LIMIT_AMPS = 15; public static final int INTAKE_STALL_CURRENT_LIMIT_AMPS = 7; + + public static final int HAS_PIECE_CURRENT_THRESHOLD = 20; } public static final class FieldConstants {