Skip to content

Commit

Permalink
Make several constants final
Browse files Browse the repository at this point in the history
huh
  • Loading branch information
quackitsquinn committed Mar 23, 2024
1 parent ac1237e commit 06c2b91
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public final class Constants {

/** Constants for the Mailbox system */
public static class Mailbox {
public static final class Mailbox {
// It was me, DIO!
/** DIO Port ID for the Mailbox limit switch. */
public static final int MAILBOX_LIMIT_SWITCH_DIO_PORT = 0;
Expand All @@ -36,7 +36,7 @@ public static class Mailbox {
}

/** Constants for the Pneumatics system. */
public static class MailboxPneumatics {
public static final class MailboxPneumatics {
/** The channel on the PCM for the forward direction on the left solenoid. */
public static final int LEFT_SOLENOID_FORWARD_CHANNEL = 5;

Expand All @@ -51,7 +51,7 @@ public static class MailboxPneumatics {
}

/** Constants for the Belts system. */
public static class MailboxBelts {
public static final class MailboxBelts {
/** The CAN ID for the upper belt motor */
public static final int UPPER_BELT_MOTOR_ID = 11;

Expand All @@ -75,31 +75,31 @@ public static class MailboxBelts {
}

/** Constants that are relating to the controllers. */
public static class Controllers {
public static final class Controllers {
/** Driver station port number for the pilot controller */
public static final int PILOT_CONTROLLER_PORT = 0;

/** Driver station port number for the operator controller */
public static final int OPERATOR_CONTROLLER_PORT = 2;

/** Axis deadband for driver controller. */
public static double DRIVER_CONTROLLER_DEADBAND = 0.1;
public static final double DRIVER_CONTROLLER_DEADBAND = 0.1;
}

/** Constants for the Drivetrain */
public static class Drive {
public static final class Drive {

/** Empty translation to prevent creating 2 Translation2ds every time the drive train stops. */
public static Translation2d EMPTY_TRANSLATION = new Translation2d();
public static final Translation2d EMPTY_TRANSLATION = new Translation2d();

/** The max speed the robot can go in m/s */
public static double MAX_SPEED = 100;
public static final double MAX_SPEED = 100;

/** The max speed the robot can rotate */
public static double MAX_ANGULAR_SPEED = 100;
public static final double MAX_ANGULAR_SPEED = 100;

/** The distance from the center of the robot to any of the swerve modules. */
public static double DISTANCE_ROBOT_CENTER_TO_SWERVE_MODULE = 0.3;
public static final double DISTANCE_ROBOT_CENTER_TO_SWERVE_MODULE = 0.3;

/** The max speed for the robot when not sprinting (in m/s) */
public static final double MAX_NORMAL_SPEED = 2;
Expand All @@ -108,32 +108,32 @@ public static class Drive {
public static final double MAX_NORMAL_ANGULAR_SPEED = 2 * Math.PI;

/** The Translation Drive PID for the robot. */
public static PIDConstants TRANSLATION_DRIVE_PID = new PIDConstants(1.0, 0.0, 0.0);
public static final PIDConstants TRANSLATION_DRIVE_PID = new PIDConstants(1.0, 0.0, 0.0);

/** The Rotation Drive PID for the robot. */
public static PIDConstants ROTATION_DRIVE_PID = new PIDConstants(1.0, 0.0, 0.0);
public static final PIDConstants ROTATION_DRIVE_PID = new PIDConstants(1.0, 0.0, 0.0);
}

/** Holds constants specfically related to autonomous. */
public static class Auto {
public static final class Auto {
/** The number of meters per second that we want to move forward during the taxi auto */
public static double TAXI_AUTO_METERS_PER_SECOND = 1.0;
public static final double TAXI_AUTO_METERS_PER_SECOND = 1.0;

/** The number of seconds that we want to taxi for */
public static double TAXI_AUTO_DURATION_SECONDS = 2.0;
public static final double TAXI_AUTO_DURATION_SECONDS = 2.0;

/** The amount of time we want/need to drive away from the amp in auto. */
public static double DRIVE_AWAY_FROM_AMP_TIME = 2.0;
public static final double DRIVE_AWAY_FROM_AMP_TIME = 2.0;

/** The time we use to back away from the amp in auto. */
public static double BACK_UP_FROM_AMP_TIME = 0.5;
public static final double BACK_UP_FROM_AMP_TIME = 0.5;

/** The amount of time that we want to run the fire note command in auto. */
public static final double FIRE_NOTE_FOR_TIME = 4.0;
}

/** Constants for the Intake System */
public static class Intake {
public static final class Intake {
/** Motor id of the Lower Intake motor. */
public static final int LOWER_INTAKE_MOTOR_ID = 1;

Expand Down Expand Up @@ -161,9 +161,9 @@ public static class Intake {
}

/** Holds contstants for the Limelights. */
public static class Limelight {
public static final class Limelight {
/** Constants for aiming Limelight. */
public static class AimingLimelight {
public static final class AimingLimelight {
/** Our name in the networktables for the limelight */
public static final String LIMELIGHT_NAME = "limelight";

Expand Down Expand Up @@ -203,18 +203,18 @@ public static class AimingLimelight {
public static final double DISTANCE_DONE_THRESHOLD = 4;

/** Holds pipeline numbers for this Limelight. */
public static class PipelineNumbers {
public static final class PipelineNumbers {
/** The Limelight pipeline number for amp AprilTags. */
public static final double AMP_PIPELINE_NUMBER = 1;
}
}

/** Number of radians per second that we want to turn while seeking an unseen target. */
public static double LIMELIGHT_SEEKING_RADIANS_PER_SECOND = Math.PI / 2;
public static final double LIMELIGHT_SEEKING_RADIANS_PER_SECOND = Math.PI / 2;
}

/** The constants for the climber. */
public static class Climber {
public static final class Climber {
/** The motor id for the climber */
public static final int CLIMBER_MOTOR_ID = 13;

Expand All @@ -225,11 +225,11 @@ public static class Climber {
public static final boolean CLIMBER_INVERTED = true;

/** Idle mode for the climber motors. (Either brake or coast) */
public static IdleMode CLIMBER_MOTOR_IDLE_MODE = IdleMode.kBrake;
public static final IdleMode CLIMBER_MOTOR_IDLE_MODE = IdleMode.kBrake;
}

/** The constants for the USB cameras */
public static class Camera {
public static final class Camera {
/** The camera id for the intake camera. */
public static final int INTAKE_CAMERA_ID = 0;
}
Expand Down

0 comments on commit 06c2b91

Please sign in to comment.