1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.TimeDrive
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.DriveTrain
;
5 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Shooter
;
7 import edu
.wpi
.cscore
.AxisCamera
;
8 import edu
.wpi
.cscore
.UsbCamera
;
9 import edu
.wpi
.first
.wpilibj
.CameraServer
;
10 import edu
.wpi
.first
.wpilibj
.IterativeRobot
;
11 import edu
.wpi
.first
.wpilibj
.command
.Scheduler
;
13 public class Robot
extends IterativeRobot
{
14 private static DriveTrain driveTrain
;
16 private static Shooter shooter
;
17 private static UsbCamera camera1
;
18 private static AxisCamera camera2
;
21 public void robotInit() {
22 driveTrain
= DriveTrain
.getDriveTrain();
24 shooter
= Shooter
.getShooter();
25 camera1
= CameraServer
.getInstance().startAutomaticCapture();
26 camera2
= CameraServer
.getInstance().addAxisCamera("10.35.1.11");
30 public static DriveTrain
getDriveTrain() {
31 return DriveTrain
.getDriveTrain();
34 public static OI
getOI() {
38 public static Shooter
getShooter() {
39 return Shooter
.getShooter();
43 public void autonomousInit() {
44 Scheduler
.getInstance().add(new TimeDrive(1.5, 0.4));
48 public void autonomousPeriodic() {
49 Scheduler
.getInstance().run();
54 public void teleopInit() {
58 public void teleopPeriodic() {
59 Scheduler
.getInstance().run();