simplify pattern matching in leds task
This commit is contained in:
parent
c373ba5859
commit
5ecefabd07
@ -72,10 +72,8 @@ 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 {
|
||||
display.set(new_pattern);
|
||||
}
|
||||
if let Some(state::StateChange::Pattern(new_pattern)) = state_sub.try_next_message_pure() {
|
||||
display.set(new_pattern);
|
||||
}
|
||||
|
||||
display.show().await;
|
||||
|
Loading…
Reference in New Issue
Block a user