Skip to content

Commit

Permalink
refactor: ids go in constants
Browse files Browse the repository at this point in the history
  • Loading branch information
rutmanz committed Feb 6, 2024
1 parent 5243b7e commit 46ae2ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/main/java/org/team1540/robot2024/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ public static class Drivetrain {
}

public static class Indexer {
// TODO: fix these constants

public static final int BEAM_BREAK_ID = 0;
public static final int INTAKE_ID = 11;
public static final int FEEDER_ID = 12;

// TODO: fix these constants
public static final double FEEDER_KP = 0.5;
public static final double FEEDER_KI = 0.1;
public static final double FEEDER_KD = 0.001;
Expand All @@ -77,7 +80,7 @@ public static class Indexer {
public static final double INTAKE_GEAR_RATIO = 1.0;
public static final double INTAKE_MOI = 0.025;
public static final double FEEDER_MOI = 0.025;
public static final int BEAM_BREAK_ID = 0;



}
Expand Down Expand Up @@ -217,10 +220,11 @@ public enum ElevatorState {
}

public static class Tramp {
public static final int TRAMP_BEAM_BREAK_CHANNEL = 1;
public static final double GEAR_RATIO = 3.0;
public static final double TRAP_SCORING_TIME_SECONDS = 1.114; //TODO: Find these values :D
public static final int TRAMP_MOTOR_ID = -1; //TODO: Configure this later
public static final int TRAMP_BEAM_BREAK_CHANNEL = -1; //TODO: Configure this later
public static final int MOTOR_ID = -1; //TODO: Configure this later


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import org.team1540.robot2024.Constants.Tramp;

public class TrampIOSparkMax implements TrampIO {
private final DigitalInput beamBreak = new DigitalInput(0);
private final DigitalInput beamBreak = new DigitalInput(Tramp.TRAMP_BEAM_BREAK_CHANNEL);
//TODO: Potentially change name :D
private final CANSparkMax motor = new CANSparkMax(Tramp.TRAMP_MOTOR_ID, MotorType.kBrushless);
private final CANSparkMax motor = new CANSparkMax(Tramp.MOTOR_ID, MotorType.kBrushless);
private final RelativeEncoder motorEncoder = motor.getEncoder();

public TrampIOSparkMax() {
Expand Down

0 comments on commit 46ae2ef

Please sign in to comment.