From acfa52c8982a81e149832e41b76d2c5cff562660 Mon Sep 17 00:00:00 2001 From: aarav18 Date: Thu, 7 Apr 2022 19:02:32 -0600 Subject: [PATCH] back to Spark LEDs --- .../java/frc4388/robot/RobotContainer.java | 2 +- src/main/java/frc4388/robot/RobotMap.java | 4 ++-- .../java/frc4388/robot/subsystems/LED.java | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 55fbbde..8079e75 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -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); diff --git a/src/main/java/frc4388/robot/RobotMap.java b/src/main/java/frc4388/robot/RobotMap.java index 38d121f..5e5da07 100644 --- a/src/main/java/frc4388/robot/RobotMap.java +++ b/src/main/java/frc4388/robot/RobotMap.java @@ -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() {} diff --git a/src/main/java/frc4388/robot/subsystems/LED.java b/src/main/java/frc4388/robot/subsystems/LED.java index 385e3ef..cb6f53e 100644 --- a/src/main/java/frc4388/robot/subsystems/LED.java +++ b/src/main/java/frc4388/robot/subsystems/LED.java @@ -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()); } /**