Adding a few subsystems, not sure I like the use of periodic for the shooter and intake pivot subsystems
This commit is contained in:
@@ -4,28 +4,22 @@ import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||
|
||||
public class Utilities {
|
||||
static String gameData;
|
||||
|
||||
static Boolean Blue = false;
|
||||
|
||||
static Boolean Red = false;
|
||||
|
||||
public static final double kG = -9.81;
|
||||
|
||||
public static Alliance ShiftFirst() {
|
||||
gameData = DriverStation.getGameSpecificMessage();
|
||||
|
||||
public static Alliance whoHasFirstShift() {
|
||||
String gameData = DriverStation.getGameSpecificMessage();
|
||||
|
||||
if(gameData.length() > 0) {
|
||||
switch (gameData.charAt(0)) {
|
||||
case 'B' :
|
||||
return Alliance.Red;
|
||||
case 'R' :
|
||||
return Alliance.Blue;
|
||||
default :
|
||||
return null;
|
||||
case 'B':
|
||||
return Alliance.Red;
|
||||
case 'R':
|
||||
return Alliance.Blue;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user