Search in sources :

Example 1 with CubeTilter

use of org.usfirst.frc948.NRGRobot2018.subsystems.CubeTilter 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");
}
Also used : CubeLifter(org.usfirst.frc948.NRGRobot2018.subsystems.CubeLifter) CubeSolenoid(org.usfirst.frc948.NRGRobot2018.subsystems.CubeSolenoid) PositionTracker(org.usfirst.frc948.NRGRobot2018.utilities.PositionTracker) Climber(org.usfirst.frc948.NRGRobot2018.subsystems.Climber) CubeTilter(org.usfirst.frc948.NRGRobot2018.subsystems.CubeTilter) Drive(org.usfirst.frc948.NRGRobot2018.subsystems.Drive) CubeAcquirer(org.usfirst.frc948.NRGRobot2018.subsystems.CubeAcquirer)

Aggregations

Climber (org.usfirst.frc948.NRGRobot2018.subsystems.Climber)1 CubeAcquirer (org.usfirst.frc948.NRGRobot2018.subsystems.CubeAcquirer)1 CubeLifter (org.usfirst.frc948.NRGRobot2018.subsystems.CubeLifter)1 CubeSolenoid (org.usfirst.frc948.NRGRobot2018.subsystems.CubeSolenoid)1 CubeTilter (org.usfirst.frc948.NRGRobot2018.subsystems.CubeTilter)1 Drive (org.usfirst.frc948.NRGRobot2018.subsystems.Drive)1 PositionTracker (org.usfirst.frc948.NRGRobot2018.utilities.PositionTracker)1