Added Leveler

This commit is contained in:
KyraRivera
2020-02-06 19:51:17 -07:00
parent 0762e5db67
commit c0ead80055
5 changed files with 106 additions and 0 deletions
@@ -17,9 +17,11 @@ import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import frc4388.robot.Constants.*;
import frc4388.robot.commands.DriveWithJoystick;
import frc4388.robot.commands.RunIntakeWithTriggers;
import frc4388.robot.commands.RunLevelerWithJoystick;
import frc4388.robot.subsystems.Drive;
import frc4388.robot.subsystems.Intake;
import frc4388.robot.subsystems.LED;
import frc4388.robot.subsystems.Leveler;
import frc4388.utility.LEDPatterns;
import frc4388.utility.controller.IHandController;
import frc4388.utility.controller.XboxController;
@@ -36,6 +38,7 @@ public class RobotContainer {
private final Drive m_robotDrive = new Drive();
private final LED m_robotLED = new LED();
private final Intake m_robotIntake = new Intake();
private final Leveler m_robotLeveler = new Leveler();
/* Controllers */
private final XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID);
@@ -54,6 +57,8 @@ public class RobotContainer {
m_robotIntake.setDefaultCommand(new RunIntakeWithTriggers(m_robotIntake, getOperatorController()));
// continually sends updates to the Blinkin LED controller to keep the lights on
m_robotLED.setDefaultCommand(new RunCommand(() -> m_robotLED.updateLED(), m_robotLED));
// drives the robot with an axis input from the driver controller
m_robotLeveler.setDefaultCommand(new RunLevelerWithJoystick(m_robotLeveler, getDriverController()));
}
/**