Added activity indicator
This commit is contained in:
parent
045eada9d3
commit
29e3d21996
|
@ -53,6 +53,8 @@ pub async fn display_task(
|
||||||
stopped: true,
|
stopped: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let mut activity_indicator = 0;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
display.clear();
|
display.clear();
|
||||||
|
|
||||||
|
@ -97,6 +99,13 @@ pub async fn display_task(
|
||||||
.draw(&mut display)
|
.draw(&mut display)
|
||||||
.unwrap();
|
.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();
|
display.flush().unwrap();
|
||||||
|
|
||||||
let result = select(
|
let result = select(
|
||||||
|
|
Loading…
Reference in a new issue