add drive methods in drivetrain subsytem
authorMeryem Esa <meresa14@gmail.com>
Tue, 10 Jan 2017 04:38:45 +0000 (20:38 -0800)
committerdaniel watson <ozzloy@gmail.com>
Wed, 11 Jan 2017 04:20:07 +0000 (20:20 -0800)
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 426063628b9b5cd45a0e59f656f474aaa0c902c1..23db318cedcf233020e81f98e98707739c88ec5a 100644 (file)
@@ -40,10 +40,51 @@ public class DriveTrain extends Subsystem {
         return driveTrain;
     }
 
-    public void setMotorSpeeds(double left, double right) {
+    // DRIVE METHODS
+    public void setMotorValues(double left, double right) {
         robotDrive.tankDrive(left, right);
     }
 
+    public void joystickDrive(double left, double right) {
+        robotDrive.tankDrive(left, right);
+    }
+
+    public void stop() {
+        setMotorValues(0, 0);
+    }
+
+    public double getFrontLeftMotorVal() {
+        return frontLeft.get();
+    }
+
+    public double getFrontRightMotorVal() {
+        return frontRight.get();
+    }
+
+    public double getRearLeftMotorVal() {
+        return frontLeft.get();
+    }
+
+    public double getRearRightMotorVal() {
+        return frontLeft.get();
+    }
+
+    public CANTalon getFrontLeft() {
+        return frontLeft;
+    }
+
+    public CANTalon getFrontRight() {
+        return frontRight;
+    }
+
+    public CANTalon getRearLeft() {
+        return rearLeft;
+    }
+
+    public CANTalon getRearRight() {
+        return rearRight;
+    }
+
     // ENCODER METHODS
 
     public double getLeftEncoder() {