Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
f81d4ab0 | 3 | import org.usfirst.frc.team3501.robot.commands.auton.Auton; |
eeb6c3d9 | 4 | import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear; |
047383c3 | 5 | import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; |
e47f0862 | 6 | import org.usfirst.frc.team3501.robot.subsystems.IntakeArm; |
40348cab E |
7 | import org.usfirst.frc.team3501.robot.subsystems.Shooter; |
8 | ||
1b977a14 | 9 | import edu.wpi.first.wpilibj.CameraServer; |
38a404b3 KZ |
10 | import edu.wpi.first.wpilibj.IterativeRobot; |
11 | import edu.wpi.first.wpilibj.command.Scheduler; | |
9e9154af | 12 | import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; |
38a404b3 KZ |
13 | |
14 | public class Robot extends IterativeRobot { | |
15 | public static OI oi; | |
16 | public static DriveTrain driveTrain; | |
40348cab | 17 | public static Shooter shooter; |
a96fa926 | 18 | public static IntakeArm intakeArm; |
3366a59a | 19 | |
9e9154af | 20 | // Sendable Choosers send a drop down menu to the Smart Dashboard. |
1b977a14 HD |
21 | private static SendableChooser frontChooser; |
22 | private static CameraServer camera; | |
9e9154af | 23 | |
38a404b3 KZ |
24 | @Override |
25 | public void robotInit() { | |
9742fe2e | 26 | driveTrain = new DriveTrain(); |
40348cab | 27 | shooter = new Shooter(); |
a96fa926 | 28 | intakeArm = new IntakeArm(); |
fab544eb HD |
29 | |
30 | oi = new OI(); | |
9e9154af | 31 | |
1b977a14 | 32 | camera = CameraServer.getInstance(); |
8260ae5a | 33 | camera.setQuality(5); |
1b977a14 | 34 | camera.startAutomaticCapture("cam0"); |
9e9154af HD |
35 | } |
36 | ||
38a404b3 KZ |
37 | @Override |
38 | public void autonomousInit() { | |
c859a8e2 HD |
39 | // |
40 | // Scheduler.getInstance().add(new | |
41 | // MoveIntakeArm(Constants.IntakeArm.RETRACT)); | |
42 | // Scheduler.getInstance().add(new TimeDrive(1, .6)); | |
43 | // Scheduler.getInstance().add(new WaitCommand(1)); | |
44 | // Scheduler.getInstance().add(new | |
45 | // MoveIntakeArm(Constants.IntakeArm.EXTEND)); | |
f81d4ab0 | 46 | Scheduler.getInstance().add(new Auton()); |
38a404b3 KZ |
47 | } |
48 | ||
49 | @Override | |
50 | public void autonomousPeriodic() { | |
51 | Scheduler.getInstance().run(); | |
38a404b3 KZ |
52 | } |
53 | ||
54 | @Override | |
55 | public void teleopInit() { | |
eeb6c3d9 | 56 | Scheduler.getInstance().add(new SetLowGear()); |
38a404b3 KZ |
57 | } |
58 | ||
59 | @Override | |
60 | public void teleopPeriodic() { | |
61 | Scheduler.getInstance().run(); | |
1e039ebd E |
62 | } |
63 | ||
38a404b3 | 64 | } |