Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,26 @@ public class FieldConstants {

public class Ports {
// Constants for Port Values
public static final Device.CAN IntakeRoller = new CAN(1, "rio");
public static final Device.CAN IntakeRoller = new CAN(11, "rio");
public static final Device.CAN IntakePivot = new CAN(22, "rio");

public static final Device.CAN Spindexer = new CAN(40, "rio");

public static final Device.CAN TowerRoller = new CAN(13, "rio");
public static final Device.CAN LeftFlywheel = new CAN(43, "rio");
public static final Device.CAN RightFlywheel = new CAN(56, "rio");
public static final Device.CAN HoodMotor = new CAN(44, "rio");

public static final Device.CAN ClimberMotor = new CAN(50, "rio");

public static final Device.CAN LEDs = new CAN(2, "rio");
public static final Device.CAN HopperRoller = new CAN(3, "rio");
public static final Device.CAN ClimberLinearMechanism = new CAN(4, "rio");
public static final Device.CAN ShooterRoller = new CAN(5, "rio");
public static final Device.CAN Pigeon = new CAN(0, "rio");
}

public class HopperConstants {
// holds constants for the hopper

public static final String MOTOR_NAME = "Hopper Roller";
public static final String MOTOR_NAME = "Spindexer";

// CHANGE TO PROPER RPMS !!!!

Expand Down
20 changes: 9 additions & 11 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,24 @@ public RobotContainer() {
new MotorIOTalonFX(
HopperConstants.MOTOR_NAME,
HopperConstants.getFXConfig(),
Ports.HopperRoller)));
Ports.Spindexer)));
shooter =
new Shooter(
new FlywheelMechanismReal(
new MotorIOTalonFX(
ShooterFlywheelConstants.NAME,
ShooterFlywheelConstants.getFXConfig(),
Ports.ShooterRoller)),
Ports.LeftFlywheel)),
new FlywheelMechanismReal(
new MotorIOTalonFX(
ShooterFlywheelConstants.NAME,
ShooterFlywheelConstants.getFXConfig(),
Ports.ShooterRoller)),
Ports.TowerRoller)),
new RotaryMechanismReal(
new MotorIOTalonFX(
ShooterRotaryConstants.NAME,
ShooterRotaryConstants.getFXConfig(),
Ports.ShooterRoller),
Ports.HoodMotor),
Constants.ShooterRotaryConstants.CONSTANTS,
java.util.Optional.empty()));

Expand All @@ -130,7 +130,7 @@ public RobotContainer() {
new MotorIOTalonFX(
IntakePivotConstants.NAME,
IntakePivotConstants.getFXConfig(),
Ports.IntakeRoller),
Ports.IntakePivot),
IntakePivotConstants.CONSTANTS,
Optional.empty()));
vision =
Expand All @@ -156,9 +156,7 @@ public RobotContainer() {
new Hopper(
new FlywheelMechanismSim(
new MotorIOTalonFXSim(
HopperConstants.MOTOR_NAME,
HopperConstants.getFXConfig(),
Ports.HopperRoller),
HopperConstants.MOTOR_NAME, HopperConstants.getFXConfig(), Ports.Spindexer),
HopperConstants.DCMOTOR,
HopperConstants.MOI,
HopperConstants.TOLERANCE));
Expand All @@ -168,23 +166,23 @@ public RobotContainer() {
new MotorIOTalonFXSim(
ShooterFlywheelConstants.NAME,
ShooterFlywheelConstants.getFXConfig(),
Ports.ShooterRoller),
Ports.LeftFlywheel),
ShooterFlywheelConstants.DCMOTOR,
ShooterFlywheelConstants.MOI,
ShooterFlywheelConstants.TOLERANCE),
new FlywheelMechanismSim(
new MotorIOTalonFXSim(
ShooterFlywheelConstants.NAME,
ShooterFlywheelConstants.getFXConfig(),
Ports.ShooterRoller),
Ports.TowerRoller),
ShooterFlywheelConstants.DCMOTOR,
ShooterFlywheelConstants.MOI,
ShooterFlywheelConstants.TOLERANCE),
new RotaryMechanismSim(
new MotorIOTalonFXSim(
ShooterRotaryConstants.NAME,
ShooterRotaryConstants.getFXConfig(),
Ports.ShooterRoller),
Ports.HoodMotor),
ShooterRotaryConstants.DCMOTOR,
ShooterRotaryConstants.MOI,
true,
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/frc/robot/generated/TunerConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public class TunerConstants {
.withDriveFrictionVoltage(kDriveFrictionVoltage);

// Front Left
private static final int kFrontLeftDriveMotorId = 11;
private static final int kFrontLeftSteerMotorId = 21;
private static final int kFrontLeftDriveMotorId = 35;
private static final int kFrontLeftSteerMotorId = 12;
private static final int kFrontLeftEncoderId = 1;
private static final Angle kFrontLeftEncoderOffset = Rotations.of(-0.1416015625);
private static final boolean kFrontLeftSteerMotorInverted = true;
Expand All @@ -146,8 +146,8 @@ public class TunerConstants {
private static final Distance kFrontLeftYPos = Inches.of(10.25);

// Front Right
private static final int kFrontRightDriveMotorId = 14;
private static final int kFrontRightSteerMotorId = 24;
private static final int kFrontRightDriveMotorId = 41;
private static final int kFrontRightSteerMotorId = 42;
private static final int kFrontRightEncoderId = 4;
private static final Angle kFrontRightEncoderOffset = Rotations.of(-0.1748046875);
private static final boolean kFrontRightSteerMotorInverted = true;
Expand All @@ -157,8 +157,8 @@ public class TunerConstants {
private static final Distance kFrontRightYPos = Inches.of(-10.25);

// Back Left
private static final int kBackLeftDriveMotorId = 12;
private static final int kBackLeftSteerMotorId = 22;
private static final int kBackLeftDriveMotorId = 21;
private static final int kBackLeftSteerMotorId = 25;
private static final int kBackLeftEncoderId = 2;
private static final Angle kBackLeftEncoderOffset = Rotations.of(-0.369384765625);
private static final boolean kBackLeftSteerMotorInverted = true;
Expand All @@ -168,8 +168,8 @@ public class TunerConstants {
private static final Distance kBackLeftYPos = Inches.of(10.25);

// Back Right
private static final int kBackRightDriveMotorId = 13;
private static final int kBackRightSteerMotorId = 23;
private static final int kBackRightDriveMotorId = 31;
private static final int kBackRightSteerMotorId = 32;
private static final int kBackRightEncoderId = 3;
private static final Angle kBackRightEncoderOffset = Rotations.of(-0.388916015625);
private static final boolean kBackRightSteerMotorInverted = true;
Expand Down