mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Merge pull request #3387 from paulwrath1223/main
Fixed overflow on `pio_stepper.rs`
This commit is contained in:
commit
6e0b08291b
@ -154,7 +154,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
stepper.step(1000).await;
|
stepper.step(1000).await;
|
||||||
|
|
||||||
info!("CCW full steps, drop after 1 sec");
|
info!("CCW full steps, drop after 1 sec");
|
||||||
if let Err(_) = with_timeout(Duration::from_secs(1), stepper.step(i32::MIN)).await {
|
if let Err(_) = with_timeout(Duration::from_secs(1), stepper.step(-i32::MAX)).await {
|
||||||
info!("Time's up!");
|
info!("Time's up!");
|
||||||
Timer::after(Duration::from_secs(1)).await;
|
Timer::after(Duration::from_secs(1)).await;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user