From c087765cb538697d60632dd5da795f8ecec3aac2 Mon Sep 17 00:00:00 2001 From: Arnav495 Date: Wed, 18 Feb 2026 10:29:10 -0800 Subject: [PATCH] Fix mixed up motors. --- .../pathplanner/paths/Example Path.path | 77 ------------------- .../frc/robot/subsystems/Intake/Intake.java | 15 ++-- 2 files changed, 7 insertions(+), 85 deletions(-) delete mode 100644 src/main/deploy/pathplanner/paths/Example Path.path diff --git a/src/main/deploy/pathplanner/paths/Example Path.path b/src/main/deploy/pathplanner/paths/Example Path.path deleted file mode 100644 index 8cb5742..0000000 --- a/src/main/deploy/pathplanner/paths/Example Path.path +++ /dev/null @@ -1,77 +0,0 @@ -{ - "version": "2025.0", - "waypoints": [ - { - "anchor": { - "x": 6.73143534994069, - "y": 6.514994068801898 - }, - "prevControl": null, - "nextControl": { - "x": 7.0757295373665485, - "y": 5.621981020166073 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.710521945432978, - "y": 4.8795966785290625 - }, - "prevControl": { - "x": 7.1295255041518395, - "y": 5.6112218268090155 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "pointTowardsZones": [], - "eventMarkers": [ - { - "name": "Index", - "waypointRelativePos": 0.5894263217097863, - "endWaypointRelativePos": 1.0, - "command": { - "type": "named", - "data": { - "name": "Intake" - } - } - }, - { - "name": "Index", - "waypointRelativePos": 0.589426321709788, - "endWaypointRelativePos": 1.0, - "command": { - "type": "named", - "data": { - "name": "Index" - } - } - } - ], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, - "nominalVoltage": 12.0, - "unlimited": false - }, - "goalEndState": { - "velocity": 0, - "rotation": 0.0 - }, - "reversed": false, - "folder": null, - "idealStartingState": { - "velocity": 0, - "rotation": -6.7298911483521735 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/java/frc/robot/subsystems/Intake/Intake.java b/src/main/java/frc/robot/subsystems/Intake/Intake.java index b4a29f7..bee1dc8 100644 --- a/src/main/java/frc/robot/subsystems/Intake/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake/Intake.java @@ -5,7 +5,6 @@ import com.ctre.phoenix6.configs.TalonFXConfiguration; import com.ctre.phoenix6.controls.Follower; import com.ctre.phoenix6.controls.MotionMagicVoltage; import com.ctre.phoenix6.hardware.TalonFX; -import com.ctre.phoenix6.signals.InvertedValue; import com.ctre.phoenix6.signals.MotorAlignmentValue; import com.ctre.phoenix6.signals.NeutralModeValue; @@ -37,11 +36,11 @@ public class Intake extends SubsystemBase { // create the motors /** Motor to move the roller */ - private TalonFX rollerMotor = new TalonFX(IdConstants.RIGHT_MOTOR_ID, Constants.CANIVORE_SUB); + private TalonFX rollerMotor = new TalonFX(IdConstants.ROLLER_MOTOR_ID, Constants.CANIVORE_SUB); /** Right motor (master) */ - private TalonFX rightMotor = new TalonFX(IdConstants.LEFT_MOTOR_ID, Constants.CANIVORE_SUB); + private TalonFX rightMotor = new TalonFX(IdConstants.RIGHT_MOTOR_ID, Constants.CANIVORE_SUB); /** Left motor (slave) */ - private TalonFX leftMotor = new TalonFX(IdConstants.ROLLER_MOTOR_ID, Constants.CANIVORE_SUB); + private TalonFX leftMotor = new TalonFX(IdConstants.LEFT_MOTOR_ID, Constants.CANIVORE_SUB); /** Motor characteristics for the roller motor, a single Kraken X44 (aka gearbox) */ private final DCMotor dcMotorRoller = DCMotor.getKrakenX44(1); @@ -75,9 +74,9 @@ public class Intake extends SubsystemBase { // config the current limits (low value for testing) rollerConfig.CurrentLimits - .withStatorCurrentLimit(IntakeConstants.EXTENDER_CURRENT_LIMITS) + .withStatorCurrentLimit(IntakeConstants.ROLLER_CURRENT_LIMITS) .withStatorCurrentLimitEnable(true) - .withSupplyCurrentLimit(IntakeConstants.EXTENDER_CURRENT_LIMITS) + .withSupplyCurrentLimit(IntakeConstants.ROLLER_CURRENT_LIMITS) .withSupplyCurrentLimitEnable(true); // config Slot 0 PID params @@ -100,9 +99,9 @@ public class Intake extends SubsystemBase { // config the current limits (low value for testing) config.CurrentLimits - .withStatorCurrentLimit(IntakeConstants.ROLLER_CURRENT_LIMITS) + .withStatorCurrentLimit(IntakeConstants.EXTENDER_CURRENT_LIMITS) .withStatorCurrentLimitEnable(true) - .withSupplyCurrentLimit(IntakeConstants.ROLLER_CURRENT_LIMITS) + .withSupplyCurrentLimit(IntakeConstants.EXTENDER_CURRENT_LIMITS) .withSupplyCurrentLimitEnable(true); // config Slot 0 PID params -- 2.39.5