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:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user