simplify pattern matching in leds task
This commit is contained in:
parent
c373ba5859
commit
5ecefabd07
1 changed files with 2 additions and 4 deletions
|
@ -72,11 +72,9 @@ pub async fn task(rows: [AnyPin; ROWS], cols: [AnyPin; COLS]) {
|
|||
display.set(PATTERN_START);
|
||||
|
||||
loop {
|
||||
if let Some(msg) = state_sub.try_next_message_pure() {
|
||||
if let state::StateChange::Pattern(new_pattern) = msg {
|
||||
if let Some(state::StateChange::Pattern(new_pattern)) = state_sub.try_next_message_pure() {
|
||||
display.set(new_pattern);
|
||||
}
|
||||
}
|
||||
|
||||
display.show().await;
|
||||
Timer::after_micros(10).await;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue