| 1 | |
| 2 | package org.usfirst.frc.team3501.robot; |
| 3 | |
| 4 | import edu.wpi.first.wpilibj.IterativeRobot; |
| 5 | import edu.wpi.first.wpilibj.command.Command; |
| 6 | import edu.wpi.first.wpilibj.command.Scheduler; |
| 7 | import edu.wpi.first.wpilibj.livewindow.LiveWindow; |
| 8 | |
| 9 | import org.usfirst.frc.team3501.robot.commands.*; |
| 10 | import org.usfirst.frc.team3501.robot.subsystems.*; |
| 11 | |
| 12 | public class Robot extends IterativeRobot { |
| 13 | |
| 14 | public static final Drivetrain drivetrain = new Drivetrain(); |
| 15 | public static final Arm arm = new Arm(); |
| 16 | public static final Claw claw = new Claw(); |
| 17 | |
| 18 | public static OI oi; |
| 19 | |
| 20 | Command autonomousCommand; |
| 21 | |
| 22 | public void robotInit() { |
| 23 | oi = new OI(); |
| 24 | |
| 25 | double time = 1.2; |
| 26 | double speed = 0.7; |
| 27 | autonomousCommand = new DriveForward(time, speed); |
| 28 | } |
| 29 | |
| 30 | public void disabledPeriodic() { |
| 31 | Scheduler.getInstance().run(); |
| 32 | } |
| 33 | |
| 34 | public void autonomousInit() { |
| 35 | autonomousCommand.start(); |
| 36 | } |
| 37 | |
| 38 | public void autonomousPeriodic() { |
| 39 | Scheduler.getInstance().run(); |
| 40 | } |
| 41 | |
| 42 | public void teleopInit() { |
| 43 | autonomousCommand.cancel(); |
| 44 | } |
| 45 | |
| 46 | public void teleopPeriodic() { |
| 47 | Scheduler.getInstance().run(); |
| 48 | |
| 49 | |
| 50 | } |
| 51 | |
| 52 | public void testPeriodic() { |
| 53 | LiveWindow.run(); |
| 54 | } |
| 55 | } |