1ad62e1f4de0b8a7d9d6c262680d41a0e4b19ea3
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / Robot.java
1 package org.usfirst.frc.team3501.robot;
2
3 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
4 import org.usfirst.frc.team3501.robot.subsystems.Intake;
5 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
6
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;
12
13 public class Robot extends IterativeRobot {
14 private static DriveTrain driveTrain;
15 private static Shooter shooter;
16 private static OI oi;
17 private static Intake intake;
18 private static UsbCamera usbCamera;
19 private static CameraServer cameraServer2;
20 private static AxisCamera axisCamera;
21
22 @Override
23 public void robotInit() {
24 driveTrain = DriveTrain.getDriveTrain();
25 oi = OI.getOI();
26 shooter = Shooter.getShooter();
27 intake = Intake.getIntake();
28
29 usbCamera = CameraServer.getInstance().startAutomaticCapture();
30 // cameraServer2 = CameraServer;getInstance();
31 // axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11");
32
33 }
34
35 public static DriveTrain getDriveTrain() {
36 return DriveTrain.getDriveTrain();
37 }
38
39 public static Shooter getShooter() {
40 return Shooter.getShooter();
41 }
42
43 public static OI getOI() {
44 return OI.getOI();
45 }
46
47 public static Intake getIntake() {
48 return Intake.getIntake();
49 }
50
51 // If the gear values do not match in the left and right piston, then they are
52 // both set to high gear
53 @Override
54 public void autonomousInit() {
55 driveTrain.setHighGear();
56 }
57
58 @Override
59 public void autonomousPeriodic() {
60 Scheduler.getInstance().run();
61
62 }
63
64 @Override
65 public void teleopInit() {
66
67 }
68
69 @Override
70 public void teleopPeriodic() {
71 Scheduler.getInstance().run();
72
73 }
74 }