From eb84d20cb7fabaa8b6d4528ae10ca2d5064cabbe Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Thu, 25 Aug 2022 18:34:50 +0200 Subject: [PATCH 1/4] wip --- Cargo.lock | 13 ++++++ Cargo.toml | 2 +- anafi-rs/Cargo.toml | 1 + anafi-rs/examples/liftoff.rs | 14 +++++-- anafi-rs/src/lib.rs | 14 +------ arsdk-rs/src/ardrone3/piloting.rs | 2 +- arsdk-rs/src/ardrone3/piloting_state.rs | 28 +++++++++++-- arsdk-rs/src/command.rs | 22 +++++----- arsdk-rs/src/frame.rs | 13 ++++-- arsdk-rs/src/handshake.rs | 6 +-- arsdk-rs/src/lib.rs | 54 ++++++++++++++++++++++--- arsdk-rs/src/listener.rs | 2 +- arsdk-rs/src/parse.rs | 16 +++++--- 13 files changed, 136 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa0de42..438d1e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "addr2line" version = "0.13.0" @@ -33,6 +35,17 @@ dependencies = [ "memchr", ] +[[package]] +name = "anafi-rs" +version = "0.1.0" +dependencies = [ + "arsdk-rs", + "env_logger", + "log 0.4.8", + "scroll", + "tokio", +] + [[package]] name = "anyhow" version = "1.0.28" diff --git a/Cargo.toml b/Cargo.toml index 113e474..f504b14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,5 +3,5 @@ members = [ "arsdk-rs", "jumpingsumo-rs", "bebop2", - # "anafi-rs", + "anafi-rs", ] diff --git a/anafi-rs/Cargo.toml b/anafi-rs/Cargo.toml index 8038141..c2f70fe 100644 --- a/anafi-rs/Cargo.toml +++ b/anafi-rs/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] arsdk-rs = { path = "../arsdk-rs" } +scroll = "0.10.1" [dev-dependencies] # Used for examples diff --git a/anafi-rs/examples/liftoff.rs b/anafi-rs/examples/liftoff.rs index 0d89a31..46b56e9 100644 --- a/anafi-rs/examples/liftoff.rs +++ b/anafi-rs/examples/liftoff.rs @@ -10,18 +10,24 @@ fn main() -> Result<(), Box> { let drone_ip: std::net::IpAddr = "192.168.42.1".parse()?; let drone = Anafi::connect(drone_ip.into())?; - info!("Takeoff!"); + std::thread::sleep(Duration::from_secs(10)); - for i in 0..50 { + log::warn!("Takeoff!"); + + for _ in 1..50 { + std::thread::sleep(std::time::Duration::from_millis(200)); drone.take_off()?; } - info!("Wait 5 seconds and fly UP"); + log::warn!("Wait 5 seconds and get down"); std::thread::sleep(Duration::from_secs(5)); - for i in 0..50 { + for _ in 1..50 { + std::thread::sleep(std::time::Duration::from_millis(200)); drone.landing()?; } + std::thread::sleep(Duration::from_secs(5)); + Ok(()) } diff --git a/anafi-rs/src/lib.rs b/anafi-rs/src/lib.rs index 1c989ae..3e8fd9b 100644 --- a/anafi-rs/src/lib.rs +++ b/anafi-rs/src/lib.rs @@ -31,12 +31,7 @@ impl Anafi { pub fn take_off(&self) -> Result<(), Error> { let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::TakeOff))); - let frame = Frame::for_drone( - &self.drone, - Type::DataWithAck, - BufferID::CDAck, - Some(feature), - ); + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); self.drone.send_frame(frame) } @@ -76,12 +71,7 @@ impl Anafi { pub fn landing(&self) -> Result<(), Error> { let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::Landing))); - let frame = Frame::for_drone( - &self.drone, - Type::DataWithAck, - BufferID::CDAck, - Some(feature), - ); + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); self.drone.send_frame(frame) } diff --git a/arsdk-rs/src/ardrone3/piloting.rs b/arsdk-rs/src/ardrone3/piloting.rs index 9283fcf..049d0e0 100644 --- a/arsdk-rs/src/ardrone3/piloting.rs +++ b/arsdk-rs/src/ardrone3/piloting.rs @@ -120,7 +120,7 @@ mod scroll_impl { Piloting::PCMD(pcmd) => { this.gwrite_with(pcmd, &mut offset, ctx)?; } - // Piloting::Landing => {} + Piloting::Landing => {} // Piloting::Emergency => {} // Piloting::NavigateHome => {} // Piloting::AutoTakeOffMode => {} diff --git a/arsdk-rs/src/ardrone3/piloting_state.rs b/arsdk-rs/src/ardrone3/piloting_state.rs index a538c04..eec74cb 100644 --- a/arsdk-rs/src/ardrone3/piloting_state.rs +++ b/arsdk-rs/src/ardrone3/piloting_state.rs @@ -43,7 +43,7 @@ pub enum PilotingState { SpeedChanged, /// ARCOMMANDS_ID_ARDRONE3_PILOTINGSTATE_CMD_ATTITUDECHANGED = 6, /// Frame { frame_type: Data, buffer_id: DCNavdata, sequence_id: 40, feature: Some(ArDrone3(Some(PilotingState { data: [6, 0, 44, 49, 49, 55, 153, 38, 7, 185, 107, 25, 201, 63] }))) } - AttitudeChanged, + AttitudeChanged(AttitudeChanged), /// ARCOMMANDS_ID_ARDRONE3_PILOTINGSTATE_CMD_AUTOTAKEOFFMODECHANGED = 7, AutoTakeOffModeChanged, /// ARCOMMANDS_ID_ARDRONE3_PILOTINGSTATE_CMD_ALTITUDECHANGED = 8, @@ -91,7 +91,7 @@ impl Into for &PilotingState { NavigateHomeStateChanged => 3, PositionChanged => 4, SpeedChanged => 5, - AttitudeChanged => 6, + AttitudeChanged(_) => 6, AutoTakeOffModeChanged => 7, AltitudeChanged => 8, GpsLocationChanged => 9, @@ -106,6 +106,11 @@ impl Into for &PilotingState { } } +// ------------------------------------------------------------ + +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct AttitudeChanged(Vec); + pub mod scroll_impl { use super::*; use crate::{frame::Error, parse::read_unknown}; @@ -118,8 +123,8 @@ pub mod scroll_impl { fn try_from_ctx(src: &'a [u8], ctx: Endian) -> Result<(Self, usize), Self::Error> { let mut offset = 0; - #[allow(clippy::match_single_binding)] let piloting_state = match src.gread_with::(&mut offset, ctx)? { + 6 => Self::AttitudeChanged(AttitudeChanged::try_from_ctx(&src[offset..], ctx)?.0), unknown => Self::Unknown { piloting_state: unknown, data: read_unknown(src, &mut offset)?, @@ -148,4 +153,21 @@ pub mod scroll_impl { Ok(offset) } } + + impl<'a> ctx::TryFromCtx<'a, Endian> for AttitudeChanged { + type Error = Error; + + // and the lifetime annotation on `&'a [u8]` here + fn try_from_ctx(src: &'a [u8], ctx: Endian) -> Result<(Self, usize), Self::Error> { + let mut offset = 0; + + let mut buffer = Vec::new(); + + while let Ok(b) = src.gread_with::(&mut offset, ctx) { + buffer.push(b); + } + + Ok((Self(buffer), offset)) + } + } } diff --git a/arsdk-rs/src/command.rs b/arsdk-rs/src/command.rs index 65578fb..cfa821d 100644 --- a/arsdk-rs/src/command.rs +++ b/arsdk-rs/src/command.rs @@ -19,17 +19,17 @@ pub enum Feature { /// 3. `ARCOMMANDS_Generic_DroneSettings_t` in `libARCommands/libARCommands/ARCOMMANDS_Types.h` /// 4. `ARCOMMANDS_Generic_DroneSettingsChanged_t` in `libARCommands/libARCommands/ARCOMMANDS_Types.h` Generic, - FollowMe, // ARCOMMANDS_ID_FEATURE_FOLLOW_ME = 134, - Wifi, // ARCOMMANDS_ID_FEATURE_WIFI = 135, - RC, // ARCOMMANDS_ID_FEATURE_RC = 136, - DroneManager, // ARCOMMANDS_ID_FEATURE_DRONE_MANAGER = 137, - Mapper, // ARCOMMANDS_ID_FEATURE_MAPPER = 138, - Debug, // ARCOMMANDS_ID_FEATURE_DEBUG = 139, - ControllerInfo, // ARCOMMANDS_ID_FEATURE_CONTROLLER_INFO = 140, - MapperMini, // ARCOMMANDS_ID_FEATURE_MAPPER_MINI = 141, - ThermalCam, // ARCOMMANDS_ID_FEATURE_THERMAL_CAM = 142, - Animation, // ARCOMMANDS_ID_FEATURE_ANIMATION = 144, - SequoiaCam, // ARCOMMANDS_ID_FEATURE_SEQUOIA_CAM = 147, + FollowMe, // ARCOMMANDS_ID_FEATURE_FOLLOW_ME = 134, + Wifi, // ARCOMMANDS_ID_FEATURE_WIFI = 135, + RC, // ARCOMMANDS_ID_FEATURE_RC = 136, + DroneManager, // ARCOMMANDS_ID_FEATURE_DRONE_MANAGER = 137, + Mapper, // ARCOMMANDS_ID_FEATURE_MAPPER = 138, + Debug, // ARCOMMANDS_ID_FEATURE_DEBUG = 139, + ControllerInfo, // ARCOMMANDS_ID_FEATURE_CONTROLLER_INFO = 140, + MapperMini, // ARCOMMANDS_ID_FEATURE_MAPPER_MINI = 141, + ThermalCam, // ARCOMMANDS_ID_FEATURE_THERMAL_CAM = 142, + Animation, // ARCOMMANDS_ID_FEATURE_ANIMATION = 144, + SequoiaCam, // ARCOMMANDS_ID_FEATURE_SEQUOIA_CAM = 147, /// Unknown 149 from anafi4k /// Frame { frame_type: Data, buffer_id: DCNavdata, sequence_id: 14, feature: Some(Unknown { feature: 149, data: [0, 3, 0, 91, 33] }) } /// Unknown 148 from anafi4k diff --git a/arsdk-rs/src/frame.rs b/arsdk-rs/src/frame.rs index 15f80d8..758c4fa 100644 --- a/arsdk-rs/src/frame.rs +++ b/arsdk-rs/src/frame.rs @@ -359,19 +359,26 @@ pub mod impl_scroll { fn try_into_ctx(self, this: &mut [u8], ctx: Endian) -> Result { let mut offset = 0; + // A frame contains the following information: + + // Data type (1 byte) this.gwrite_with::(self.frame_type.into(), &mut offset, ctx)?; + // Target buffer ID (1 byte) this.gwrite_with::(self.buffer_id.into(), &mut offset, ctx)?; + // Sequence number (1 byte) this.gwrite_with::(self.sequence_id, &mut offset, ctx)?; - - let buf_length_offset = offset; + // Total size of the frame (4 bytes, Little endian) // reserve bytes for the buffer length (u32) + let buf_length_offset = offset; + this.gwrite_with::(0, &mut offset, ctx)?; + // Actual data if let Some(feature) = self.feature { this.gwrite_with::(feature, &mut offset, ctx)?; }; - // 7 bytes + feature_length bytes = buf.length + // we can now write the actual length this.pwrite_with::(offset as u32, buf_length_offset, ctx)?; Ok(offset) diff --git a/arsdk-rs/src/handshake.rs b/arsdk-rs/src/handshake.rs index 0dbaa98..c0238ed 100644 --- a/arsdk-rs/src/handshake.rs +++ b/arsdk-rs/src/handshake.rs @@ -17,7 +17,7 @@ pub(crate) struct Request { pub arstream2: Option, } -#[derive(Deserialize, Debug)] +#[derive(Deserialize, Serialize, Debug)] /// Request: "{\"controller_name\":\"arsdk-rs\",\"controller_type\":\"computer\",\"d2c_port\":43210}" /// Response: "{ \"status\": 0, \"c2d_port\": 54321, \"c2d_update_port\": 51, \"c2d_user_port\": 21, \"qos_mode\": 0, \"arstream2_server_stream_port\": 5004, \"arstream2_server_control_port\": 5005 }\u{0}" /// `\u{0}` causes issues, but for now we `trim_end_matches` @@ -72,7 +72,7 @@ pub(crate) fn perform_handshake( d2c_port: u16, ) -> Result { let request = Request { - controller_name: "arsdk-rs".to_string(), + controller_name: "desktop".to_string(), controller_type: "computer".to_string(), d2c_port, // Anafi4k: @@ -97,7 +97,7 @@ pub(crate) fn perform_handshake( handshake_stream.write_all(&request_string)?; - let mut buf = [0_u8; 256]; + let mut buf = [0_u8; 1024]; let read = handshake_stream.read(&mut buf)?; info!("Read {} bytes!", read); diff --git a/arsdk-rs/src/lib.rs b/arsdk-rs/src/lib.rs index ebd5f59..7f4499a 100644 --- a/arsdk-rs/src/lib.rs +++ b/arsdk-rs/src/lib.rs @@ -1,7 +1,7 @@ use crate::frame::{Frame, FrameType}; use chrono::{DateTime, Utc}; use dashmap::DashMap; -use log::{error, info}; +use log::{debug, error, info, trace}; use pnet::datalink; use scroll::{ctx::TryIntoCtx, Pread, LE}; use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket}; @@ -133,9 +133,14 @@ impl Drone { info!("Init address {}", &init_addr); let handshake_response = perform_handshake(init_addr, local_listener.port())?; + + log::debug!( + "handshake_response: \n{}", + serde_json::to_string_pretty(&handshake_response).unwrap() + ); let cmd_sender_target = SocketAddr::new(config.drone_addr, handshake_response.c2d_port); - info!("{}: Spawning CMD Sender", cmd_sender_target); + debug!("{}: Spawning CMD Sender", cmd_sender_target); spawn_cmd_sender(rx_cmd, local_ip, cmd_sender_target)?; @@ -147,7 +152,7 @@ impl Drone { } pub fn send_frame(&self, frame: frame::Frame) -> Result<(), Error> { - let mut raw_message = [0_u8; 2048]; + let mut raw_message = [0_u8; 128]; let written = frame.try_into_ctx(&mut raw_message, LE)?; self.send_raw_message(&raw_message[0..written]) @@ -197,6 +202,8 @@ impl Drone { impl DroneInner { pub(crate) fn sequence_id(&self, buffer_id: frame::BufferID) -> u8 { + // each buffer has its own independant sequence number, + // which should be increased on new data send, but not on retries if let Some(mut sequence_id) = self.sequence_ids.get_mut(&buffer_id) { let command_id = *sequence_id; *sequence_id = sequence_id.overflowing_add(1).0; @@ -262,11 +269,24 @@ fn spawn_cmd_sender( } }; - info!("Frame to sent: {:?}", &frame_to_send); + // ACK + if frame_to_send[0] == 1 { + trace!("Frame to send: {:?}", &frame_to_send); + } else { + log::warn!( + "Frame to send: {}: {:?}", + &frame_to_send + .iter() + .map(|n| format!("{:#b}", n)) + .collect::>() + .join(" "), + &frame_to_send + ); + } let frame = frame_to_send.pread_with::(0, LE); - info!( + debug!( "Sent Frame (length: {}) => {:?}", frame_to_send.len(), &frame @@ -287,7 +307,7 @@ fn spawn_cmd_sender( #[cfg(test)] mod test { use super::*; - use crate::parse::parse_message_frames; + use crate::{ardrone3::Piloting, parse::parse_message_frames}; use ardrone3::ArDrone3; use command::Feature; use frame::{BufferID, Type}; @@ -365,4 +385,26 @@ mod test { 185, ]; } + + #[test] + fn send_takeoff_command() { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::TakeOff))); + + let frame = Frame::new(Type::Data, BufferID::CDNonAck, 42, Some(feature)); + + let mut raw_message = [0_u8; 128]; + let written = frame.try_into_ctx(&mut raw_message, LE).unwrap(); + + let expected: [u8; 11] = [ + 2, // frametype data + 10, // buffer id cdnonack + 42, // sequence number, + 11, 0, 0, 0, // size, (4 bytes, little endian) + 1, // feature Ardrone3 + 0, // piloting + 1, 0, // takeoff, two bytes + ]; + + assert_eq!(&expected, &raw_message[..written]); + } } diff --git a/arsdk-rs/src/listener.rs b/arsdk-rs/src/listener.rs index fb09eea..52727f4 100644 --- a/arsdk-rs/src/listener.rs +++ b/arsdk-rs/src/listener.rs @@ -11,7 +11,7 @@ impl Listener { /// Blocking listener in a infinite loop pub fn listen(&self) { loop { - let mut buf = [0_u8; 256]; + let mut buf = [0_u8; 40960]; if let Ok((bytes_read, origin)) = self.socket.recv_from(&mut buf) { debug!("Received: {} bytes from {}", bytes_read, origin); debug!("Bytes: {}", print_buf(&buf[..bytes_read])); diff --git a/arsdk-rs/src/parse.rs b/arsdk-rs/src/parse.rs index f27a532..389cfc3 100644 --- a/arsdk-rs/src/parse.rs +++ b/arsdk-rs/src/parse.rs @@ -3,7 +3,7 @@ use crate::{ frame::{BufferID, Error, Frame, Type}, print_buf, Drone, FrameType, }; -use log::{error, info}; +use log::{debug, error, info}; use scroll::{Pread, Pwrite, LE}; /// - Parses Frames @@ -14,12 +14,16 @@ pub(crate) fn handle_bytes(drone: &Drone, raw_frames: &[u8]) { for result in frames.iter() { match result { - Ok(FrameType::Known(frame)) => info!("Frame: {:?}", frame), + Ok(FrameType::Known(Frame { + feature: Some(Feature::ArDrone3(Some(ardrone_3))), + .. + })) => info!("Ardrone3 Frame: {:?}", ardrone_3), + Ok(FrameType::Known(frame)) => debug!("Frame: {:?}", frame), Ok(FrameType::Unknown(unknown)) => { - info!("Unknown Frame: {:?}", unknown); - info!("Bytes: {}", print_buf(raw_frames)); + error!("Unknown Frame: {:?}", unknown); + error!("Bytes: {}", print_buf(raw_frames)); } - Err(err) => error!("Receiving Frame: {:?}", err), + Err(err) => debug!("Receiving Frame: {:?}", err), } } @@ -66,7 +70,7 @@ pub(crate) fn parse_message_frames(buf: &[u8]) -> Vec> let mut offset = 0; // TODO: Check how many frames can we receive at once // reasonable given that we receive at most (MAYBE?!) 2 frames - let mut frames = Vec::with_capacity(3); + let mut frames = Vec::with_capacity(10); let mut tried = 1; // try to read all the buf length & limit to 3 Frames of read From b330df724ab8615316792459fcd0141814cc1e00 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Thu, 7 Dec 2023 13:52:38 +0100 Subject: [PATCH 2/4] owow it s working now --- anafi-rs/examples/liftoff.rs | 55 ++++++++--- anafi-rs/src/lib.rs | 124 ++++++++++++++++++++++++- arsdk-rs/src/ardrone3/piloting/pcmd.rs | 1 - arsdk-rs/src/handshake.rs | 8 +- arsdk-rs/src/lib.rs | 41 ++++++-- arsdk-rs/src/listener.rs | 7 +- 6 files changed, 204 insertions(+), 32 deletions(-) diff --git a/anafi-rs/examples/liftoff.rs b/anafi-rs/examples/liftoff.rs index 46b56e9..8e1dfdd 100644 --- a/anafi-rs/examples/liftoff.rs +++ b/anafi-rs/examples/liftoff.rs @@ -4,28 +4,59 @@ use std::error::Error; use anafi_rs::prelude::*; use std::time::Duration; +// https://www.dema.ch/media/catalog/product/pdf/1976008063/pdf_file_3/en_US/white-paper-anafi-usa-v1.5.2_en.pdf +// https://github.com/RIAEvangelist/node-parrot-drone/blob/master/docs/ardrone3.md + fn main() -> Result<(), Box> { env_logger::init(); let drone_ip: std::net::IpAddr = "192.168.42.1".parse()?; let drone = Anafi::connect(drone_ip.into())?; - std::thread::sleep(Duration::from_secs(10)); + drone.take_off()?; - log::warn!("Takeoff!"); + std::thread::sleep(Duration::from_secs(2)); + log::warn!("UP!"); + drone.up()?; + std::thread::sleep(Duration::from_secs(2)); - for _ in 1..50 { - std::thread::sleep(std::time::Duration::from_millis(200)); - drone.take_off()?; - } + // log::warn!("forward!"); + // drone.forward()?; + // std::thread::sleep(Duration::from_secs(1)); + // drone.stop()?; - log::warn!("Wait 5 seconds and get down"); - std::thread::sleep(Duration::from_secs(5)); + // log::warn!("backward!"); + // drone.backward()?; + // std::thread::sleep(Duration::from_secs(1)); + // drone.stop()?; + + log::warn!("left!"); + drone.strafe_left()?; + std::thread::sleep(Duration::from_secs(1)); + + log::warn!("right!"); + 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!("DOWN!"); + drone.down()?; + std::thread::sleep(Duration::from_secs(2)); - for _ in 1..50 { - std::thread::sleep(std::time::Duration::from_millis(200)); - drone.landing()?; - } + std::thread::sleep(Duration::from_secs(2)); + log::warn!("LAND!"); + drone.landing()?; std::thread::sleep(Duration::from_secs(5)); diff --git a/anafi-rs/src/lib.rs b/anafi-rs/src/lib.rs index 3e8fd9b..0d9c610 100644 --- a/anafi-rs/src/lib.rs +++ b/anafi-rs/src/lib.rs @@ -17,6 +17,10 @@ pub mod prelude { } pub struct Anafi { + // roll: 0, + // pitch: forward / backward, + // yaw: strafe left / right, + // gaz: up / down drone: Drone, } @@ -36,7 +40,7 @@ impl Anafi { self.drone.send_frame(frame) } - pub fn up(&self, sequence_id: u8) -> Result<(), Error> { + pub fn up(&self) -> Result<(), Error> { let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { flag: true, roll: 0, @@ -44,7 +48,7 @@ impl Anafi { yaw: 0, gaz: 100, timestamp: Utc::now(), - sequence_id, + sequence_id: self.drone.piloting_id(), })))); let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); @@ -52,7 +56,7 @@ impl Anafi { self.drone.send_frame(frame) } - pub fn down(&self, sequence_id: u8) -> Result<(), Error> { + pub fn down(&self) -> Result<(), Error> { let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { flag: true, roll: 0, @@ -60,7 +64,119 @@ impl Anafi { yaw: 0, gaz: -100, timestamp: Utc::now(), - sequence_id, + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn backward(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: true, + roll: 0, + pitch: -100, + yaw: 0, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn forward(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: true, + roll: 0, + pitch: 100, + yaw: 0, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn strafe_left(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: true, + roll: -100, + pitch: 0, + yaw: 0, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn strafe_right(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: true, + roll: 100, + pitch: 0, + yaw: 0, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn turn_left(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: false, + roll: 0, + pitch: 0, + yaw: -128, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn turn_right(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: false, + roll: 0, + pitch: 0, + yaw: 127, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), + })))); + + let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); + + self.drone.send_frame(frame) + } + + pub fn stop(&self) -> Result<(), Error> { + let feature = Feature::ArDrone3(Some(ArDrone3::Piloting(Piloting::PCMD(PCMD { + flag: true, + roll: 0, + pitch: 0, + yaw: 0, + gaz: 0, + timestamp: Utc::now(), + sequence_id: self.drone.piloting_id(), })))); let frame = Frame::for_drone(&self.drone, Type::Data, BufferID::CDNonAck, Some(feature)); diff --git a/arsdk-rs/src/ardrone3/piloting/pcmd.rs b/arsdk-rs/src/ardrone3/piloting/pcmd.rs index 8bbb9e2..0bd41d2 100644 --- a/arsdk-rs/src/ardrone3/piloting/pcmd.rs +++ b/arsdk-rs/src/ardrone3/piloting/pcmd.rs @@ -10,7 +10,6 @@ pub struct PCMD { pub yaw: i8, pub gaz: i8, pub timestamp: DateTime, - // TODO: How should we handle the `sequence_id` in order not to show it to the user? pub sequence_id: u8, } diff --git a/arsdk-rs/src/handshake.rs b/arsdk-rs/src/handshake.rs index c0238ed..6de3bab 100644 --- a/arsdk-rs/src/handshake.rs +++ b/arsdk-rs/src/handshake.rs @@ -1,4 +1,4 @@ -use log::{error, info}; +use log::{debug, error, info}; use serde::{Deserialize, Serialize}; use serde_with::with_prefix; use std::{ @@ -92,18 +92,18 @@ pub(crate) fn perform_handshake( let mut handshake_stream = retry(10, init_address)?; - info!("Request: {}", serde_json::to_string(&request)?); + debug!("Request: {}", serde_json::to_string(&request)?); let request_string = serde_json::to_vec(&request)?; handshake_stream.write_all(&request_string)?; let mut buf = [0_u8; 1024]; let read = handshake_stream.read(&mut buf)?; - info!("Read {} bytes!", read); + debug!("Read {} bytes!", read); let response_string = String::from_utf8(buf[..read].to_vec())?; - info!("Response: {}", response_string); + debug!("Response: {}", response_string); handshake_stream.shutdown(Shutdown::Both)?; diff --git a/arsdk-rs/src/lib.rs b/arsdk-rs/src/lib.rs index 7f4499a..56f45a7 100644 --- a/arsdk-rs/src/lib.rs +++ b/arsdk-rs/src/lib.rs @@ -15,7 +15,6 @@ use thiserror::Error; pub use chrono; pub const INIT_PORT: u16 = 44444; -pub const LISTEN_PORT: u16 = 43210; pub const PARROT_SPHINX_IP: IpAddr = IpAddr::V4(Ipv4Addr::new(10, 202, 0, 1)); pub const PARROT_SPHINX_CONFIG: Config = Config { drone_addr: PARROT_SPHINX_IP, @@ -94,6 +93,13 @@ where #[derive(Clone, Debug)] pub struct Drone { inner: Arc, + shutdown_sender: SyncSender<()>, +} + +impl Drop for Drone { + fn drop(&mut self) { + let _ = self.shutdown_sender.send(()); + } } #[derive(Debug)] @@ -116,17 +122,22 @@ impl Drone { // @TODO: Check if we're going to miss any messages between spawning the listener and the receiver of commands let (tx_cmd, rx_cmd) = sync_channel(200); + let (shutdown_sender, shutdown_receiver) = sync_channel(1); + let drone = Self { inner: Arc::new(DroneInner { sequence_ids: DashMap::new(), sender: tx_cmd, }), + shutdown_sender, }; - let local_listener = SocketAddr::new(local_ip, LISTEN_PORT); - info!("{}: Spawning Listener", &&local_listener); - - spawn_listener(drone.clone(), local_listener)?; + let local_listener = spawn_listener( + drone.clone(), + SocketAddr::new(local_ip, 0), // let kernel decide which port is available + shutdown_receiver, + )?; + info!("{}: Spawned Listener", &local_listener); let init_addr = SocketAddr::new(config.drone_addr, INIT_PORT); @@ -198,6 +209,10 @@ impl Drone { self.send_frame(pong) } + + pub fn piloting_id(&self) -> u8 { + self.inner.sequence_id(frame::BufferID::CDNonAck) + } } impl DroneInner { @@ -225,20 +240,28 @@ fn local_ip(target: IpAddr) -> Option { .next() } -fn spawn_listener(drone: Drone, addr: SocketAddr) -> Result<(), ConnectionError> { +fn spawn_listener( + drone: Drone, + addr: SocketAddr, + shutdown_receiver: Receiver<()>, +) -> Result { let listener_socket = UdpSocket::bind(addr).map_err(|error| ConnectionError::Io { error, addr })?; + let addr = listener_socket + .local_addr() + .map_err(|error| ConnectionError::Io { error, addr })?; + std::thread::spawn(move || { let listener = Listener { drone: drone.clone(), socket: listener_socket, }; - listener.listen(); + listener.listen(shutdown_receiver); }); - Ok(()) + Ok(addr) } pub(crate) fn print_buf(buf: &[u8]) -> String { @@ -273,7 +296,7 @@ fn spawn_cmd_sender( if frame_to_send[0] == 1 { trace!("Frame to send: {:?}", &frame_to_send); } else { - log::warn!( + log::debug!( "Frame to send: {}: {:?}", &frame_to_send .iter() diff --git a/arsdk-rs/src/listener.rs b/arsdk-rs/src/listener.rs index 52727f4..1856e9c 100644 --- a/arsdk-rs/src/listener.rs +++ b/arsdk-rs/src/listener.rs @@ -1,6 +1,7 @@ use crate::{parse::handle_bytes, print_buf, Drone}; use log::debug; use std::net::UdpSocket; +use std::sync::mpsc::{Receiver, TryRecvError}; pub struct Listener { pub drone: Drone, @@ -9,8 +10,8 @@ pub struct Listener { impl Listener { /// Blocking listener in a infinite loop - pub fn listen(&self) { - loop { + pub fn listen(&self, shutdown_receiver: Receiver<()>) { + while shutdown_receiver.try_recv() == Err(TryRecvError::Empty) { let mut buf = [0_u8; 40960]; if let Ok((bytes_read, origin)) = self.socket.recv_from(&mut buf) { debug!("Received: {} bytes from {}", bytes_read, origin); @@ -19,5 +20,7 @@ impl Listener { handle_bytes(&self.drone, &buf[..bytes_read]); } } + + log::error!("listener shutting down"); } } From 28dab4337f00a3a6e03a39e229beca4dde3f7724 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Thu, 7 Dec 2023 13:54:26 +0100 Subject: [PATCH 3/4] 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()?; From 76d7a6b2ec38c053d1c57cd2d0310d2f1820e161 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Thu, 7 Dec 2023 14:11:30 +0100 Subject: [PATCH 4/4] update pnet dependency which has a buildrs issue --- Cargo.lock | 639 +++++++++++++++++++++++++++++++------------- arsdk-rs/Cargo.toml | 9 +- 2 files changed, 458 insertions(+), 190 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 438d1e4..0b65776 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,33 +4,33 @@ version = 3 [[package]] name = "addr2line" -version = "0.13.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.3.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b909d1c126f78ace756fc337133356c499eebeefcce930fa5fb018823f2b2d" +checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" dependencies = [ "const-random", ] [[package]] name = "aho-corasick" -version = "0.6.10" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -41,16 +41,31 @@ version = "0.1.0" dependencies = [ "arsdk-rs", "env_logger", - "log 0.4.8", + "log 0.4.20", "scroll", "tokio", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" -version = "1.0.28" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arsdk-rs" @@ -58,7 +73,7 @@ version = "0.0.5" dependencies = [ "chrono", "dashmap", - "log 0.4.8", + "log 0.4.20", "pnet", "scroll", "serde", @@ -75,7 +90,7 @@ checksum = "ac39aabd463ad2b1fadb34c22f48e5d160fa60b7cd69a426362e71bde49ebb6d" dependencies = [ "async-log-attributes", "backtrace", - "log 0.4.8", + "log 0.4.20", ] [[package]] @@ -95,25 +110,26 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi 0.3.9", ] [[package]] name = "autocfg" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.50" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", - "cfg-if", + "cc", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -127,7 +143,7 @@ dependencies = [ "arsdk-rs", "async-log", "env_logger", - "log 0.4.8", + "log 0.4.20", "tokio", ] @@ -137,11 +153,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23" +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + [[package]] name = "bytes" -version = "0.5.4" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -149,45 +180,101 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + [[package]] name = "chrono" -version = "0.4.11" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "num-integer", + "android-tzdata", + "iana-time-zone", + "js-sys", "num-traits", - "time", + "wasm-bindgen", + "windows-targets", ] [[package]] name = "const-random" -version = "0.1.8" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.8" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom", - "proc-macro-hack", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.70", + "quote 1.0.33", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core", + "quote 1.0.33", + "syn 1.0.109", ] [[package]] name = "dashmap" -version = "3.11.1" +version = "3.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f87a04c37da1d3d27db1fb7f372802b72fb8c3ff3e9c0914530995127f4a6a1" +checksum = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" dependencies = [ "ahash", - "cfg-if", + "cfg-if 0.1.10", "num_cpus", ] @@ -199,27 +286,33 @@ checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ "atty", "humantime", - "log 0.4.8", + "log 0.4.20", "regex", "termcolor", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "getrandom" -version = "0.1.14" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi", ] [[package]] name = "gimli" -version = "0.22.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -229,13 +322,19 @@ checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" [[package]] name = "hermit-abi" -version = "0.1.12" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + [[package]] name = "humantime" version = "1.3.0" @@ -245,20 +344,58 @@ dependencies = [ "quick-error", ] +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "ipnetwork" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69dd5e3613374e74da81c251750153abe3bd0ad17641ea63d43d1e21d0dbd4d" +checksum = "b8eca9f51da27bc908ef3dd85c21e1bbba794edaf94d7841e37356275b82d31e" dependencies = [ "serde", ] [[package]] name = "itoa" -version = "0.4.5" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "jumpingsumo-rs" @@ -279,17 +416,11 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" -version = "0.2.73" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "log" @@ -297,79 +428,78 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" dependencies = [ - "log 0.4.8", + "log 0.4.20", ] [[package]] name = "log" -version = "0.4.8" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if", + "value-bag", ] [[package]] name = "memchr" -version = "2.3.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "miniz_oxide" -version = "0.4.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] -name = "num-integer" -version = "0.1.42" +name = "num-traits" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "num-traits", ] [[package]] -name = "num-traits" -version = "0.2.11" +name = "num_cpus" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "autocfg", + "hermit-abi 0.3.3", + "libc", ] [[package]] -name = "num_cpus" -version = "1.13.0" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ - "hermit-abi", - "libc", + "memchr", ] [[package]] -name = "object" -version = "0.20.0" +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "pin-project-lite" -version = "0.1.7" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pnet" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c08c2c6c26481fcbe49dc4405baedf47151f859c5a45d3f254c2ff74ce51cf0" +checksum = "c62df42dcd72f6f2a658bcf38509f1027df1440ac85f1af4badbe034418302dc" dependencies = [ "ipnetwork", "pnet_base", @@ -381,15 +511,15 @@ dependencies = [ [[package]] name = "pnet_base" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df28acf2fcc77436dd2b91a9a0c2bb617f9ca5f2acefee1a4135058b9f9801f" +checksum = "b7cd5f7e15220afa66b0a9a62841ea10089f39dcaa1c29752c0b22dfc03111b5" [[package]] name = "pnet_datalink" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545f8df67cbc53438f37f56e68ae5ca49beb3990e9fd7e9e214c8ffd36c0e0ea" +checksum = "7318ae1d6e0b7fa1e49933233c9473f2b72d3d18b97e70e2716c6415dde5f915" dependencies = [ "ipnetwork", "libc", @@ -400,9 +530,9 @@ dependencies = [ [[package]] name = "pnet_macros" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf402424ca7281aa234b726c32bce5a8e2278c72f5863305e291ac3de08e16f8" +checksum = "bbbd5c52c6e04aa720400f9c71cd0e8bcb38cd13421d5caabd9035e9efa47de9" dependencies = [ "regex", "syntex", @@ -411,18 +541,18 @@ dependencies = [ [[package]] name = "pnet_macros_support" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e586854ba703c15f74c486e1a46624566b47f1f61cc8a6b02c6bbe5e34a383b" +checksum = "daf9c5c0c36766d0a4da9ab268c0700771b8ec367b9463fd678109fa28463c5b" dependencies = [ "pnet_base", ] [[package]] name = "pnet_packet" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44c075c6d4f2e814dba621a999838e4a4f749f6117024f52b05b3c559a4fd17" +checksum = "89e26a864d71d0ac51a549cf40283c44ed1b8f98168545638a4730ef9f560283" dependencies = [ "glob", "pnet_base", @@ -433,9 +563,9 @@ dependencies = [ [[package]] name = "pnet_sys" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f881a6d75ac98c5541db6144682d1773bb14c6fc50c6ebac7086c8f7f23c29" +checksum = "73f0de0c52609f157b25d79ce24d9016ab1bbf10cde761397200d634a833872c" dependencies = [ "libc", "winapi 0.2.8", @@ -444,9 +574,9 @@ dependencies = [ [[package]] name = "pnet_transport" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b75ccaee7b5daba9f9a7d47bceeb73cc32edde9952dc5409460d6621ec667b6" +checksum = "6712ab76534340494d849e3c51c64a6261e4b451337b7c05bd3681e384c48b10" dependencies = [ "libc", "pnet_base", @@ -454,12 +584,6 @@ dependencies = [ "pnet_sys", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" - [[package]] name = "proc-macro2" version = "0.4.30" @@ -471,11 +595,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.19" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ - "unicode-xid 0.2.0", + "unicode-ident", ] [[package]] @@ -495,81 +619,91 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.3" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.70", ] [[package]] name = "regex" -version = "1.0.6" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee84f70c8c08744ea9641a731c7fadb475bf2ecc52d7f627feb833e0b3990467" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", - "utf8-ranges", ] [[package]] name = "regex-syntax" -version = "0.6.17" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustc-demangle" -version = "0.1.16" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-serialize" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" [[package]] name = "ryu" -version = "1.0.4" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "scroll" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" +checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" [[package]] name = "serde" -version = "1.0.106" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.106" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.3", - "syn 1.0.39", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.52" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -578,9 +712,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.4.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d3d595d64120bbbc70b7f6d5ae63298b62a3d9f373ec2f56acf5365ca8a444" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ "serde", "serde_with_macros", @@ -588,20 +722,30 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "1.1.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4070d2c9b9d258465ad1d82aabb985b84cd9a3afa94da25ece5a9938ba5f1606" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.3", - "syn 1.0.39", + "darling", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", ] [[package]] name = "slab" -version = "0.4.2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "strsim" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" @@ -616,13 +760,24 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.39" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.3", - "unicode-xid 0.2.0", + "proc-macro2 1.0.70", + "quote 1.0.33", + "unicode-ident", ] [[package]] @@ -686,57 +841,47 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.16" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.3", - "syn 1.0.39", -] - -[[package]] -name = "thread_local" -version = "0.3.6" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ - "lazy_static", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", ] [[package]] -name = "time" -version = "0.1.43" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "libc", - "winapi 0.3.9", + "crunchy", ] [[package]] name = "tokio" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" dependencies = [ "bytes", "num_cpus", @@ -747,15 +892,21 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" +checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.3", - "syn 1.0.39", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", ] +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + [[package]] name = "unicode-xid" version = "0.0.3" @@ -769,22 +920,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "value-bag" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" [[package]] -name = "utf8-ranges" -version = "1.0.4" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log 0.4.20", + "once_cell", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote 1.0.33", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "winapi" @@ -816,9 +1015,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi 0.3.9", ] @@ -829,6 +1028,72 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "ws2_32-sys" version = "0.2.1" diff --git a/arsdk-rs/Cargo.toml b/arsdk-rs/Cargo.toml index 42ba9c1..a23856c 100644 --- a/arsdk-rs/Cargo.toml +++ b/arsdk-rs/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "arsdk-rs" version = "0.0.5" -authors = ["o0Ignition0o ", "Lachezar Lechev "] +authors = [ + "o0Ignition0o ", + "Lachezar Lechev ", +] edition = "2018" description = "Parrot drones SDK in Rust (AeroRust)" license = "MIT/Apache-2.0" @@ -9,8 +12,8 @@ keywords = ["AeroRust", "drone", "parrot", "sdk"] [dependencies] thiserror = "1.0" -pnet = "0.25" -serde = {version = "1.0", features = ["derive"]} +pnet = "0.26" +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_with = "1" dashmap = "3.11"