Skip to content

LED and timer might work now!#107

Open
MegaCraftCat wants to merge 3 commits intoTeam1100:mainfrom
MegaCraftCat:branch-1
Open

LED and timer might work now!#107
MegaCraftCat wants to merge 3 commits intoTeam1100:mainfrom
MegaCraftCat:branch-1

Conversation

@MegaCraftCat
Copy link
Copy Markdown
Contributor

virtual led lights now respond to the timer which seems to work as well, also did some color stuff

Copy link
Copy Markdown
Contributor

@timerunner16 timerunner16 left a comment

Choose a reason for hiding this comment

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

since you said you've tested this in sim i'm fine with merging once you look over my review; just a few small things here and there, it looks good overall

Comment on lines +381 to +384
setPattern(1, LEDPattern.kSolidYellow, LEDSection.Priority.BASIC);
setPattern(2, LEDPattern.kSolidYellow, LEDSection.Priority.BASIC);
setPattern(3, LEDPattern.kSolidYellow, LEDSection.Priority.BASIC);
setPattern(4, LEDPattern.kSolidYellow, LEDSection.Priority.BASIC);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same note as above with the multiple sections, and for the rest of the game state leds

Comment on lines +367 to +370
setPattern(1, LEDPattern.kBlinkTeamColorsInverted, LEDSection.Priority.WARNING);
setPattern(2, LEDPattern.kBlinkTeamColors, LEDSection.Priority.WARNING);
setPattern(3, LEDPattern.kBlinkTeamColorsInverted, LEDSection.Priority.WARNING);
setPattern(4, LEDPattern.kBlinkTeamColors, LEDSection.Priority.WARNING);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
setPattern(1, LEDPattern.kBlinkTeamColorsInverted, LEDSection.Priority.WARNING);
setPattern(2, LEDPattern.kBlinkTeamColors, LEDSection.Priority.WARNING);
setPattern(3, LEDPattern.kBlinkTeamColorsInverted, LEDSection.Priority.WARNING);
setPattern(4, LEDPattern.kBlinkTeamColors, LEDSection.Priority.WARNING);

we only want to change one of the sections (thus why i just set pattern 0 originally). if the robot's doing something the drivers are trying to observe, we shouldn't block out our indicators with the state change

Comment on lines +20 to +25
public static int m_blinkSpeed;
public static int m_checkeredSpeed;
public static int m_checkeredBlinkSpeed;
public static int m_slideSpeed;
public static int m_gradientSpeed;
public static int m_rainbowSpeed;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
public static int m_blinkSpeed;
public static int m_checkeredSpeed;
public static int m_checkeredBlinkSpeed;
public static int m_slideSpeed;
public static int m_gradientSpeed;
public static int m_rainbowSpeed;
private int m_blinkSpeed;
private int m_checkeredSpeed;
private int m_checkeredBlinkSpeed;
private int m_slideSpeed;
private int m_gradientSpeed;
private int m_rainbowSpeed;

when we're writing classes (especially singletons like our subsystems), we almost always want to keep our member variables private and non-static. feel free to ask if you want info on why

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

public static final LEDPattern kBlinkBlue =
new LEDPattern(PatternType.BLINK, Color.kBlue, Color.kBlack, m_blinkSpeed);

this says that you cant make a static reference to a non-static field

public static final LEDPattern kSolidWhite =
new LEDPattern(PatternType.SOLID, Color.kWhite, Color.kWhite, 1);
public static final LEDPattern kSolidMaroon =
new LEDPattern(PatternType.SOLID, Color.kRed, Color.kMaroon, 1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
new LEDPattern(PatternType.SOLID, Color.kRed, Color.kMaroon, 1);
new LEDPattern(PatternType.SOLID, Color.kMaroon, Color.kMaroon, 1);

i think this was supposed to have them both be maroon, since solid patterns are supposed to only show one color (even though it takes in two colors, its weird i know mb)

public static final LEDPattern kSolidPurple =
new LEDPattern(PatternType.SOLID, Color.kPurple, Color.kPurple, 1);
public static final LEDPattern kSolidPink =
new LEDPattern(PatternType.SOLID, Color.kPurple, Color.kPink, 1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
new LEDPattern(PatternType.SOLID, Color.kPurple, Color.kPink, 1);
new LEDPattern(PatternType.SOLID, Color.kPink, Color.kPink, 1);

same note as above

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.

2 participants