package org.usfirst.frc3501.RiceCatRobot.subsystems;
-import org.usfirst.frc3501.RiceCatRobot.RobotMap;
+import org.usfirst.frc3501.RiceCatRobot.robot.RobotMap;
import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.Encoder;
}
public double getRightSpeed() {
- // Returns in per second
+ // Returns inches per second
return rightEncoder.getRate();
}
return leftEncoder.getRate();
}
+ public double getAverageSpeed() {
+ return (getRightSpeed() + getLeftSpeed()) / 2;
+ }
+
public double getRightDistance() {
- // Returns distance in in
+ // Returns distance in inches
return rightEncoder.getDistance();
}
public double getLeftDistance() {
- // Returns distance in in
+ // Returns distance in inches
return leftEncoder.getDistance();
}
+ public void stop() {
+ setMotorSpeeds(0, 0);
+ }
+
public void setMotorSpeeds(double leftSpeed, double rightSpeed) {
if (Math.abs(leftSpeed) < RobotMap.DRIVE_DEAD_ZONE) {
leftSpeed = 0;
@Override
protected void initDefaultCommand() {
}
-
- public void stop() {
- setMotorSpeeds(0, 0);
- }
}