Skip to content

Commit

Permalink
Turned ported IDs of End Effector motors to constants
Browse files Browse the repository at this point in the history
added End effort class to Constants
  • Loading branch information
EldraziSquirrel committed Oct 16, 2023
1 parent 547e051 commit a474dc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ public static class ArmConstants {
0.047,0.046,0.043,0.042,0.04,0.0375,0.035,0.03,0.025,0.02,0.01,0};
}

public static class EfConstants {
public static int EF_UPPER_PORT = 14;
public static int EF_LOWER_PORT = 13;
}


}
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/subsystems/EndEffectorSub.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
import com.ctre.phoenix.motorcontrol.TalonSRXControlMode;
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;


public class EndEffectorSub extends SubsystemBase {
private final TalonSRX endEffectorLower;
private final TalonSRX endEffectorUpper;

public EndEffectorSub() {
endEffectorLower = new TalonSRX(13);
endEffectorUpper= new TalonSRX(14);
endEffectorLower = new TalonSRX(Constants.EfConstants.EF_LOWER_PORT);
endEffectorUpper= new TalonSRX(Constants.EfConstants.EF_UPPER_PORT);

endEffectorUpper.configFactoryDefault();
endEffectorUpper.configFactoryDefault();
Expand Down

0 comments on commit a474dc5

Please sign in to comment.