Skip to content

Commit

Permalink
Change documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma03L committed Jan 29, 2024
1 parent 9ce7666 commit a93bd70
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/main/java/frc/robot/leds/LedStrip.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ public LedStrip(int port, int length) {
timer.reset();
}

/**
* Sets the length of the led strip.
*
* @param length Number of leds in the strip.
*/
public void setLength(int length) {
ledBuffer = new AddressableLEDBuffer(length);
ledStrip.setLength(length);
Expand Down Expand Up @@ -68,7 +63,6 @@ private void setMode(LedMode mode) {

/**
* Sets the led blink time.
*
* @param blinkTime Blink time in seconds
*/
private void setBlinkTime(double blinkTime) {
Expand All @@ -77,18 +71,12 @@ private void setBlinkTime(double blinkTime) {

/**
* Sets the duration of the fade effect.
*
* @param duration Fade duration in seconds.
*/
private void setFadeDuration(double duration) {
fadeDuration = duration;
}

/**
* Sets the led strip to a solid color
*
* @param color Color to set the strip to.
*/
private void setSolidColor(Color color) {
var appliedColor = new edu.wpi.first.wpilibj.util.Color(color.getRed(), color.getGreen(), color.getBlue());
for (int i = 0; i < ledBuffer.getLength(); i++) {
Expand All @@ -99,10 +87,9 @@ private void setSolidColor(Color color) {

/**
* Interpolates between two colors.
*
* @param initial Initial color.
* @param goal Final Color.
* @return
* @return Solution of the interpolation in the current time.
*/
private Translation3d colorInterpolation(Color initial, Color goal) {
var initialHSB = Color.RGBtoHSB(initial.getRed(), initial.getGreen(), initial.getBlue(), new float[3]);
Expand All @@ -118,10 +105,6 @@ private Translation3d colorInterpolation(Color initial, Color goal) {
return solution;
}


/**
* Sets the led strip to a rainbow pattern.
*/
private void setRainbow() {
for (int i = 0; i < ledBuffer.getLength(); i++) {
ledBuffer.setHSV(i, rainbowHue, 255, 180);
Expand Down

0 comments on commit a93bd70

Please sign in to comment.