]> git.taranathan.com Git - FRC2026.git/commitdiff
woops
authormoo <moogoesmeow123@gmail.com>
Fri, 3 Apr 2026 15:01:40 +0000 (08:01 -0700)
committermoo <moogoesmeow123@gmail.com>
Fri, 3 Apr 2026 15:01:51 +0000 (08:01 -0700)
src/main/java/frc/robot/subsystems/LED/LED2.java

index 5c71860ec65c188b9ea28a35257de0216edaf753..64bc1b73be5330f26556d5d0b1e4354f00d56bab 100644 (file)
@@ -27,7 +27,8 @@ public class LED2 extends SubsystemBase {
        private CANdle candle;
        public static final int stripLength = 67;
 
-       public static final double FLASH_INTERVAL = .25;
+       /// Hz
+       public static final int FLASH_RATE = 4;
 
        private Color color;
        
@@ -78,7 +79,7 @@ public class LED2 extends SubsystemBase {
        }
 
        private void setStrobe() {
-               candle.setControl(new StrobeAnimation(8, 8 + stripLength).withFrameRate(4).withColor(new RGBWColor(color)));
+               candle.setControl(new StrobeAnimation(8, 8 + stripLength).withFrameRate(FLASH_RATE).withColor(new RGBWColor(color)));
        }
 
        private void setStatic() {
@@ -92,10 +93,10 @@ public class LED2 extends SubsystemBase {
                if (timeToActive.isEmpty() && timeToInactive.isEmpty()) {
                        return false;
                } else if (timeToActive.isPresent()) {
-                       return (timeToActive.get() <= secs) ? true : false;
+                       return (timeToActive.get() <= secs);
 
                } else if (timeToInactive.isPresent()) {
-                       return (timeToInactive.get() <= secs) ? true : false;
+                       return (timeToInactive.get() <= secs);
                } else {
                        return false;
                }