-
Notifications
You must be signed in to change notification settings - Fork 0
Merge AddressableLED subsystem #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/main/java/frc/robot/subsystems/addressableled/AddressableLEDConstants.java
Show resolved
Hide resolved
src/main/java/frc/robot/subsystems/addressableled/AddressableLEDSubsystem.java
Show resolved
Hide resolved
src/main/java/frc/robot/subsystems/addressableled/AddressableLEDSubsystem.java
Show resolved
Hide resolved
…ffold for testing command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there. I have some nitpicks and a very minor issue, but once you resolve them I think it's good to merge. Nice job :)
import edu.wpi.first.units.measure.Distance; | ||
|
||
public class AddressableLEDConstants { | ||
public record Range(int low, int high) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does range do? It's not immediately obvious, so there should be a javadoc here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like Aceius said, it's still not clear what the purpose of Range is. The parameters are obvious, so you can remove the javadoc comments for those, but you need to make it clear when and where Range is used. Someone should not have to read through to code and use context to understand the purpose of this
I didn't forget to run Spotless this time!
…/reefscape-2025 into addressable-led
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only problems I can see have been addressed, looks good on my end
src/main/java/frc/robot/commands/test/AddressableLEDTestCommand.java
Outdated
Show resolved
Hide resolved
import edu.wpi.first.units.measure.Distance; | ||
|
||
public class AddressableLEDConstants { | ||
public record Range(int low, int high) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like Aceius said, it's still not clear what the purpose of Range is. The parameters are obvious, so you can remove the javadoc comments for those, but you need to make it clear when and where Range is used. Someone should not have to read through to code and use context to understand the purpose of this
The original LED subsystem was based on
AddressableLED
, however it was migrated to a direct PWM controller after it was found that the original LED strips did not support the protocol used by WPILib andAddressableLED
. A strip that supportsAddressableLED
's protocol is now being added, hence this PR consisting of a slightly-updated version of the original LED subsystem implementation based onAddressableLED
. The PWM-based LED controller should remain in-tree for now.