Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70c70f6

Browse files
committed
landing
1 parent 1115cd5 commit 70c70f6

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

mav-sdk/examples/takeoff.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,21 @@ async fn flight(mut drone: Drone) {
8080
if let Some(next_message) = telemetry_streaming.message().await.unwrap() {
8181
println!("{:?}", next_message);
8282
}
83+
84+
sleep(Duration::from_secs(5));
85+
86+
let land_request = mav_sdk::grpc::action::LandRequest {};
87+
let land_response = drone.action.land(land_request).await.unwrap();
88+
89+
println!(
90+
"Landing: {}",
91+
&land_response
92+
.get_ref()
93+
.action_result
94+
.as_ref()
95+
.unwrap()
96+
.result_str
97+
);
98+
99+
println!("the eagle has (hopefully) landed!");
83100
}

0 commit comments

Comments
 (0)