Update LED.java

This commit is contained in:
Keenan D. Buckley
2019-03-14 18:28:48 -06:00
parent bd057897e6
commit 0a11ca4e0c
2 changed files with 4 additions and 1 deletions
@@ -71,7 +71,7 @@ public class OI
safteySwitch.whenPressed(new setClimberSafety(true));
safteySwitch.whenPressed(new setLEDPattern(LEDPatterns.SOLID_YELLOW));
safteySwitch.whenReleased(new setClimberSafety(false));
safteySwitch.whenPressed(new setLEDPattern(LEDPatterns.C1_HEARTBEAT_FAST));
safteySwitch.whenReleased(new setLEDPattern(LEDPatterns.C1_HEARTBEAT_FAST));
JoystickButton climbUp = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.RIGHT_TRIGGER_AXIS);
JoystickButton climbDown = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.LEFT_TRIGGER_AXIS);
@@ -13,6 +13,7 @@ import org.usfirst.frc4388.robot.constants.LEDPatterns;
import edu.wpi.first.wpilibj.Spark;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
* Add your docs here.
@@ -30,10 +31,12 @@ import edu.wpi.first.wpilibj.command.Subsystem;
public void periodic() {
LEDController.set(currentLED);
SmartDashboard.putNumber("LED", currentLED);
}
public void setPattern(LEDPatterns pattern){
currentLED = pattern.getValue();
LEDController.set(currentLED);
}
@Override