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

Indicate role using LED eye colors #119

Merged
merged 3 commits into from
Jul 8, 2023
Merged

Indicate role using LED eye colors #119

merged 3 commits into from
Jul 8, 2023

Conversation

Lasse-van-Iterson
Copy link
Collaborator

Introduced Changes

The NAO's will now change their eye color based on their currently assigned role

Fixes #117

Ideas for Next Iterations (Not This PR)

  • New colors (more easily viewable)

How to Test

Run code on NAO and force roles using twix

@Lasse-van-Iterson Lasse-van-Iterson added the enhancement New feature or request label Jul 7, 2023
@Lasse-van-Iterson Lasse-van-Iterson self-assigned this Jul 7, 2023
@oxkitsune
Copy link
Member

good stuff guys! will take a look

Role::Loser => Eye::loser_eye(),
Role::Striker => Eye::striker_eye(),
Role::StrikerSupporter => Eye::striker_support_eye(),
Role::DefenderLeft | Role::DefenderRight => Eye::defender_eye(),
Copy link
Member

Choose a reason for hiding this comment

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

Could we maybe split this up, and split the colours in the eye based on the defender side? Might be useful!

@Lasse-van-Iterson Lasse-van-Iterson changed the title Liters/role led Indicate role using LED eye colors Jul 7, 2023
Copy link
Collaborator

@Fyor Fyor left a comment

Choose a reason for hiding this comment

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

Looks good, but I would like to have a guide/wiki where I can see the mapping from role to eye color.

Role::StrikerSupporter => Eye::striker_support_eye(),
Role::DefenderLeft | Role::DefenderRight => Eye::defender_eye(),
Role::Keeper => Eye::keeper_eye(),
Role::ReplacementKeeper => Eye::keeper_replacement_eye(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Role::ReplacementKeeper => Eye::keeper_replacement_eye(),
Role::ReplacementKeeper => Eye::replacement_keeper_eye(),

}
}

pub fn keeper_replacement_eye() -> Eye {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
pub fn keeper_replacement_eye() -> Eye {
pub fn replacement_keeper_eye() -> Eye {


pub fn striker_eye() -> Eye {
Eye {
color_at_0: Rgb::new(255, 0, 0),
Copy link
Contributor

Choose a reason for hiding this comment

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

User Rgb::Red


pub fn defender_eye() -> Eye {
Eye {
color_at_0: Rgb::new(255, 255, 255),
Copy link
Contributor

Choose a reason for hiding this comment

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

Use rgb::white.


pub fn keeper_eye() -> Eye {
Eye {
color_at_0: Rgb::new(0, 0, 255),
Copy link
Contributor

Choose a reason for hiding this comment

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

See comments above

Copy link
Contributor

@jkbkaiser jkbkaiser left a comment

Choose a reason for hiding this comment

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

Looks good!

@oxkitsune oxkitsune merged commit ef1fca8 into robocup-23 Jul 8, 2023
@oxkitsune oxkitsune deleted the liters/role-led branch July 8, 2023 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants