Skip to content

Commit

Permalink
Arm post bringup
Browse files Browse the repository at this point in the history
  • Loading branch information
manthan-acharya committed Feb 4, 2024
1 parent 05e06b4 commit 02ddc74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
public final class Constants {
public static final int loopPeriodMs = 20;
private static RobotType robotType = RobotType.SIMBOT;
private static RobotType robotType = RobotType.RAINBOWT;
public static final boolean tuningMode = true;

private static boolean invalidRobotAlertSent = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ public class ArmIOKrakenFOC implements ArmIO {
Slot0Configs controllerConfig;

public ArmIOKrakenFOC() {
leaderMotor = new TalonFX(leaderID, "*");
followerMotor = new TalonFX(followerID, "*");
leaderMotor = new TalonFX(leaderID, "canivore");
followerMotor = new TalonFX(followerID, "canivore");
followerMotor.setControl(new Follower(leaderID, true));

// Leader motor configs
TalonFXConfiguration leaderConfig = new TalonFXConfiguration();
leaderConfig.CurrentLimits.StatorCurrentLimit = 60.0;
leaderConfig.CurrentLimits.SupplyCurrentLimit = 40.0;
leaderConfig.Voltage.PeakForwardVoltage = 12.0;
leaderConfig.Voltage.PeakReverseVoltage = 12.0;
// leaderConfig.Voltage.PeakForwardVoltage = 4.0;
// leaderConfig.Voltage.PeakReverseVoltage = -4.0;
leaderConfig.MotorOutput.Inverted =
leaderInverted ? InvertedValue.Clockwise_Positive : InvertedValue.CounterClockwise_Positive;
leaderConfig.Feedback.SensorToMechanismRatio = reduction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public static class ArmConstants {

public static int leaderID =
switch (Constants.getRobot()) {
default -> 1;
default -> 25;
};

public static int followerID =
switch (Constants.getRobot()) {
default -> 2;
default -> 26;
};

public static boolean leaderInverted =
Expand All @@ -94,7 +94,7 @@ public static class ArmConstants {

public static ControllerConstants controllerConstants =
switch (Constants.getRobot()) {
case SIMBOT -> new ControllerConstants(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.13);
case SIMBOT -> new ControllerConstants(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
case RAINBOWT -> new ControllerConstants(0.0, 0.0, 0.0, 0.0, 1.84, 0.0001, 0.13);
case COMPBOT -> new ControllerConstants(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
};
Expand Down

0 comments on commit 02ddc74

Please sign in to comment.