Added activity indicator

This commit is contained in:
Sebastian 2022-09-03 22:58:23 +02:00
parent 045eada9d3
commit 29e3d21996

View file

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