e0f075b9c9c237882651e809ce8bd0980c7f457d
1 package org
.usfirst
.frc
.team3501
.robot
;
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
;
7 import edu
.wpi
.first
.wpilibj
.IterativeRobot
;
8 import edu
.wpi
.first
.wpilibj
.command
.Scheduler
;
9 import edu
.wpi
.first
.wpilibj
.smartdashboard
.SmartDashboard
;
11 public class Robot
extends IterativeRobot
{
12 private static DriveTrain driveTrain
;
13 private static Shooter shooter
;
15 private static Intake intake
;
18 public void robotInit() {
19 driveTrain
= DriveTrain
.getDriveTrain();
21 shooter
= Shooter
.getShooter();
22 intake
= Intake
.getIntake();
25 public static DriveTrain
getDriveTrain() {
26 return DriveTrain
.getDriveTrain();
29 public static Shooter
getShooter() {
30 return Shooter
.getShooter();
33 public static OI
getOI() {
37 public static Intake
getIntake() {
38 return Intake
.getIntake();
41 // If the gear values do not match in the left and right piston, then they are
42 // both set to high gear
44 public void autonomousInit() {
45 driveTrain
.setHighGear();
47 SmartDashboard
.putNumber(Constants
.DriveTrain
.P_Val
, -1);
48 SmartDashboard
.putNumber(Constants
.DriveTrain
.I_Val
, -1);
49 SmartDashboard
.putNumber(Constants
.DriveTrain
.D_Val
, -1);
54 public void autonomousPeriodic() {
55 Scheduler
.getInstance().run();
57 double P
= SmartDashboard
.getNumber(Constants
.DriveTrain
.P_Val
, -1);
58 double I
= SmartDashboard
.getNumber(Constants
.DriveTrain
.I_Val
, -1);
59 double D
= SmartDashboard
.getNumber(Constants
.DriveTrain
.D_Val
, -1);
60 DriveTrain
.getDriveTrain().getDriveController().setConstants(P
, I
, D
);
64 public void teleopInit() {
69 public void teleopPeriodic() {
70 Scheduler
.getInstance().run();