Guest User

Untitled

a guest
Mar 5th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.22 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package us.mn.k12.fairmont.robotics.commands;
  7.  
  8. /**
  9.  *
  10.  * @author Teacher
  11.  */
  12. public class DriveWithJoysticks extends CommandBase {
  13.    
  14.     public DriveWithJoysticks() {
  15.         // Use requires() here to declare subsystem dependencies
  16.         requires(drivetrain);
  17.     }
  18.  
  19.     // Called just before this Command runs the first time
  20.     protected void initialize() {
  21.     }
  22.  
  23.     // Called repeatedly when this Command is scheduled to run
  24.     protected void execute() {
  25.         drivetrain.driveMechanum_Cartesian(oi.getRightJoyY(), oi.getRightJoyX(), oi.getRightJoyR());
  26. //        drivetrain.drivetest(oi.getRightJoyY(), oi.getLeftJoyY());
  27.     }
  28.  
  29.     // Make this return true when this Command no longer needs to run execute()
  30.     protected boolean isFinished() {
  31.         return false;
  32.     }
  33.  
  34.     // Called once after isFinished returns true
  35.     protected void end() {
  36.     }
  37.  
  38.     // Called when another command which requires one or more of the same
  39.     // subsystems is scheduled to run
  40.     protected void interrupted() {
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment