1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.SetLowGear
;
4 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.TimeDrive
;
5 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.DriveTrain
;
6 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.IntakeArm
;
7 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Shooter
;
9 import edu
.wpi
.first
.wpilibj
.CameraServer
;
10 import edu
.wpi
.first
.wpilibj
.IterativeRobot
;
11 import edu
.wpi
.first
.wpilibj
.command
.Scheduler
;
12 import edu
.wpi
.first
.wpilibj
.smartdashboard
.SendableChooser
;
13 import edu
.wpi
.first
.wpilibj
.smartdashboard
.SmartDashboard
;
15 public class Robot
extends IterativeRobot
{
17 public static DriveTrain driveTrain
;
18 public static Shooter shooter
;
19 public static IntakeArm intakeArm
;
21 SendableChooser frontChooser
;
24 CameraServer cameraServer
;
27 public void robotInit() {
28 driveTrain
= new DriveTrain();
29 shooter
= new Shooter();
30 intakeArm
= new IntakeArm();
35 frontChooser
= new SendableChooser();
36 frontChooser
.addDefault("Intake is front", false);
37 frontChooser
.addObject("Shooter is front", true);
39 SmartDashboard
.putData("Front chooser", frontChooser
);
41 cameraServer
= CameraServer
.getInstance();
42 cameraServer
.setQuality(50);
43 cameraServer
.startAutomaticCapture();
48 public void autonomousInit() {
49 // get options chosen from drop down menu
51 isFront
= (boolean) frontChooser
.getSelected();
54 driveTrain
.toggleFlipped();
56 Scheduler
.getInstance().add(new TimeDrive(.6, 4));
60 public void autonomousPeriodic() {
62 Scheduler
.getInstance().run();
66 public void teleopInit() {
68 driveTrain
.toggleFlipped();
69 Scheduler
.getInstance().add(new SetLowGear());
73 public void teleopPeriodic() {
74 Scheduler
.getInstance().run();