use of org.usfirst.frc948.NRGRobot2018.subsystems.CubeSolenoid in project NRGRobot2018 by NRG948.
the class Robot method robotInit.
/**
* This function is run when the robot is first started up and should be used for any
* initialization code.
*/
@Override
public void robotInit() {
System.out.println("robotInit() started");
preferences = Preferences.getInstance();
RobotMap.init();
drive = new Drive();
cubeAcquirer = new CubeAcquirer();
cubeLifter = new CubeLifter();
cubeTilter = new CubeTilter();
climber = new Climber();
positionTracker = new PositionTracker(0, 0);
cubeSolenoid = new CubeSolenoid();
OI.init();
OI.initTriggers();
// OI must be constructed after subsystems. If the OI creates Commands
// (which it very likely will), subsystems are not guaranteed to be
// constructed yet. Thus, their requires() statements may grab null
// pointers. Bad news. Don't move it.
initPreferences();
RobotMap.pixy.startVisionThread();
RobotMap.arduino.startArduinoThread();
autoPositionChooser = new SendableChooser<AutoStartingPosition>();
autoPositionChooser.addDefault("Left", AutoStartingPosition.LEFT);
autoPositionChooser.addObject("Center", AutoStartingPosition.CENTER);
autoPositionChooser.addObject("Right", AutoStartingPosition.RIGHT);
autoMovementChooser = new SendableChooser<AutoMovement>();
autoMovementChooser.addObject("Switch", AutoMovement.SWITCH);
autoMovementChooser.addObject("Scale", AutoMovement.SCALE);
autoMovementChooser.addDefault("Both", AutoMovement.BOTH);
autoMovementChooser.addDefault("Forward", AutoMovement.FORWARD);
autoMovementChooser.addDefault("None", AutoMovement.NONE);
SmartDashboard.putData("Choose autonomous position", autoPositionChooser);
SmartDashboard.putData("Choose autonomous movement", autoMovementChooser);
System.out.println("robotInit() done");
}
Aggregations