everything done except mapping buttons to actions
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / Robot.java
index b5ac5b7a98a13dd563a37dfbe2e9e504cd165755..23a43b7812daab2e2bfe1d188ebfcb025f998b7c 100644 (file)
@@ -13,9 +13,11 @@ import org.usfirst.frc.team3501.robot.subsystems.*;
 
 public class Robot extends IterativeRobot {
 
-       public static final Drivetrain drivetrain = new Drivetrain();
-       public static final Arm               arm = new Arm();
-       public static final Claw             claw = new Claw();
+       public static Drivetrain drivetrain;
+       public static Arm arm;
+       public static Claw claw;
+
+       public static Pneumatics pneumatics;
 
        public static OI oi;
 
@@ -26,6 +28,12 @@ public class Robot extends IterativeRobot {
     public void robotInit() {
                oi = new OI();
 
+               drivetrain = new Drivetrain();
+               arm        = new Arm();
+               claw       = new Claw();
+
+               pneumatics = new Pneumatics();
+
                chooseAuto();
     }
 
@@ -34,6 +42,8 @@ public class Robot extends IterativeRobot {
        }
 
     public void autonomousInit() {
+        pneumatics.start();
+
         autonomousCommand = (Command) autoChooser.getSelected();
         autonomousCommand.start();
     }
@@ -43,6 +53,8 @@ public class Robot extends IterativeRobot {
     }
 
     public void teleopInit() {
+        pneumatics.start();
+
         autonomousCommand.cancel();
     }
 
@@ -54,6 +66,10 @@ public class Robot extends IterativeRobot {
         LiveWindow.run();
     }
 
+    public void disabledInit() {
+        pneumatics.stop();
+    }
+
     private void chooseAuto() {
         autoChooser = new SendableChooser();