diff options
| author | Henrik Alsér <[email protected]> | 2024-10-02 21:17:54 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-02 21:17:54 +0000 |
| commit | 6e0b08291b63a0da8eba9284869d1d046bc5dabb (patch) | |
| tree | bb174a38699256a835e1f418dcca896fc1d45fa5 | |
| parent | bc0180800d751e651c0d15c807285c11cdb4f486 (diff) | |
| parent | ce701c3e8ef5f3cd354b74c1a06b6d77a9e812c6 (diff) | |
Merge pull request #3387 from paulwrath1223/main
Fixed overflow on `pio_stepper.rs`
| -rw-r--r-- | examples/rp/src/bin/pio_stepper.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rp/src/bin/pio_stepper.rs b/examples/rp/src/bin/pio_stepper.rs index 4952f4fbd..6ee45a414 100644 --- a/examples/rp/src/bin/pio_stepper.rs +++ b/examples/rp/src/bin/pio_stepper.rs | |||
| @@ -154,7 +154,7 @@ async fn main(_spawner: Spawner) { | |||
| 154 | stepper.step(1000).await; | 154 | stepper.step(1000).await; |
| 155 | 155 | ||
| 156 | info!("CCW full steps, drop after 1 sec"); | 156 | info!("CCW full steps, drop after 1 sec"); |
| 157 | if let Err(_) = with_timeout(Duration::from_secs(1), stepper.step(i32::MIN)).await { | 157 | if let Err(_) = with_timeout(Duration::from_secs(1), stepper.step(-i32::MAX)).await { |
| 158 | info!("Time's up!"); | 158 | info!("Time's up!"); |
| 159 | Timer::after(Duration::from_secs(1)).await; | 159 | Timer::after(Duration::from_secs(1)).await; |
| 160 | } | 160 | } |
