Set LED Indicators

This commit is contained in:
Keenan D. Buckley
2019-03-14 17:00:45 -06:00
parent 5bfa21defb
commit a8e14a87d5
@@ -7,7 +7,7 @@ import buttons.XBoxTriggerButton;
import org.usfirst.frc4388.controller.IHandController;
import org.usfirst.frc4388.controller.XboxController;
import org.usfirst.frc4388.robot.commands.*;
import org.usfirst.frc4388.robot.constants.LEDPatterns;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.GenericHID;
@@ -50,10 +50,11 @@ public class OI
JoystickButton Expand = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.Y_BUTTON);
Expand.whenPressed(new WristPlacement(true));
Expand.whenPressed(new setLEDPattern(LEDPatterns.SOLID_RED));
JoystickButton Contract = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.A_BUTTON);
Contract.whenPressed(new WristPlacement(false));
Contract.whenPressed(new WristPlacement(false));
Contract.whenPressed(new setLEDPattern(LEDPatterns.SOLID_GREEN));
JoystickButton liftBothIntake = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.X_BUTTON);
liftBothIntake.whenPressed(new HatchAndBallUp());
@@ -68,7 +69,9 @@ public class OI
JoystickButton safteySwitch = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.START_BUTTON);
safteySwitch.whenPressed(new setClimberSafety(true));
safteySwitch.whenPressed(new setLEDPattern(LEDPatterns.SOLID_YELLOW));
safteySwitch.whenReleased(new setClimberSafety(false));
safteySwitch.whenPressed(new setLEDPattern(LEDPatterns.C1_HEARTBEAT_SLOW));
JoystickButton climbUp = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.RIGHT_TRIGGER_AXIS);
JoystickButton climbDown = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.LEFT_TRIGGER_AXIS);
@@ -80,11 +83,10 @@ public class OI
JoystickButton shiftUp = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.RIGHT_BUMPER_BUTTON);
shiftUp.whenPressed(new DriveSpeedShift(true));
//shiftUp.whenPressed(new LEDIndicators(true));
JoystickButton shiftDown = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.LEFT_BUMPER_BUTTON);
shiftDown.whenPressed(new DriveSpeedShift(false));
// shiftDown.whenPressed(new LEDIndicators(false));
shiftDown.whenPressed(new DriveSpeedShift(false));
//Operator Xbox
/*
JoystickButton openIntake = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.LEFT_BUMPER_BUTTON);