Added activity indicator
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Sebastian 2022-09-03 22:58:23 +02:00
parent 045eada9d3
commit 29e3d21996
1 changed files with 9 additions and 0 deletions

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(