mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-09 00:38:01 -06:00
LED Command Based
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
package frc4388.robot.subsystems;
|
||||
|
||||
import frc4388.robot.RobotMap;
|
||||
import frc4388.robot.commands.LED.UpdateLED;
|
||||
import frc4388.robot.constants.LEDPatterns;
|
||||
import edu.wpi.first.wpilibj.Spark;
|
||||
import edu.wpi.first.wpilibj.command.Subsystem;
|
||||
@@ -27,9 +28,8 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
LEDController.set(currentLED);
|
||||
}
|
||||
|
||||
public void periodic() {
|
||||
public void updateLED(){
|
||||
LEDController.set(currentLED);
|
||||
SmartDashboard.putNumber("LED", currentLED);
|
||||
}
|
||||
|
||||
public void setPattern(LEDPatterns pattern){
|
||||
@@ -37,7 +37,15 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
LEDController.set(currentLED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void periodic(){
|
||||
SmartDashboard.putNumber("LED", currentLED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initDefaultCommand() {
|
||||
// Set the default command for a subsystem here.
|
||||
// setDefaultCommand(new MySpecialCommand());
|
||||
setDefaultCommand(new UpdateLED());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user