Skip to content

Commit

Permalink
get rid of robo rio serial number selection that doesnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
mpatankar6 committed Apr 22, 2024
1 parent d7a3135 commit b3f9968
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,14 @@
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import edu.wpi.first.wpilibj.Filesystem;
import edu.wpi.first.wpilibj.RobotController;
import java.io.IOException;
import java.nio.file.Path;
import java.util.function.BooleanSupplier;

public final class Constants {
public static final Mode kCurrentMode = Mode.kReal;
public static final RobotName kRobot;

static {
final String rioSerialNumber = RobotController.getSerialNumber();
if (rioSerialNumber.equals(RobotName.kViper.rioSerialNumber)) kRobot = RobotName.kBlackMamba;
else if (rioSerialNumber.equals(RobotName.kBlackMamba.rioSerialNumber))
kRobot = RobotName.kBlackMamba;
else kRobot = RobotName.kBlackMamba;
}

// Whether or not the current robot is Viper or Black Mamba
public static final boolean kIsViper = false;
public static final boolean kIsSim = Constants.kCurrentMode.equals(Mode.kSim);
public static final String kDrivetrainCanBus = "CANivore1";
Expand Down Expand Up @@ -58,15 +49,4 @@ public static enum Mode {
kSim,
kReplay
}

public static enum RobotName {
kViper("032380FD"),
kBlackMamba("032243C9");

public final String rioSerialNumber;

private RobotName(String rioSerialNumber) {
this.rioSerialNumber = rioSerialNumber;
}
}
}

0 comments on commit b3f9968

Please sign in to comment.