simplify pattern matching in leds task

This commit is contained in:
Sebastian Hugentobler 2024-10-17 12:07:09 +02:00
parent c373ba5859
commit 5ecefabd07
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -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;