From 29e3d2199696fbf4ef17f5947548f1559b511fad Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 3 Sep 2022 22:58:23 +0200 Subject: [PATCH] Added activity indicator --- src/display.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/display.rs b/src/display.rs index 54106e7..2747aef 100644 --- a/src/display.rs +++ b/src/display.rs @@ -53,6 +53,8 @@ pub async fn display_task( stopped: true, }; + let mut activity_indicator = 0; + loop { display.clear(); @@ -97,6 +99,13 @@ pub async fn display_task( .draw(&mut display) .unwrap(); + if rotor_state.stopped || activity_indicator < 19 { + display.set_pixel(127, activity_indicator, true); + } else { + display.set_pixel(127, activity_indicator, false); + } + activity_indicator = (activity_indicator + 1) % 32; + display.flush().unwrap(); let result = select(