From 28dab4337f00a3a6e03a39e229beca4dde3f7724 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Thu, 7 Dec 2023 13:54:26 +0100 Subject: [PATCH] full demo doesn't need any comments --- anafi-rs/examples/liftoff.rs | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/anafi-rs/examples/liftoff.rs b/anafi-rs/examples/liftoff.rs index 8e1dfdd..60e0993 100644 --- a/anafi-rs/examples/liftoff.rs +++ b/anafi-rs/examples/liftoff.rs @@ -20,15 +20,15 @@ fn main() -> Result<(), Box> { drone.up()?; std::thread::sleep(Duration::from_secs(2)); - // log::warn!("forward!"); - // drone.forward()?; - // std::thread::sleep(Duration::from_secs(1)); - // drone.stop()?; + log::warn!("forward!"); + drone.forward()?; + std::thread::sleep(Duration::from_secs(1)); + drone.stop()?; - // log::warn!("backward!"); - // drone.backward()?; - // std::thread::sleep(Duration::from_secs(1)); - // drone.stop()?; + log::warn!("backward!"); + drone.backward()?; + std::thread::sleep(Duration::from_secs(1)); + drone.stop()?; log::warn!("left!"); drone.strafe_left()?; @@ -38,17 +38,17 @@ fn main() -> Result<(), Box> { drone.strafe_right()?; std::thread::sleep(Duration::from_secs(1)); - // log::warn!("turn left!"); - // for _ in 0..30 { - // drone.turn_left()?; - // std::thread::sleep(Duration::from_millis(300)); - // } - - // log::warn!("turn right!"); - // for _ in 0..30 { - // drone.turn_right()?; - // std::thread::sleep(Duration::from_millis(300)); - // } + log::warn!("turn left!"); + for _ in 0..30 { + drone.turn_left()?; + std::thread::sleep(Duration::from_millis(300)); + } + + log::warn!("turn right!"); + for _ in 0..30 { + drone.turn_right()?; + std::thread::sleep(Duration::from_millis(300)); + } log::warn!("DOWN!"); drone.down()?;