-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
good stuff guys! will take a look |
crates/control/src/led_status.rs
Outdated
Role::Loser => Eye::loser_eye(), | ||
Role::Striker => Eye::striker_eye(), | ||
Role::StrikerSupporter => Eye::striker_support_eye(), | ||
Role::DefenderLeft | Role::DefenderRight => Eye::defender_eye(), |
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.
Could we maybe split this up, and split the colours in the eye based on the defender side? Might be useful!
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.
Looks good, but I would like to have a guide/wiki where I can see the mapping from role to eye color.
crates/control/src/led_status.rs
Outdated
Role::StrikerSupporter => Eye::striker_support_eye(), | ||
Role::DefenderLeft | Role::DefenderRight => Eye::defender_eye(), | ||
Role::Keeper => Eye::keeper_eye(), | ||
Role::ReplacementKeeper => Eye::keeper_replacement_eye(), |
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.
Role::ReplacementKeeper => Eye::keeper_replacement_eye(), | |
Role::ReplacementKeeper => Eye::replacement_keeper_eye(), |
crates/types/src/led.rs
Outdated
} | ||
} | ||
|
||
pub fn keeper_replacement_eye() -> Eye { |
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.
pub fn keeper_replacement_eye() -> Eye { | |
pub fn replacement_keeper_eye() -> Eye { |
crates/types/src/led.rs
Outdated
|
||
pub fn striker_eye() -> Eye { | ||
Eye { | ||
color_at_0: Rgb::new(255, 0, 0), |
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.
User Rgb::Red
crates/types/src/led.rs
Outdated
|
||
pub fn defender_eye() -> Eye { | ||
Eye { | ||
color_at_0: Rgb::new(255, 255, 255), |
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.
Use rgb::white.
crates/types/src/led.rs
Outdated
|
||
pub fn keeper_eye() -> Eye { | ||
Eye { | ||
color_at_0: Rgb::new(0, 0, 255), |
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.
See comments above
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.
Looks good!
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)
How to Test
Run code on NAO and force roles using twix