Skip to content

Commit

Permalink
Clean-up and add details of unimpled items
Browse files Browse the repository at this point in the history
  • Loading branch information
elpiel committed May 3, 2020
1 parent 382f103 commit ee8ab5b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions arsdk-rs/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ pub mod scroll_impl {
Self::Common(common) => {
this.gwrite_with(common, &mut offset, ctx)?;
}
// Self::ArDrone3(ardrone3) => this.gwrite_with(ardrone3, &mut offset, ctx)?,
Self::ArDrone3(ardrone3) => {
this.gwrite_with(ardrone3, &mut offset, ctx)?;
}
Self::JumpingSumo(js) => {
this.gwrite_with(js, &mut offset, ctx)?;
}
_ => unimplemented!(),
_ => unimplemented!("Not all Features are impled"),
}

Ok(offset)
Expand Down
4 changes: 2 additions & 2 deletions arsdk-rs/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub mod scroll_impl {
time.push(0);
this.gwrite_with::<&[u8]>(time.as_ref(), &mut offset, ())?;
}
_ => unimplemented!(),
_ => unimplemented!("Not all Common are impled"),
}

Ok(offset)
Expand Down Expand Up @@ -237,7 +237,7 @@ pub mod scroll_impl {
Self::Common(common) => {
this.gwrite_with(common, &mut offset, ctx)?;
}
_ => unimplemented!(),
_ => unimplemented!("Not all Class are impled"),
};

Ok(offset)
Expand Down
4 changes: 2 additions & 2 deletions arsdk-rs/src/jumping_sumo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub mod scroll_impl {
Self::Animations(anim) => {
this.gwrite_with(anim, &mut offset, ctx)?;
}
_ => {}
_ => unimplemented!("Not all Class are impled"),
}

Ok(offset)
Expand Down Expand Up @@ -220,7 +220,7 @@ pub mod scroll_impl {
Self::Pilot(state) => {
this.gwrite_with(state, &mut offset, ctx)?;
}
_ => {}
_ => unimplemented!("Not all PilotingID are impled"),
}

Ok(offset)
Expand Down
2 changes: 1 addition & 1 deletion arsdk-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ fn spawn_listener(drone: Drone, addr: impl ToSocketAddrs) -> AnyResult<()> {
"Received: {} bytes from {} Bytes: {}",
bytes_read,
origin,
print_buf(&buf)
print_buf(&buf[..bytes_read - 1])
);

let frame_type = frame::Type::Data;
Expand Down
6 changes: 4 additions & 2 deletions bebop2/examples/take_off.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ use bebop2::prelude::*;
fn main() -> Result<(), Box<dyn Error>> {
let drone = Bebop2::connect(PARROT_SPHINX_CONFIG)?;

// drone.take_off()?;

std::thread::sleep(std::time::Duration::from_secs(20));
drone.take_off()?;
std::thread::sleep(std::time::Duration::from_secs(20));
std::thread::sleep(std::time::Duration::from_secs(20));

println!("commands ended");
Ok(())
}

0 comments on commit ee8ab5b

Please sign in to comment.