diff --git a/src/main/java/edu/bearbots/BearLib/drivebase/TankDrivebase.java b/src/main/java/edu/bearbots/BearLib/drivebase/TankDrivebase.java index 6a87612..43da4bc 100644 --- a/src/main/java/edu/bearbots/BearLib/drivebase/TankDrivebase.java +++ b/src/main/java/edu/bearbots/BearLib/drivebase/TankDrivebase.java @@ -1,4 +1,14 @@ package edu.bearbots.BearLib.drivebase; +import com.revrobotics.CANSparkMax; + +import edu.wpi.first.wpilibj.drive.DifferentialDrive; + public abstract class TankDrivebase extends Drivebase { + private static DifferentialDrive differentialDrive; + public TankDrivebase(CANSparkMax frontLeft, CANSparkMax backLeft, CANSparkMax frontRight, CANSparkMax backRight) { + backLeft.follow(frontLeft); + backRight.follow(frontRight); + differentialDrive = new DifferentialDrive(frontLeft, frontRight); + } } \ No newline at end of file diff --git a/src/main/java/frc/robot/RebindHat.java b/src/main/java/frc/robot/RebindHat.java index c131f10..593f331 100644 --- a/src/main/java/frc/robot/RebindHat.java +++ b/src/main/java/frc/robot/RebindHat.java @@ -1,11 +1,19 @@ package frc.robot; -/** @deprecated */ -// dude come onthis is the deffinition fo unnesseary complecity -@Deprecated + public class RebindHat { public static double JoystickToYAxis() { - + if (RobotContainer.m_armController.getPOV() == -1 + || RobotContainer.m_armController.getPOV() == 90 + || RobotContainer.m_armController.getPOV() == 270) { + return 0; + } + if (RobotContainer.m_armController.getPOV() > 270 + || RobotContainer.m_armController.getPOV() < 90) { + return 1; + } else { + return -1; + } } public static double JoystickToXAxis() {