Skip to content

Commit

Permalink
typos and bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
quackitsquinn committed Mar 22, 2024
1 parent 186f612 commit d8a707a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/frc/robot/subsystems/AddressableLightStrip.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@ public void setStripColor(Color color) {
}

private static double lerp(double v0, double v1, double amount) {
if (v0 == v1) {
return v0;
}
return (1 - amount) * v0 + amount * v1;
}

/**
* Lineraly interpolates 2 colors. Utility method for fading colors into eachother.
* Linearly interpolates 2 colors. Utility method for fading colors into each other.
*
* @param color1 The start color
* @param color2 The color to fade into
* @param amount The amount to interporlate. [0, 1]
* @param amount The amount to interpolate. [0, 1]
* @return The interpolated color.
*/
public static Color lerpColors(Color color1, Color color2, double amount) {
Expand All @@ -106,7 +109,7 @@ public AddressableLEDBuffer getLEDBuffer() {
return this.buffer;
}

/** Fushes the buffer to the light strip. */
/** Flushes the buffer to the light strip. */
public void flush() {
this.ledStrip.setData(this.buffer);
}
Expand Down

0 comments on commit d8a707a

Please sign in to comment.