Skip to content
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

Simpler led functions #27

Open
wants to merge 27 commits into
base: district-3
Choose a base branch
from
Open

Simpler led functions #27

wants to merge 27 commits into from

Conversation

vichik123
Copy link
Contributor

This pull requests adds cool new LED functions that make them blink-a-blink-blink

@vichik123 vichik123 requested review from katzuv and GaiaZano05 March 29, 2023 15:59
@pklito
Copy link

pklito commented Mar 30, 2023

Just came to say I love the term "blink-a-blink-blink" 👍

rainbowHue%=180;
}
System.out.println("after loop statement");
}
}
Copy link

@pklito pklito Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take this with a grain of salt since it's been forever since ive worked in FRC,
but shouldn't if rainbow be checked before the Primary and Secondary colors?

In this scenario for 1 frame you will have a flickering of the leds.

Suggestion: (i forgot how to actually write it in the code:

above if(blink) (line 96 or after in line 105)
if(isRainbow) {mode = Mode.ELSE}
then you just have a simple

if(PRIMARY) {}
else if (SECONDARY) {}
else{/*ELSE*/}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rainbow LEDs work great so I guess if it ain't broke don't fix it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good rule to follow many times, but not always. The offseason is the best time to improve software and learn, now's the time to make such changes and improvements to the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants