mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 00:38:05 -06:00
back to Spark LEDs
This commit is contained in:
@@ -89,7 +89,7 @@ public class RobotContainer {
|
||||
public final Extender m_robotExtender = new Extender(m_robotMap.extenderMotor);
|
||||
|
||||
public final Storage m_robotStorage = new Storage(m_robotMap.storageMotor);
|
||||
private final LED m_robotLED = new LED(m_robotMap.newLED); // ! no LED makes aarav sad
|
||||
private final LED m_robotLED = new LED(m_robotMap.LEDController); // ! no LED makes aarav sad
|
||||
public final BoomBoom m_robotBoomBoom = new BoomBoom(m_robotMap.shooterFalconLeft, m_robotMap.shooterFalconRight);
|
||||
public final Hood m_robotHood = new Hood(m_robotMap.angleAdjusterMotor);
|
||||
public final Turret m_robotTurret = new Turret(m_robotMap.shooterTurret);
|
||||
|
||||
@@ -54,8 +54,8 @@ public class RobotMap {
|
||||
}
|
||||
|
||||
/* LED Subsystem */
|
||||
// public final Spark LEDController = new Spark(LEDConstants.LED_SPARK_ID);
|
||||
public final PWM newLED = new Servo(LEDConstants.LED_SPARK_ID);
|
||||
public final Spark LEDController = new Spark(LEDConstants.LED_SPARK_ID);
|
||||
// public final PWM newLED = new Servo(LEDConstants.LED_SPARK_ID);
|
||||
|
||||
void configureLEDMotorControllers() {}
|
||||
|
||||
|
||||
@@ -20,15 +20,15 @@ import frc4388.utility.LEDPatterns;
|
||||
public class LED extends SubsystemBase {
|
||||
|
||||
private LEDPatterns m_currentPattern;
|
||||
private PWM newLED;
|
||||
// private Spark m_LEDController;
|
||||
// private PWM newLED;
|
||||
private Spark m_LEDController;
|
||||
|
||||
/**
|
||||
* Add your docs here.
|
||||
*/
|
||||
public LED(PWM newLED){
|
||||
// m_LEDController = LEDController;
|
||||
this.newLED = newLED;
|
||||
public LED(Spark LEDController){
|
||||
m_LEDController = LEDController;
|
||||
// this.newLED = newLED;
|
||||
setPattern(LEDConstants.DEFAULT_PATTERN);
|
||||
updateLED();
|
||||
Logger.getLogger(LED.class.getSimpleName()).finer("In the Beginning, there was Joe.\nAnd he said, 'Let there be LEDs.'\nAnd it was good.");
|
||||
@@ -43,8 +43,8 @@ public class LED extends SubsystemBase {
|
||||
* Add your docs here.
|
||||
*/
|
||||
public void updateLED(){
|
||||
newLED.setRaw((int) m_currentPattern.percentToPWM());
|
||||
// m_LEDController.set(m_currentPattern.getValue());
|
||||
// newLED.setRaw((int) m_currentPattern.percentToPWM());
|
||||
m_LEDController.set(m_currentPattern.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,8 +52,8 @@ public class LED extends SubsystemBase {
|
||||
*/
|
||||
public void setPattern(LEDPatterns pattern){
|
||||
m_currentPattern = pattern;
|
||||
newLED.setRaw((int) m_currentPattern.percentToPWM());
|
||||
// m_LEDController.set(m_currentPattern.getValue());
|
||||
// newLED.setRaw((int) m_currentPattern.percentToPWM());
|
||||
m_LEDController.set(m_currentPattern.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user