diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 9f6a83e..2d90cd2 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -12,6 +12,7 @@ import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.wpilibj.GenericHID; import frc4388.utility.controller.XboxController; +import frc4388.utility.controller.DeadbandedWhateverController; import frc4388.utility.controller.DeadbandedXboxController; import frc4388.robot.Constants.OIConstants; import edu.wpi.first.wpilibj2.command.button.JoystickButton; @@ -59,7 +60,7 @@ public class RobotContainer { public final Shooter m_robotShooter = new Shooter(m_robotMap.leftShooter, m_robotMap.rightShooter); /* Controllers */ - private final DeadbandedXboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID); + private final DeadbandedXboxController m_driverXbox = new DeadbandedWhateverController(OIConstants.XBOX_DRIVER_ID); private final DeadbandedXboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID); private final DeadbandedXboxController m_autoRecorderXbox = new DeadbandedXboxController(OIConstants.XBOX_PROGRAMMER_ID); diff --git a/src/main/java/frc4388/robot/subsystems/Intake.java b/src/main/java/frc4388/robot/subsystems/Intake.java new file mode 100644 index 0000000..f32d113 --- /dev/null +++ b/src/main/java/frc4388/robot/subsystems/Intake.java @@ -0,0 +1,17 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc4388.robot.subsystems; + +import edu.wpi.first.wpilibj2.command.SubsystemBase; + +public class Intake extends SubsystemBase { + /** Creates a new Intake. */ + public Intake() {} + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +} diff --git a/src/main/java/frc4388/robot/subsystems/Microbot.java b/src/main/java/frc4388/robot/subsystems/Microbot.java new file mode 100644 index 0000000..6b88849 --- /dev/null +++ b/src/main/java/frc4388/robot/subsystems/Microbot.java @@ -0,0 +1,17 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc4388.robot.subsystems; + +import edu.wpi.first.wpilibj2.command.SubsystemBase; + +public class Microbot extends SubsystemBase { + /** Creates a new Microbot. */ + public Microbot() {} + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +} diff --git a/src/main/java/frc4388/robot/subsystems/Shooter.java b/src/main/java/frc4388/robot/subsystems/Shooter.java index 877a78f..07588fa 100644 --- a/src/main/java/frc4388/robot/subsystems/Shooter.java +++ b/src/main/java/frc4388/robot/subsystems/Shooter.java @@ -24,8 +24,8 @@ public class Shooter extends SubsystemBase { } public void spin(double speed) { - leftShooter.set(speed); - rightShooter.set(speed); + leftShooter.set(-speed); + rightShooter.set(-speed); } public void spin() { diff --git a/src/main/java/frc4388/utility/controller/DeadbandedWhateverController.java b/src/main/java/frc4388/utility/controller/DeadbandedWhateverController.java new file mode 100644 index 0000000..66ae662 --- /dev/null +++ b/src/main/java/frc4388/utility/controller/DeadbandedWhateverController.java @@ -0,0 +1,19 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc4388.utility.controller; + +import static frc4388.robot.Constants.OIConstants.LEFT_AXIS_DEADBAND; + +import edu.wpi.first.math.geometry.Translation2d; +import edu.wpi.first.wpilibj.XboxController; + +/** Add your docs here. */ +public class DeadbandedWhateverController extends DeadbandedXboxController { + public DeadbandedWhateverController(int port) { + super(port); + } + + @Override public Translation2d getRight() { return skewToDeadzonedCircle(-getRawAxis(2), getRawAxis(3)); } +} diff --git a/src/main/java/frc4388/utility/controller/XboxController.java b/src/main/java/frc4388/utility/controller/XboxController.java index 8b8f0f8..5c406a7 100644 --- a/src/main/java/frc4388/utility/controller/XboxController.java +++ b/src/main/java/frc4388/utility/controller/XboxController.java @@ -15,6 +15,8 @@ public class XboxController implements IHandController public static final int RIGHT_TRIGGER_AXIS = 3; public static final int RIGHT_X_AXIS = 4; public static final int RIGHT_Y_AXIS = 5; + public static final int RIGHT_Z_AXIS = 2; + public static final int RIGHT_Z_ROTATION = 3; public static final int LEFT_RIGHT_DPAD_AXIS = 6; public static final int TOP_BOTTOM_DPAD_AXIS = 6;