LED Command Based

This commit is contained in:
Keenan D. Buckley
2019-12-21 20:41:34 -07:00
parent c690466356
commit ec873a2835
6 changed files with 62 additions and 12 deletions
@@ -67,12 +67,8 @@ public class Drive extends Subsystem {
m_driveTrain.arcadeDrive(move, steer);
}
public void gamerMove(){
m_driveTrain.arcadeDrive(0, 1);
}
@Override
public void initDefaultCommand() {
public void initDefaultCommand(){
// Set the default command for a subsystem here.
// setDefaultCommand(new MySpecialCommand());
setDefaultCommand(new DriveWithJoystick());
@@ -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());
}
}