From a6048afb5b5566b16a4847bcd225b5ea2bd35518 Mon Sep 17 00:00:00 2001 From: aarav18 Date: Sat, 22 Jan 2022 13:55:37 -0700 Subject: [PATCH] Update RobotContainer.java --- src/main/java/frc4388/robot/RobotContainer.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index b7542bc..09ebb98 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -13,7 +13,7 @@ import edu.wpi.first.wpilibj2.command.InstantCommand; import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.button.JoystickButton; import frc4388.robot.Constants.*; -import frc4388.robot.subsystems.Drive; +import frc4388.robot.subsystems.FalconTester; import frc4388.robot.subsystems.LED; import frc4388.utility.LEDPatterns; import frc4388.utility.controller.IHandController; @@ -31,11 +31,11 @@ public class RobotContainer { private final RobotMap m_robotMap = new RobotMap(); /* Subsystems */ - private final Drive m_robotDrive = new Drive(m_robotMap.leftFrontMotor, m_robotMap.rightFrontMotor, - m_robotMap.leftBackMotor, m_robotMap.rightBackMotor, m_robotMap.driveTrain, m_robotMap.gyroDrive); private final LED m_robotLED = new LED(m_robotMap.LEDController); + private final FalconTester m_falconTester = new FalconTester(m_robotMap.falconTestMotor); + /* Controllers */ private final XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID); private final XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID); @@ -48,9 +48,9 @@ public class RobotContainer { /* Default Commands */ // drives the robot with a two-axis input from the driver controller - m_robotDrive.setDefaultCommand( - new RunCommand(() -> m_robotDrive.driveWithInput(getDriverController().getLeftYAxis(), - getDriverController().getRightXAxis()), m_robotDrive)); + m_falconTester.setDefaultCommand( + new RunCommand(() -> m_falconTester.setMotorSpeed(0.1d * getDriverController().getLeftYAxis()), + m_falconTester)); // continually sends updates to the Blinkin LED controller to keep the lights on m_robotLED.setDefaultCommand(new RunCommand(() -> m_robotLED.updateLED(), m_robotLED)); } @@ -64,8 +64,8 @@ public class RobotContainer { private void configureButtonBindings() { /* Driver Buttons */ // test command to spin the robot while pressing A on the driver controller - new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON) - .whileHeld(() -> m_robotDrive.driveWithInput(0, 1)); + // new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON) + // .whileHeld(() -> m_robotDrive.driveWithInput(0, 1)); /* Operator Buttons */ // activates "Lit Mode"