From 7735d208a8871354b571acffcb21591b8a8987a9 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 16 May 2026 20:21:55 -0700 Subject: [PATCH 01/10] I created roters subsytem James Justin --- src/main/java/frc/robot/DeviceIDs.java | 9 ++ .../java/frc/robot/constants/ConstRotors.java | 13 +++ .../java/frc/robot/subsystems/Rotors.java | 110 +++++++++++++++++- 3 files changed, 131 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/DeviceIDs.java b/src/main/java/frc/robot/DeviceIDs.java index ad9646e..90c559b 100644 --- a/src/main/java/frc/robot/DeviceIDs.java +++ b/src/main/java/frc/robot/DeviceIDs.java @@ -38,6 +38,15 @@ public static class drivetrainIDs { // Rotor and Motion IDs: 10~29 public static class rotorIDs { + public static final int SERIALIZER_ROLLERS_CAN = 11; + public static final int INTAKE_ROLLERS_WEST_CAN = 12; + public static final int INTAKE_ROLLERS_EAST_CAN = 13; + public static final int TRANSFER_ROLLERS_WEST_CAN = 14; + public static final int TRANSFER_ROLLERS_EAST_CAN = 15; + public static final int FLYWHEEL_ROLLERS_WEST_CAN = 16; + public static final int FLYWHEEL_ROLLERS_EAST_CAN = 17; + public static final int FLYWHEEL_WEST_FOLLOWER = 18; + public static final int FLYWHEEL_EAST_FOLLOWER = 19; } diff --git a/src/main/java/frc/robot/constants/ConstRotors.java b/src/main/java/frc/robot/constants/ConstRotors.java index 673cac9..a03bc0a 100644 --- a/src/main/java/frc/robot/constants/ConstRotors.java +++ b/src/main/java/frc/robot/constants/ConstRotors.java @@ -4,7 +4,20 @@ package frc.robot.constants; +import com.ctre.phoenix6.configs.TalonFXConfiguration; + /** Add your docs here. */ public class ConstRotors { + public static final TalonFXConfiguration SERIALIZER_ROLLERS_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration INTAKE_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration INTAKE_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration TRANSFER_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration TRANSFER_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration FLYWHEEL_EAST_FOLLOWER_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration FLYWHEEL_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration FLYWHEEL_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration FLYWHEEL_WEST_FOLLOWER_CONFIGURATION = new TalonFXConfiguration(); + public static final double STOP = 0; + } diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index fc2fd8f..56559a7 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -4,17 +4,125 @@ package frc.robot.subsystems; +import com.ctre.phoenix6.hardware.TalonFX; + import edu.wpi.first.epilogue.Logged; +import edu.wpi.first.units.measure.AngularVelocity; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.DeviceIDs; +import frc.robot.DeviceIDs.rotorIDs; +import frc.robot.constants.ConstRotors; @Logged public class Rotors extends SubsystemBase { + final TalonFX serializerRollers = new TalonFX(rotorIDs.SERIALIZER_ROLLERS_CAN); + final TalonFX intakeRollersWest = new TalonFX(rotorIDs.INTAKE_ROLLERS_WEST_CAN); + final TalonFX intakeRollersEast = new TalonFX(rotorIDs.INTAKE_ROLLERS_EAST_CAN); + final TalonFX transferRollersWest = new TalonFX((rotorIDs.TRANSFER_ROLLERS_WEST_CAN)); + final TalonFX transferRollersEast = new TalonFX((rotorIDs.TRANSFER_ROLLERS_EAST_CAN)); + final TalonFX flywheelRollersWest = new TalonFX((rotorIDs.FLYWHEEL_ROLLERS_WEST_CAN)); + final TalonFX flywheelRollersEast = new TalonFX((rotorIDs.FLYWHEEL_EAST_FOLLOWER)); + final TalonFX flywheelWestFollower = new TalonFX((rotorIDs.TRANSFER_ROLLERS_WEST_CAN)); + final TalonFX flywheelEastFollower = new TalonFX(rotorIDs.FLYWHEEL_EAST_FOLLOWER); + /** Creates a new Rotors. */ public Rotors() { + serializerRollers.getConfigurator().apply(ConstRotors.SERIALIZER_ROLLERS_CONFIGURATION); + intakeRollersEast.getConfigurator().apply(ConstRotors.INTAKE_ROLLERS_EAST_CONFIGURATION); + intakeRollersWest.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_WEST_CONFIGURATION); + transferRollersEast.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_EAST_CONFIGURATION); + transferRollersWest.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_WEST_CONFIGURATION); + flywheelRollersEast.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_EAST_CONFIGURATION); + flywheelRollersEast.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_EAST_CONFIGURATION); + flywheelEastFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_FOLLOWER_CONFIGURATION); + flywheelWestFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_FOLLOWER_CONFIGURATION); + + } + + public AngularVelocity getSerializerRollers() { + return serializerRollers.getVelocity().getValue(); + + } + + public AngularVelocity getIntakeRollersEast() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getIntakeRollersWest() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getTransferRollersEast() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getTransferRollersWest() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getFlywheelRollersEast() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getFlywheelRollersWest() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getFlywheelEastFollower() { + return serializerRollers.getVelocity().getValue(); + } + + public AngularVelocity getFlywheelWestFollower() { + return serializerRollers.getVelocity().getValue(); + } + + public void setSerializerRollers(double speed) { + serializerRollers.set(speed); + + } + + public void intakeRollersEast(double speed) { + intakeRollersWest.set(speed); + + } + + public void intakeRollersWest(double speed) { + intakeRollersEast.set(speed); + + } + + public void transferRollersEast(double speed) { + transferRollersEast.set(speed); + + } + + public void transferRollersWest(double speed) { + transferRollersWest.set(speed); + + } + + public void flywheelRollersEast(double speed) { + flywheelEastFollower.set(speed); + + } + + public void flywheelRollersWest(double speed) { + flywheelRollersWest.set(speed); + + } + + public void flywheelWestFollower(double speed) { + flywheelRollersWest.set(speed); + + } + + public void flywheelEastFollower(double speed) { + flywheelEastFollower.set(speed); + } @Override public void periodic() { - // This method will be called once per scheduler run + } } From 815d856c1e4117847ba3a9b1f93a6d029e23997f Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Fri, 22 May 2026 19:59:35 -0700 Subject: [PATCH 02/10] Fixed names and call functions --- src/main/java/frc/robot/DeviceIDs.java | 8 +- .../java/frc/robot/subsystems/Rotors.java | 85 ++++++++----------- 2 files changed, 41 insertions(+), 52 deletions(-) diff --git a/src/main/java/frc/robot/DeviceIDs.java b/src/main/java/frc/robot/DeviceIDs.java index 90c559b..45487ac 100644 --- a/src/main/java/frc/robot/DeviceIDs.java +++ b/src/main/java/frc/robot/DeviceIDs.java @@ -43,10 +43,10 @@ public static class rotorIDs { public static final int INTAKE_ROLLERS_EAST_CAN = 13; public static final int TRANSFER_ROLLERS_WEST_CAN = 14; public static final int TRANSFER_ROLLERS_EAST_CAN = 15; - public static final int FLYWHEEL_ROLLERS_WEST_CAN = 16; - public static final int FLYWHEEL_ROLLERS_EAST_CAN = 17; - public static final int FLYWHEEL_WEST_FOLLOWER = 18; - public static final int FLYWHEEL_EAST_FOLLOWER = 19; + public static final int FLYWHEEL_WEST_CAN = 16; + public static final int FLYWHEEL_EAST_CAN = 17; + public static final int FLYWHEEL_WEST_FOLLOWER_CAN = 18; + public static final int FLYWHEEL_EAST_FOLLOWER_CAN = 19; } diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index 56559a7..d2bccfb 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -8,8 +8,8 @@ import edu.wpi.first.epilogue.Logged; import edu.wpi.first.units.measure.AngularVelocity; +import edu.wpi.first.units.measure.Velocity; import edu.wpi.first.wpilibj2.command.SubsystemBase; -import frc.robot.DeviceIDs; import frc.robot.DeviceIDs.rotorIDs; import frc.robot.constants.ConstRotors; @@ -20,105 +20,94 @@ public class Rotors extends SubsystemBase { final TalonFX intakeRollersEast = new TalonFX(rotorIDs.INTAKE_ROLLERS_EAST_CAN); final TalonFX transferRollersWest = new TalonFX((rotorIDs.TRANSFER_ROLLERS_WEST_CAN)); final TalonFX transferRollersEast = new TalonFX((rotorIDs.TRANSFER_ROLLERS_EAST_CAN)); - final TalonFX flywheelRollersWest = new TalonFX((rotorIDs.FLYWHEEL_ROLLERS_WEST_CAN)); - final TalonFX flywheelRollersEast = new TalonFX((rotorIDs.FLYWHEEL_EAST_FOLLOWER)); - final TalonFX flywheelWestFollower = new TalonFX((rotorIDs.TRANSFER_ROLLERS_WEST_CAN)); - final TalonFX flywheelEastFollower = new TalonFX(rotorIDs.FLYWHEEL_EAST_FOLLOWER); + final TalonFX flywheelRollersWest = new TalonFX((rotorIDs.FLYWHEEL_WEST_CAN)); + final TalonFX flywheelRollersEast = new TalonFX((rotorIDs.FLYWHEEL_EAST_CAN)); + final TalonFX flywheelWestFollower = new TalonFX((rotorIDs.FLYWHEEL_WEST_FOLLOWER_CAN)); + final TalonFX flywheelEastFollower = new TalonFX(rotorIDs.FLYWHEEL_EAST_FOLLOWER_CAN); /** Creates a new Rotors. */ public Rotors() { serializerRollers.getConfigurator().apply(ConstRotors.SERIALIZER_ROLLERS_CONFIGURATION); intakeRollersEast.getConfigurator().apply(ConstRotors.INTAKE_ROLLERS_EAST_CONFIGURATION); - intakeRollersWest.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_WEST_CONFIGURATION); + intakeRollersWest.getConfigurator().apply(ConstRotors.INTAKE_ROLLERS_WEST_CONFIGURATION); transferRollersEast.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_EAST_CONFIGURATION); transferRollersWest.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_WEST_CONFIGURATION); flywheelRollersEast.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_EAST_CONFIGURATION); - flywheelRollersEast.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_EAST_CONFIGURATION); + flywheelRollersWest.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_WEST_CONFIGURATION); flywheelEastFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_FOLLOWER_CONFIGURATION); flywheelWestFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_FOLLOWER_CONFIGURATION); - } - public AngularVelocity getSerializerRollers() { + public AngularVelocity getSerializerRollersVelocity() { return serializerRollers.getVelocity().getValue(); - } - public AngularVelocity getIntakeRollersEast() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getIntakeRollersEastVelocity() { + return intakeRollersEast.getVelocity().getValue(); } - public AngularVelocity getIntakeRollersWest() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getIntakeRollersWestVelocity() { + return intakeRollersWest.getVelocity().getValue(); } - public AngularVelocity getTransferRollersEast() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getTransferRollersEastVelocity() { + return transferRollersEast.getVelocity().getValue(); } - public AngularVelocity getTransferRollersWest() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getTransferRollersWestVelocity() { + return transferRollersWest.getVelocity().getValue(); } - public AngularVelocity getFlywheelRollersEast() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getFlywheelRollersEastVelocity() { + return flywheelRollersEast.getVelocity().getValue(); } - public AngularVelocity getFlywheelRollersWest() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getFlywheelRollersWestVelocity() { + return flywheelRollersWest.getVelocity().getValue(); } - public AngularVelocity getFlywheelEastFollower() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getFlywheelEastFollowerVelocity() { + return flywheelEastFollower.getVelocity().getValue(); } - public AngularVelocity getFlywheelWestFollower() { - return serializerRollers.getVelocity().getValue(); + public AngularVelocity getFlywheelWestFollowerVelocity() { + return flywheelWestFollower.getVelocity().getValue(); } - public void setSerializerRollers(double speed) { + public void setSerializerRollersSpeed(double speed) { serializerRollers.set(speed); - - } - - public void intakeRollersEast(double speed) { - intakeRollersWest.set(speed); - } - public void intakeRollersWest(double speed) { + public void intakeRollersEastSpeed(double speed) { intakeRollersEast.set(speed); + } + public void intakeRollersWestSpeed(double speed) { + intakeRollersWest.set(speed); } - public void transferRollersEast(double speed) { + public void transferRollersEastSpeed(double speed) { transferRollersEast.set(speed); - } - public void transferRollersWest(double speed) { + public void transferRollersWestSpeed(double speed) { transferRollersWest.set(speed); - } - public void flywheelRollersEast(double speed) { - flywheelEastFollower.set(speed); - + public void flywheelRollersEastSpeed(double speed) { + flywheelRollersEast.set(speed); } - public void flywheelRollersWest(double speed) { + public void flywheelRollersWestSpeed(double speed) { flywheelRollersWest.set(speed); - } - public void flywheelWestFollower(double speed) { - flywheelRollersWest.set(speed); - + public void flywheelWestFollowerSpeed(double speed) { + flywheelWestFollower.set(speed); } - public void flywheelEastFollower(double speed) { + public void flywheelEastFollowerSpeed(double speed) { flywheelEastFollower.set(speed); - } @Override From 610abdceb856d1b9c5240cc1fe44cc782434e760 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Fri, 22 May 2026 20:20:51 -0700 Subject: [PATCH 03/10] Removed "Rollers" for flywheels --- .../java/frc/robot/constants/ConstRotors.java | 4 ++-- .../java/frc/robot/subsystems/Rotors.java | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/frc/robot/constants/ConstRotors.java b/src/main/java/frc/robot/constants/ConstRotors.java index a03bc0a..ccbf0bb 100644 --- a/src/main/java/frc/robot/constants/ConstRotors.java +++ b/src/main/java/frc/robot/constants/ConstRotors.java @@ -14,8 +14,8 @@ public class ConstRotors { public static final TalonFXConfiguration TRANSFER_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration TRANSFER_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration FLYWHEEL_EAST_FOLLOWER_CONFIGURATION = new TalonFXConfiguration(); - public static final TalonFXConfiguration FLYWHEEL_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); - public static final TalonFXConfiguration FLYWHEEL_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration FLYWHEEL_EAST_CONFIGURATION = new TalonFXConfiguration(); + public static final TalonFXConfiguration FLYWHEEL_WEST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration FLYWHEEL_WEST_FOLLOWER_CONFIGURATION = new TalonFXConfiguration(); public static final double STOP = 0; diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index d2bccfb..d136389 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -20,8 +20,8 @@ public class Rotors extends SubsystemBase { final TalonFX intakeRollersEast = new TalonFX(rotorIDs.INTAKE_ROLLERS_EAST_CAN); final TalonFX transferRollersWest = new TalonFX((rotorIDs.TRANSFER_ROLLERS_WEST_CAN)); final TalonFX transferRollersEast = new TalonFX((rotorIDs.TRANSFER_ROLLERS_EAST_CAN)); - final TalonFX flywheelRollersWest = new TalonFX((rotorIDs.FLYWHEEL_WEST_CAN)); - final TalonFX flywheelRollersEast = new TalonFX((rotorIDs.FLYWHEEL_EAST_CAN)); + final TalonFX flywheelWest = new TalonFX((rotorIDs.FLYWHEEL_WEST_CAN)); + final TalonFX flywheelEast = new TalonFX((rotorIDs.FLYWHEEL_EAST_CAN)); final TalonFX flywheelWestFollower = new TalonFX((rotorIDs.FLYWHEEL_WEST_FOLLOWER_CAN)); final TalonFX flywheelEastFollower = new TalonFX(rotorIDs.FLYWHEEL_EAST_FOLLOWER_CAN); @@ -32,8 +32,8 @@ public Rotors() { intakeRollersWest.getConfigurator().apply(ConstRotors.INTAKE_ROLLERS_WEST_CONFIGURATION); transferRollersEast.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_EAST_CONFIGURATION); transferRollersWest.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_WEST_CONFIGURATION); - flywheelRollersEast.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_EAST_CONFIGURATION); - flywheelRollersWest.getConfigurator().apply(ConstRotors.FLYWHEEL_ROLLERS_WEST_CONFIGURATION); + flywheelEast.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_CONFIGURATION); + flywheelWest.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_CONFIGURATION); flywheelEastFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_FOLLOWER_CONFIGURATION); flywheelWestFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_FOLLOWER_CONFIGURATION); } @@ -58,12 +58,12 @@ public AngularVelocity getTransferRollersWestVelocity() { return transferRollersWest.getVelocity().getValue(); } - public AngularVelocity getFlywheelRollersEastVelocity() { - return flywheelRollersEast.getVelocity().getValue(); + public AngularVelocity getFlywheelEastVelocity() { + return flywheelEast.getVelocity().getValue(); } - public AngularVelocity getFlywheelRollersWestVelocity() { - return flywheelRollersWest.getVelocity().getValue(); + public AngularVelocity getFlywheelWestVelocity() { + return flywheelWest.getVelocity().getValue(); } public AngularVelocity getFlywheelEastFollowerVelocity() { @@ -94,12 +94,12 @@ public void transferRollersWestSpeed(double speed) { transferRollersWest.set(speed); } - public void flywheelRollersEastSpeed(double speed) { - flywheelRollersEast.set(speed); + public void flywheelEastSpeed(double speed) { + flywheelEast.set(speed); } - public void flywheelRollersWestSpeed(double speed) { - flywheelRollersWest.set(speed); + public void flywheelWestSpeed(double speed) { + flywheelWest.set(speed); } public void flywheelWestFollowerSpeed(double speed) { From 8bf01f4b5cde685bf48e44044a0eb5a96a0e1af2 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Fri, 22 May 2026 20:59:39 -0700 Subject: [PATCH 04/10] Added "set" to setter functions --- src/main/java/frc/robot/subsystems/Rotors.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index d136389..5c744ca 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -78,35 +78,35 @@ public void setSerializerRollersSpeed(double speed) { serializerRollers.set(speed); } - public void intakeRollersEastSpeed(double speed) { + public void setIntakeRollersEastSpeed(double speed) { intakeRollersEast.set(speed); } - public void intakeRollersWestSpeed(double speed) { + public void setIntakeRollersWestSpeed(double speed) { intakeRollersWest.set(speed); } - public void transferRollersEastSpeed(double speed) { + public void setTransferRollersEastSpeed(double speed) { transferRollersEast.set(speed); } - public void transferRollersWestSpeed(double speed) { + public void setTransferRollersWestSpeed(double speed) { transferRollersWest.set(speed); } - public void flywheelEastSpeed(double speed) { + public void setFlywheelEastSpeed(double speed) { flywheelEast.set(speed); } - public void flywheelWestSpeed(double speed) { + public void setFlywheelWestSpeed(double speed) { flywheelWest.set(speed); } - public void flywheelWestFollowerSpeed(double speed) { + public void setFlywheelWestFollowerSpeed(double speed) { flywheelWestFollower.set(speed); } - public void flywheelEastFollowerSpeed(double speed) { + public void setFlywheelEastFollowerSpeed(double speed) { flywheelEastFollower.set(speed); } From f09518544799e4f480b615a816773816a3ff9228 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Fri, 22 May 2026 21:14:16 -0700 Subject: [PATCH 05/10] changed device IDs to reflect comp robot --- src/main/java/frc/robot/DeviceIDs.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/frc/robot/DeviceIDs.java b/src/main/java/frc/robot/DeviceIDs.java index 45487ac..1c822ea 100644 --- a/src/main/java/frc/robot/DeviceIDs.java +++ b/src/main/java/frc/robot/DeviceIDs.java @@ -38,16 +38,15 @@ public static class drivetrainIDs { // Rotor and Motion IDs: 10~29 public static class rotorIDs { - public static final int SERIALIZER_ROLLERS_CAN = 11; - public static final int INTAKE_ROLLERS_WEST_CAN = 12; - public static final int INTAKE_ROLLERS_EAST_CAN = 13; - public static final int TRANSFER_ROLLERS_WEST_CAN = 14; - public static final int TRANSFER_ROLLERS_EAST_CAN = 15; - public static final int FLYWHEEL_WEST_CAN = 16; - public static final int FLYWHEEL_EAST_CAN = 17; - public static final int FLYWHEEL_WEST_FOLLOWER_CAN = 18; - public static final int FLYWHEEL_EAST_FOLLOWER_CAN = 19; - + public static final int SERIALIZER_ROLLERS_CAN = 10; + public static final int INTAKE_ROLLERS_WEST_CAN = 11; + public static final int INTAKE_ROLLERS_EAST_CAN = 18; + public static final int TRANSFER_ROLLERS_WEST_CAN = 13; + public static final int TRANSFER_ROLLERS_EAST_CAN = 12; + public static final int FLYWHEEL_WEST_CAN = 15; + public static final int FLYWHEEL_EAST_CAN = 14; + public static final int FLYWHEEL_WEST_FOLLOWER_CAN = 17; + public static final int FLYWHEEL_EAST_FOLLOWER_CAN = 16; } // Motion Profile IDs: 30~49 From c7f2733044926a9a18f151ba088f69614251ab8d Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared-K1-10@users.noreply.github.com> Date: Fri, 22 May 2026 21:59:05 -0700 Subject: [PATCH 06/10] create_rotors-subsystem i added followers --- src/main/java/frc/robot/DeviceIDs.java | 8 ++++---- .../java/frc/robot/constants/ConstRotors.java | 2 -- .../java/frc/robot/subsystems/Rotors.java | 20 +++++++++++-------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/main/java/frc/robot/DeviceIDs.java b/src/main/java/frc/robot/DeviceIDs.java index 3f5b5c8..387d98b 100644 --- a/src/main/java/frc/robot/DeviceIDs.java +++ b/src/main/java/frc/robot/DeviceIDs.java @@ -43,10 +43,10 @@ public static class rotorIDs { public static final int INTAKE_ROLLERS_EAST_CAN = 18; public static final int TRANSFER_ROLLERS_WEST_CAN = 13; public static final int TRANSFER_ROLLERS_EAST_CAN = 12; - public static final int FLYWHEEL_WEST_CAN = 15; - public static final int FLYWHEEL_EAST_CAN = 14; - public static final int FLYWHEEL_WEST_FOLLOWER_CAN = 17; - public static final int FLYWHEEL_EAST_FOLLOWER_CAN = 16; + public static final int FLYWHEEL_TOP_WEST_CAN = 15; + public static final int FLYWHEEL_TOP_EAST_CAN = 14; + public static final int FLYWHEEL_BOTTOM_WEST_CAN = 17; + public static final int FLYWHEEL_BOTTOM_EAST_CAN = 16; } // Motion Profile IDs: 30~49 diff --git a/src/main/java/frc/robot/constants/ConstRotors.java b/src/main/java/frc/robot/constants/ConstRotors.java index ccbf0bb..249148a 100644 --- a/src/main/java/frc/robot/constants/ConstRotors.java +++ b/src/main/java/frc/robot/constants/ConstRotors.java @@ -13,10 +13,8 @@ public class ConstRotors { public static final TalonFXConfiguration INTAKE_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration TRANSFER_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration TRANSFER_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); - public static final TalonFXConfiguration FLYWHEEL_EAST_FOLLOWER_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration FLYWHEEL_EAST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration FLYWHEEL_WEST_CONFIGURATION = new TalonFXConfiguration(); - public static final TalonFXConfiguration FLYWHEEL_WEST_FOLLOWER_CONFIGURATION = new TalonFXConfiguration(); public static final double STOP = 0; diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index 5c744ca..2055683 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -4,6 +4,7 @@ package frc.robot.subsystems; +import com.ctre.phoenix6.controls.Follower; import com.ctre.phoenix6.hardware.TalonFX; import edu.wpi.first.epilogue.Logged; @@ -20,10 +21,13 @@ public class Rotors extends SubsystemBase { final TalonFX intakeRollersEast = new TalonFX(rotorIDs.INTAKE_ROLLERS_EAST_CAN); final TalonFX transferRollersWest = new TalonFX((rotorIDs.TRANSFER_ROLLERS_WEST_CAN)); final TalonFX transferRollersEast = new TalonFX((rotorIDs.TRANSFER_ROLLERS_EAST_CAN)); - final TalonFX flywheelWest = new TalonFX((rotorIDs.FLYWHEEL_WEST_CAN)); - final TalonFX flywheelEast = new TalonFX((rotorIDs.FLYWHEEL_EAST_CAN)); - final TalonFX flywheelWestFollower = new TalonFX((rotorIDs.FLYWHEEL_WEST_FOLLOWER_CAN)); - final TalonFX flywheelEastFollower = new TalonFX(rotorIDs.FLYWHEEL_EAST_FOLLOWER_CAN); + final TalonFX flywheelTopWest = new TalonFX((rotorIDs.FLYWHEEL_TOP_WEST_CAN)); + final TalonFX flywheelTopEast = new TalonFX((rotorIDs.FLYWHEEL_TOP_EAST_CAN)); + final TalonFX flywheelBottomWest = new TalonFX((rotorIDs.FLYWHEEL_BOTTOM_WEST_CAN)); + final TalonFX flywheelBottomEast = new TalonFX((rotorIDs.FLYWHEEL_BOTTOM_EAST_CAN)); + + final Follower flywheelEastFollower = new Follower(flywheelTopEast.getDeviceID(), false); + final Follower flywheelWestFollower = new Follower(flywheelTopWest.getDeviceID(), false); /** Creates a new Rotors. */ public Rotors() { @@ -32,10 +36,10 @@ public Rotors() { intakeRollersWest.getConfigurator().apply(ConstRotors.INTAKE_ROLLERS_WEST_CONFIGURATION); transferRollersEast.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_EAST_CONFIGURATION); transferRollersWest.getConfigurator().apply(ConstRotors.TRANSFER_ROLLERS_WEST_CONFIGURATION); - flywheelEast.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_CONFIGURATION); - flywheelWest.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_CONFIGURATION); - flywheelEastFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_FOLLOWER_CONFIGURATION); - flywheelWestFollower.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_FOLLOWER_CONFIGURATION); + flywheelTopEast.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_CONFIGURATION); + flywheelTopWest.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_CONFIGURATION); + flywheelBottomEast.getConfigurator().apply(ConstRotors.FLYWHEEL_EAST_CONFIGURATION); + flywheelBottomWest.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_CONFIGURATION); } public AngularVelocity getSerializerRollersVelocity() { From e689412344c9150596aa8c96b401ddc6edeba278 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 23 May 2026 14:08:43 -0700 Subject: [PATCH 07/10] create rotors added foollowers ansd can check speed --- .../java/frc/robot/subsystems/Rotors.java | 80 +++++++++++-------- 1 file changed, 47 insertions(+), 33 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index 2055683..da099c2 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -5,17 +5,19 @@ package frc.robot.subsystems; import com.ctre.phoenix6.controls.Follower; +import com.ctre.phoenix6.controls.MotionMagicVelocityVoltage; import com.ctre.phoenix6.hardware.TalonFX; - import edu.wpi.first.epilogue.Logged; +import edu.wpi.first.units.Units; import edu.wpi.first.units.measure.AngularVelocity; -import edu.wpi.first.units.measure.Velocity; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.DeviceIDs.rotorIDs; +import frc.robot.Robot; import frc.robot.constants.ConstRotors; @Logged public class Rotors extends SubsystemBase { + final TalonFX serializerRollers = new TalonFX(rotorIDs.SERIALIZER_ROLLERS_CAN); final TalonFX intakeRollersWest = new TalonFX(rotorIDs.INTAKE_ROLLERS_WEST_CAN); final TalonFX intakeRollersEast = new TalonFX(rotorIDs.INTAKE_ROLLERS_EAST_CAN); @@ -25,11 +27,15 @@ public class Rotors extends SubsystemBase { final TalonFX flywheelTopEast = new TalonFX((rotorIDs.FLYWHEEL_TOP_EAST_CAN)); final TalonFX flywheelBottomWest = new TalonFX((rotorIDs.FLYWHEEL_BOTTOM_WEST_CAN)); final TalonFX flywheelBottomEast = new TalonFX((rotorIDs.FLYWHEEL_BOTTOM_EAST_CAN)); + AngularVelocity lastDesiredFlyWheelSpeed = Units.RPM.of(0); + AngularVelocity lastDesiredTransferRollersSpeed = Units.RPM.of(0); + Follower flywheelEastFollower = new Follower(flywheelTopEast.getDeviceID(), false); + Follower flywheelWestFollower = new Follower(flywheelTopWest.getDeviceID(), false); + Follower transferRollersEastFollower = new Follower(intakeRollersEast.getDeviceID(), true); + Follower intakeRollerEastFollower = new Follower(intakeRollersEast.getDeviceID(), true); + private boolean flyWheelAtSpeed = false; + // private boolean intakeRollersAtSpeed = false;/ - final Follower flywheelEastFollower = new Follower(flywheelTopEast.getDeviceID(), false); - final Follower flywheelWestFollower = new Follower(flywheelTopWest.getDeviceID(), false); - - /** Creates a new Rotors. */ public Rotors() { serializerRollers.getConfigurator().apply(ConstRotors.SERIALIZER_ROLLERS_CONFIGURATION); intakeRollersEast.getConfigurator().apply(ConstRotors.INTAKE_ROLLERS_EAST_CONFIGURATION); @@ -42,6 +48,17 @@ public Rotors() { flywheelBottomWest.getConfigurator().apply(ConstRotors.FLYWHEEL_WEST_CONFIGURATION); } + // final MotionMagicVelocityVoltage TransferVelocityRequest = new + // MotionMagicVelocityVoltage(0);/ + final MotionMagicVelocityVoltage flyWheelVelocityRequest = new MotionMagicVelocityVoltage(0); + + public AngularVelocity getFlyWheelSpeeds() { + if (Robot.isSimulation()) { + return lastDesiredFlyWheelSpeed; + } + return flywheelTopEast.getVelocity().getValue(); + } + public AngularVelocity getSerializerRollersVelocity() { return serializerRollers.getVelocity().getValue(); } @@ -51,70 +68,67 @@ public AngularVelocity getIntakeRollersEastVelocity() { } public AngularVelocity getIntakeRollersWestVelocity() { - return intakeRollersWest.getVelocity().getValue(); + return intakeRollersEast.getVelocity().getValue(); } - public AngularVelocity getTransferRollersEastVelocity() { + public AngularVelocity getTransferRollersVelocity() { return transferRollersEast.getVelocity().getValue(); } public AngularVelocity getTransferRollersWestVelocity() { - return transferRollersWest.getVelocity().getValue(); + return transferRollersEast.getVelocity().getValue(); } public AngularVelocity getFlywheelEastVelocity() { - return flywheelEast.getVelocity().getValue(); + return flywheelTopEast.getVelocity().getValue(); } public AngularVelocity getFlywheelWestVelocity() { - return flywheelWest.getVelocity().getValue(); + return flywheelTopWest.getVelocity().getValue(); } public AngularVelocity getFlywheelEastFollowerVelocity() { - return flywheelEastFollower.getVelocity().getValue(); + return flywheelBottomEast.getVelocity().getValue(); } public AngularVelocity getFlywheelWestFollowerVelocity() { - return flywheelWestFollower.getVelocity().getValue(); + return flywheelBottomWest.getVelocity().getValue(); } public void setSerializerRollersSpeed(double speed) { serializerRollers.set(speed); } - public void setIntakeRollersEastSpeed(double speed) { + public void setIntakeRollersSpeeds(double speed) { intakeRollersEast.set(speed); + intakeRollersWest.setControl(intakeRollerEastFollower); } - public void setIntakeRollersWestSpeed(double speed) { - intakeRollersWest.set(speed); - } - - public void setTransferRollersEastSpeed(double speed) { + public void setTransferRollersSpeeds(double speed) { transferRollersEast.set(speed); + transferRollersWest.setControl(transferRollersEastFollower); } - public void setTransferRollersWestSpeed(double speed) { - transferRollersWest.set(speed); + public void setFlywheelSpeeds(AngularVelocity speed) { + flywheelTopEast.setControl(flyWheelVelocityRequest.withVelocity(speed)); + flywheelTopWest.setControl(flyWheelVelocityRequest.withVelocity(speed)); + flywheelBottomWest.setControl(flywheelWestFollower); + flywheelBottomEast.setControl(flywheelEastFollower); + lastDesiredFlyWheelSpeed = speed; } - public void setFlywheelEastSpeed(double speed) { - flywheelEast.set(speed); - } + public boolean isFlyWheelAtSpeed(AngularVelocity tolerance) { + AngularVelocity lowerLim = lastDesiredFlyWheelSpeed.minus(tolerance); + AngularVelocity upperLim = lastDesiredFlyWheelSpeed.plus(tolerance); - public void setFlywheelWestSpeed(double speed) { - flywheelWest.set(speed); - } + AngularVelocity flyWheelSpeed = getFlyWheelSpeeds(); - public void setFlywheelWestFollowerSpeed(double speed) { - flywheelWestFollower.set(speed); - } + flyWheelAtSpeed = flyWheelSpeed.gte(lowerLim) + && flyWheelSpeed.lte(upperLim); + return flyWheelAtSpeed; - public void setFlywheelEastFollowerSpeed(double speed) { - flywheelEastFollower.set(speed); } - @Override public void periodic() { } From 72ec09cc8cc919efdc57975606f31d8dddb6e7b4 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 23 May 2026 14:40:39 -0700 Subject: [PATCH 08/10] create_rotor_subsystem added configurationhs --- .../java/frc/robot/constants/ConstRotors.java | 46 +++++++++++++++++++ .../java/frc/robot/subsystems/Rotors.java | 18 +------- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/main/java/frc/robot/constants/ConstRotors.java b/src/main/java/frc/robot/constants/ConstRotors.java index 249148a..88117cc 100644 --- a/src/main/java/frc/robot/constants/ConstRotors.java +++ b/src/main/java/frc/robot/constants/ConstRotors.java @@ -5,9 +5,13 @@ package frc.robot.constants; import com.ctre.phoenix6.configs.TalonFXConfiguration; +import com.ctre.phoenix6.signals.InvertedValue; +import com.ctre.phoenix6.signals.NeutralModeValue; +import com.fasterxml.jackson.core.filter.TokenFilter.Inclusion; /** Add your docs here. */ public class ConstRotors { + public static final TalonFXConfiguration SERIALIZER_ROLLERS_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration INTAKE_ROLLERS_EAST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration INTAKE_ROLLERS_WEST_CONFIGURATION = new TalonFXConfiguration(); @@ -16,6 +20,48 @@ public class ConstRotors { public static final TalonFXConfiguration FLYWHEEL_EAST_CONFIGURATION = new TalonFXConfiguration(); public static final TalonFXConfiguration FLYWHEEL_WEST_CONFIGURATION = new TalonFXConfiguration(); + static { + + // SHOOTER_TRANSFER_EAST_CONFIGURATION.MotorOutput.NeutralMode = + // NeutralModeValue.Coast;/ + + FLYWHEEL_WEST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + FLYWHEEL_WEST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + FLYWHEEL_WEST_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + FLYWHEEL_WEST_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + FLYWHEEL_EAST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + FLYWHEEL_EAST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + FLYWHEEL_EAST_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + FLYWHEEL_EAST_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + SERIALIZER_ROLLERS_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + SERIALIZER_ROLLERS_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + SERIALIZER_ROLLERS_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + SERIALIZER_ROLLERS_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + INTAKE_ROLLERS_EAST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + INTAKE_ROLLERS_EAST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + INTAKE_ROLLERS_EAST_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + INTAKE_ROLLERS_EAST_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + INTAKE_ROLLERS_WEST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + INTAKE_ROLLERS_WEST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + INTAKE_ROLLERS_WEST_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + INTAKE_ROLLERS_WEST_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + TRANSFER_ROLLERS_EAST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + TRANSFER_ROLLERS_EAST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + TRANSFER_ROLLERS_EAST_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + TRANSFER_ROLLERS_EAST_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + TRANSFER_ROLLERS_WEST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast; + TRANSFER_ROLLERS_WEST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.Clockwise_Positive; + TRANSFER_ROLLERS_WEST_CONFIGURATION.CurrentLimits.SupplyCurrentLimitEnable = true; + TRANSFER_ROLLERS_WEST_CONFIGURATION.CurrentLimits.SupplyCurrentLowerLimit = 35; + + } + public static final double STOP = 0; } diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index da099c2..d842256 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -63,11 +63,7 @@ public AngularVelocity getSerializerRollersVelocity() { return serializerRollers.getVelocity().getValue(); } - public AngularVelocity getIntakeRollersEastVelocity() { - return intakeRollersEast.getVelocity().getValue(); - } - - public AngularVelocity getIntakeRollersWestVelocity() { + public AngularVelocity getIntakeRollersVelocity() { return intakeRollersEast.getVelocity().getValue(); } @@ -75,10 +71,6 @@ public AngularVelocity getTransferRollersVelocity() { return transferRollersEast.getVelocity().getValue(); } - public AngularVelocity getTransferRollersWestVelocity() { - return transferRollersEast.getVelocity().getValue(); - } - public AngularVelocity getFlywheelEastVelocity() { return flywheelTopEast.getVelocity().getValue(); } @@ -87,14 +79,6 @@ public AngularVelocity getFlywheelWestVelocity() { return flywheelTopWest.getVelocity().getValue(); } - public AngularVelocity getFlywheelEastFollowerVelocity() { - return flywheelBottomEast.getVelocity().getValue(); - } - - public AngularVelocity getFlywheelWestFollowerVelocity() { - return flywheelBottomWest.getVelocity().getValue(); - } - public void setSerializerRollersSpeed(double speed) { serializerRollers.set(speed); } From 48a1175de10acdb0ea758598e2742499d9573a9b Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 23 May 2026 15:25:38 -0700 Subject: [PATCH 09/10] created roters subsystem fixxed comments --- src/main/java/frc/robot/subsystems/Rotors.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index d842256..a6f0faa 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -30,7 +30,7 @@ public class Rotors extends SubsystemBase { AngularVelocity lastDesiredFlyWheelSpeed = Units.RPM.of(0); AngularVelocity lastDesiredTransferRollersSpeed = Units.RPM.of(0); Follower flywheelEastFollower = new Follower(flywheelTopEast.getDeviceID(), false); - Follower flywheelWestFollower = new Follower(flywheelTopWest.getDeviceID(), false); + Follower flywheelWestFollower = new Follower(flywheelTopEast.getDeviceID(), true); Follower transferRollersEastFollower = new Follower(intakeRollersEast.getDeviceID(), true); Follower intakeRollerEastFollower = new Follower(intakeRollersEast.getDeviceID(), true); private boolean flyWheelAtSpeed = false; @@ -75,10 +75,6 @@ public AngularVelocity getFlywheelEastVelocity() { return flywheelTopEast.getVelocity().getValue(); } - public AngularVelocity getFlywheelWestVelocity() { - return flywheelTopWest.getVelocity().getValue(); - } - public void setSerializerRollersSpeed(double speed) { serializerRollers.set(speed); } @@ -95,7 +91,7 @@ public void setTransferRollersSpeeds(double speed) { public void setFlywheelSpeeds(AngularVelocity speed) { flywheelTopEast.setControl(flyWheelVelocityRequest.withVelocity(speed)); - flywheelTopWest.setControl(flyWheelVelocityRequest.withVelocity(speed)); + flywheelTopWest.setControl(flywheelWestFollower); flywheelBottomWest.setControl(flywheelWestFollower); flywheelBottomEast.setControl(flywheelEastFollower); lastDesiredFlyWheelSpeed = speed; From 272afd1f8452ee9a5e0bd0522f02bdbab3aff08f Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared-K1-10@users.noreply.github.com> Date: Sat, 23 May 2026 15:52:36 -0700 Subject: [PATCH 10/10] Create rotor subsystem Fixed Angela's comment Co-Authored-By: Justinpham17386769 <244249272+Justinpham17386769@users.noreply.github.com> Co-Authored-By: jayden mendoza <244560677+jaymendo670-png@users.noreply.github.com> --- src/main/java/frc/robot/subsystems/Rotors.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/Rotors.java b/src/main/java/frc/robot/subsystems/Rotors.java index a6f0faa..f62af36 100644 --- a/src/main/java/frc/robot/subsystems/Rotors.java +++ b/src/main/java/frc/robot/subsystems/Rotors.java @@ -71,10 +71,6 @@ public AngularVelocity getTransferRollersVelocity() { return transferRollersEast.getVelocity().getValue(); } - public AngularVelocity getFlywheelEastVelocity() { - return flywheelTopEast.getVelocity().getValue(); - } - public void setSerializerRollersSpeed(double speed) { serializerRollers.set(speed); }