Skip to content
Merged

fix #30

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,37 @@ public enum RobotEdition {
public static final RobotMode ROBOT_MODE = Robot.isReal() ? RobotMode.REAL : RobotMode.SIM;
// public static final RobotEdition ROBOT_EDITION = RobotEdition.COMP;
public static final RobotEdition ROBOT_EDITION;
public static final RobotEdition SIM_ROBOT_EDITION = RobotEdition.ALPHA;
public static final RobotEdition REPLAY_ROBOT_EDITION = RobotEdition.ALPHA;

// TODO get rio serial numbers
// for replay to work properly this needs to match the edition in the log
static {
switch (RobotController.getSerialNumber()) {
case "1":
ROBOT_EDITION = RobotEdition.ALPHA;
switch (ROBOT_MODE) {
case REAL:
switch (RobotController.getSerialNumber()) {
case "023D2BD2":
ROBOT_EDITION = RobotEdition.ALPHA;
break;
case "2": // TODO get comp rio serial number
ROBOT_EDITION = RobotEdition.COMP;
break;
default:
// defaulting to comp is probably safer?
ROBOT_EDITION = RobotEdition.COMP;
}
break;
case "2":
ROBOT_EDITION = RobotEdition.COMP;
case SIM:
// you're gonna have to just lock in on this
ROBOT_EDITION = SIM_ROBOT_EDITION;
break;
case REPLAY:
// you're gonna have to just lock in on this
ROBOT_EDITION = REPLAY_ROBOT_EDITION;
break;

default:
// defaulting to comp is probably safer?
ROBOT_EDITION = RobotEdition.COMP;
// TODO change to comp once there is a comp bot
ROBOT_EDITION = RobotEdition.ALPHA;
}
}

Expand Down