From d8894dcf1c6e5534105a71438dca9e0064b685b3 Mon Sep 17 00:00:00 2001 From: Justinpham17386769 Date: Sat, 29 Aug 2026 19:15:20 -0700 Subject: [PATCH] set motor configs --- .../java/frc/robot/constants/ConstFreeSpin.java | 14 ++++++++++++-- .../java/frc/robot/constants/ConstPositional.java | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/constants/ConstFreeSpin.java b/src/main/java/frc/robot/constants/ConstFreeSpin.java index e0e1c23..328658b 100644 --- a/src/main/java/frc/robot/constants/ConstFreeSpin.java +++ b/src/main/java/frc/robot/constants/ConstFreeSpin.java @@ -8,6 +8,7 @@ import static edu.wpi.first.units.Units.RPM; import com.ctre.phoenix6.configs.TalonFXConfiguration; +import com.ctre.phoenix6.signals.NeutralModeValue; import edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap; import edu.wpi.first.units.measure.AngularVelocity; @@ -66,6 +67,15 @@ public class ConstFreeSpin { flywheelSpeedMap.put(Inches.of(150).in(Inches), RPM.of(3700).in(RPM)); flywheelSpeedMap.put(Inches.of(140).in(Inches), RPM.of(3600).in(RPM)); flywheelSpeedMap.put(Inches.of(120).in(Inches), RPM.of(3400).in(RPM)); - flywheelSpeedMap.put(Inches.of(0).in(Inches), RPM.of(3400).in(RPM)); // Configure TalonFXConfiguration objects here + + INTAKE_ROLLERS_EAST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + INTAKE_ROLLERS_WEST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + HOTDOG_ROLLERS_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + TRANSFER_BELT_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Brake; + AGITATOR_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + FLYWHEEL_EAST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + FLYWHEEL_WEST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + TRANSFER_RAMP_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Brake; + } -} +} \ No newline at end of file diff --git a/src/main/java/frc/robot/constants/ConstPositional.java b/src/main/java/frc/robot/constants/ConstPositional.java index fba9ab9..8899392 100644 --- a/src/main/java/frc/robot/constants/ConstPositional.java +++ b/src/main/java/frc/robot/constants/ConstPositional.java @@ -9,6 +9,7 @@ import static edu.wpi.first.units.Units.Seconds; import com.ctre.phoenix6.configs.TalonFXConfiguration; +import com.ctre.phoenix6.signals.NeutralModeValue; import edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap; import edu.wpi.first.units.Units; @@ -104,5 +105,8 @@ public class ConstPositional { INTAKE_SLIDE_CONFIGURATION.Feedback.SensorToMechanismRatio = 1.0 / ((10.0 / 30.0) * (1.0 * Math.PI)); HOOD_PIVOT_CONFIGURATION.Feedback.SensorToMechanismRatio = 1.0 / ((10.0 / 130.0) * (12.0 / 30.0)); TURRET_CONFIGURATION.Feedback.SensorToMechanismRatio = 1.0 / ((12.0 / 58.0) * (10.0 / 90.0)); + + INTAKE_SLIDE_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Brake; + HOOD_PIVOT_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Brake; } }