SHARE
TWEET

Untitled

a guest Jun 23rd, 2014 231 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class DriveTele extends CommandBase {
  2.    
  3.     public DriveTele() {
  4.         // Use requires() here to declare subsystem dependencies
  5.         // eg. requires(chassis);
  6.         requires(chassis); //assuming you have a Chassis object in your CommandBase.java. If not, then requires(new Chassis());
  7.     }
  8.  
  9.     // Called just before this Command runs the first time
  10.     protected void initialize() {
  11.     }
  12.  
  13.     // Called repeatedly when this Command is scheduled to run
  14.     protected void execute() {
  15.         chassis.driveTele(oi.xcon2.getLeftJoyY(), oi.xcon2.getRightJoyY());
  16.     }
  17.  
  18.     // Make this return true when this Command no longer needs to run execute()
  19.     protected boolean isFinished() {
  20.         return false;
  21.     }
  22.  
  23.     // Called once after isFinished returns true
  24.     protected void end() {
  25.     }
  26.  
  27.     // Called when another command which requires one or more of the same
  28.     // subsystems is scheduled to run
  29.     protected void interrupted() {
  30.     }
  31. }
RAW Paste Data
Top