-
Notifications
You must be signed in to change notification settings - Fork 0
create LED template #1
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
| public static final int KPORT = 0; | ||
| public static final int KLENGTH = 60; | ||
|
|
||
| public static final double BLINK_TIME = 1; // in seconds for after intake/outtake |
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.
This variable seems to be unused.
| * | ||
| * @param pattern the LED pattern to run | ||
| */ | ||
| public Command runPattern(LEDPattern pattern) { |
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.
Can you add names to all of these commands with .withName("[color/pattern]")? This way, when we log the subsystem, we'll be able to see what command is running on it (in case we need to debug, this will make our lives much easier).
| // Set the default command to turn the strip off, otherwise the last colors written by | ||
| // the last command to run will continue to be displayed. | ||
| // Note: Other default patterns could be used instead! | ||
| setDefaultCommand((runScrollingRedBlueCommand()).withName("Off")); |
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.
Can we change the name of this command to something like "Default colors" or something?
| return runPattern(gradient); | ||
| } | ||
|
|
||
| public Command runScrollingRedBlueCommand(){ |
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.
Why is it red and blue? :( I liked blue + yellow better--they're our team colors! /hj
| Distance ledSpacing = Meters.of(1 / 60.0); | ||
| LEDPattern base = LEDPattern.gradient(LEDPattern.GradientType.kDiscontinuous, Color.kRed, Color.kBlue); | ||
| LEDPattern pattern = base.scrollAtRelativeSpeed(Percent.per(Second).of(100)); | ||
| LEDPattern absolute = base.scrollAtAbsoluteSpeed(Centimeters.per(Second).of(6.25), ledSpacing); |
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.
Seems to be unused code. Not sure if we want to keep it.
same as Dynamene code
placeholder for constants
not tested