mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Fixed overflow on pio_stepper.rs
This commit is contained in:
parent
bc0180800d
commit
ce701c3e8e
@ -154,7 +154,7 @@ async fn main(_spawner: Spawner) {
|
||||
stepper.step(1000).await;
|
||||
|
||||
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!");
|
||||
Timer::after(Duration::from_secs(1)).await;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user