Skip to content

Commit

Permalink
renamed some variables
Browse files Browse the repository at this point in the history
  • Loading branch information
PGgit08 committed Jan 21, 2025
1 parent 2e88c10 commit 378c0cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static class WristevatorConstants {
public static final AngularVelocity maxWristSpeed = RadiansPerSecond.of(Math.PI);
public static final LinearVelocity maxElevatorSpeed = MetersPerSecond.of(1);

public static final int elevatorSwitchPort = 0;
public static final int homeSwitch = 0;

public static final int leftMotorId = 0;
public static final int rightMotorId = 1;
Expand All @@ -103,7 +103,7 @@ public static class SerializerConstants {
}

public static class ManipulatorConstants {
public static final int manipulatorBeamPort = 3;
public static final int manipulatorSwitchPort = 4;
public static final int beamPort = 3;
public static final int switchPort = 4;
}
}
10 changes: 4 additions & 6 deletions src/main/java/frc/robot/subsystems/Manipulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
public class Manipulator extends AdvancedSubsystem {
private final Consumer<Piece> _currentPieceSetter;

private final DigitalInput _manipulatorBeam =
new DigitalInput(ManipulatorConstants.manipulatorBeamPort);
private final DigitalInput _algaeSwitch =
new DigitalInput(ManipulatorConstants.manipulatorSwitchPort);
private final DigitalInput _beam = new DigitalInput(ManipulatorConstants.beamPort);
private final DigitalInput _limitSwitch = new DigitalInput(ManipulatorConstants.switchPort);

private final Trigger _beamBroken = new Trigger(this::getBeam);
private final Trigger _switchPressed = new Trigger(this::getSwitch);
Expand Down Expand Up @@ -67,13 +65,13 @@ public double getSpeed() {

@Logged(name = "Manipulator Beam")
public boolean getBeam() {
return !_manipulatorBeam.get();
return !_beam.get();
}

@Logged(name = "Manipulator Switch")
public boolean getSwitch() {
// TODO: might have two switches
return _algaeSwitch.get();
return _limitSwitch.get();
}

/** Set the speed of the manipulator feed motor in rad/s. */
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/frc/robot/subsystems/Wristevator.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ public Distance getHeight() {
private final TalonFX _wristMotor =
new TalonFX(WristevatorConstants.wristMotorId, Constants.canivore);

private final DigitalInput _homeSwitch =
new DigitalInput(WristevatorConstants.elevatorSwitchPort);
private final DigitalInput _homeSwitch = new DigitalInput(WristevatorConstants.homeSwitch);

private final DIOSim _homeSwitchSim;

Expand Down

0 comments on commit 378c0cf

Please sign in to comment.