Skip to content

Commit

Permalink
add more specificiations
Browse files Browse the repository at this point in the history
  • Loading branch information
woopers6 committed Feb 10, 2025
1 parent 9a74751 commit 880845e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,27 @@ public static class Drive {
}

public static class LiftHardware {
public static final TalonFX.ID ELEVATOR_MOTOR_ID = new TalonFX.ID("LiftHardware/Elevator", PhoenixCANBus.RIO, 4);
public static final TalonFX.ID PIVOT_MOTOR_ID = new TalonFX.ID("LiftHardware/Pivot", PhoenixCANBus.RIO, 5);
public static final TalonFX.ID ELEVATOR_MOTOR_ID = new TalonFX.ID("LiftHardware/Elevator", PhoenixCANBus.RIO, 60);
public static final TalonFX.ID PIVOT_MOTOR_ID = new TalonFX.ID("LiftHardware/Pivot", PhoenixCANBus.RIO, 61);
public static final Distance SPROCKET_PITCH_RADIUS = Inches.of((1.751)/(2.0));
public static final LimitSwitch.ID ELEVATOR_HOMING_BEAM_BREAK_PORT = new LimitSwitch.ID("LiftHardware/HomingSwitch", 0);
public static final CANcoder.ID ARM_CANCODER_ID = new CANcoder.ID("LiftHardware/CANcoder", PhoenixCANBus.RIO, 8);
public static final LimitSwitch.ID ELEVATOR_HOMING_BEAM_BREAK_PORT = new LimitSwitch.ID("LiftHardware/HomingSwitch", 4);
public static final CANcoder.ID ARM_CANCODER_ID = new CANcoder.ID("LiftHardware/CANcoder", PhoenixCANBus.RIO, 62);
}

public static class IntakeHardware {
public static final Spark.ID INTAKE_MOTOR_ID = new Spark.ID("IntakeHardware/IntakeMotor", 7);
public static final Spark.ID INTAKE_MOTOR_ID = new Spark.ID("IntakeHardware/IntakeMotor", 53);
public static final LimitSwitch.ID FIRST_INTAKE_BEAM_BREAK = new LimitSwitch.ID(
"IntakeHardware/FirstIntakeBeamBreak", 1
"IntakeHardware/FirstIntakeBeamBreak", 0
);
public static final LimitSwitch.ID SECOND_INTAKE_BEAM_BREAK = new LimitSwitch.ID(
"IntakeHardware/SecondIntakeBeamBreak", 2
"IntakeHardware/SecondIntakeBeamBreak", 1
);
}

public static class EndEffectorHardware {
public static final Spark.ID OUTTAKE_MOTOR_ID = new Spark.ID("endEffecterMotor", 9);
public static final int FORWARD_BEAM_BREAK = 3;
public static final int REVERSE_BEAM_BREAK = 4;
public static final Spark.ID OUTTAKE_MOTOR_ID = new Spark.ID("endEffectorMotor", 52);
public static final int FORWARD_BEAM_BREAK = 2;
public static final int REVERSE_BEAM_BREAK = 3;
}

public static class VisionHardware {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static IntakeSubsystem getInstance(Hardware intakeHardware) {
*/
public static Hardware initializeHardware() {
Hardware intakeHardware = new Hardware(
new Spark(Constants.IntakeHardware.INTAKE_MOTOR_ID, MotorKind.NEO_VORTEX),
new Spark(Constants.IntakeHardware.INTAKE_MOTOR_ID, MotorKind.NEO),
new LimitSwitch(Constants.IntakeHardware.FIRST_INTAKE_BEAM_BREAK, Constants.Frequencies.BEAM_BREAK_UPDATE_RATE),
new LimitSwitch(Constants.IntakeHardware.SECOND_INTAKE_BEAM_BREAK, Constants.Frequencies.BEAM_BREAK_UPDATE_RATE)
);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/lift/LiftSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ private LiftSubsystem(Hardware liftHardware) {
pivotConfig.CurrentLimits.SupplyCurrentLowerTime = 1.0;
pivotConfig.Feedback.SensorToMechanismRatio = 1.0;
pivotConfig.Feedback.RotorToSensorRatio = 52.36363636363636;
pivotConfig.Feedback.FeedbackSensorSource = FeedbackSensorSourceValue.RemoteCANcoder;
pivotConfig.Feedback.FeedbackSensorSource = FeedbackSensorSourceValue.FusedCANcoder;
pivotConfig.Feedback.FeedbackRemoteSensorID = m_armCANcoder.getID().deviceID;
pivotConfig.Audio.AllowMusicDurDisable = true;
pivotConfig.MotionMagic.MotionMagicAcceleration = 0;
Expand All @@ -1005,7 +1005,7 @@ private LiftSubsystem(Hardware liftHardware) {

CANcoderConfiguration armCANCoderConfig = new CANcoderConfiguration();
armCANCoderConfig.MagnetSensor.SensorDirection = SensorDirectionValue.CounterClockwise_Positive;
armCANCoderConfig.MagnetSensor.MagnetOffset = 0;
armCANCoderConfig.MagnetSensor.MagnetOffset = 0.69287109375;
armCANCoderConfig.MagnetSensor.AbsoluteSensorDiscontinuityPoint = 0.5;

m_elevatorSysIDLogConsumer = state -> SignalLogger.writeString(getName() + ELEVATOR_MOTOR_SYSID_STATE_LOG_ENTRY,
Expand Down

0 comments on commit 880845e

Please sign in to comment.