Added activity indicator
This commit is contained in:
parent
045eada9d3
commit
29e3d21996
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue