From bda0a6570286ba44d08a730629a16ee9d6415b2f Mon Sep 17 00:00:00 2001 From: Pierre Rouanet Date: Mon, 19 Feb 2024 20:43:40 +0100 Subject: [PATCH 1/6] Add post delay option. --- examples/foc.rs | 2 +- src/lib.rs | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/examples/foc.rs b/examples/foc.rs index 789b6fd..72b988a 100644 --- a/examples/foc.rs +++ b/examples/foc.rs @@ -10,7 +10,7 @@ fn main() -> Result<(), Box> { .timeout(Duration::from_millis(100)) .open()?; - let io = DynamixelSerialIO::v1(); + let io = DynamixelSerialIO::v1().with_post_delay(Duration::from_millis(1)); let id = 70; orbita_foc::write_torque_enable(&io, serial_port.as_mut(), id, 0)?; diff --git a/src/lib.rs b/src/lib.rs index 73309aa..138d7dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,6 +28,8 @@ //! ``` mod protocol; +use std::time::Duration; + pub use protocol::CommunicationErrorKind; use protocol::{Protocol, V1, V2}; @@ -48,6 +50,7 @@ enum Protocols { /// Raw dynamixel communication messages controller (protocol v1 or v2) pub struct DynamixelSerialIO { protocol: Protocols, + post_delay: Option, } impl DynamixelSerialIO { @@ -74,6 +77,7 @@ impl DynamixelSerialIO { pub fn v1() -> Self { DynamixelSerialIO { protocol: Protocols::V1(V1), + post_delay: None, } } /// Creates a protocol v2 communication IO. @@ -99,6 +103,15 @@ impl DynamixelSerialIO { pub fn v2() -> Self { DynamixelSerialIO { protocol: Protocols::V2(V2), + post_delay: None, + } + } + + /// Set a delay after each communication. + pub fn with_post_delay(self, delay: Duration) -> Self { + DynamixelSerialIO { + post_delay: Some(delay), + ..self } } @@ -172,10 +185,14 @@ impl DynamixelSerialIO { addr: u8, length: u8, ) -> Result> { - match &self.protocol { + let res = match &self.protocol { Protocols::V1(p) => p.read(serial_port, id, addr, length), Protocols::V2(p) => p.read(serial_port, id, addr, length), + }; + if let Some(delay) = self.post_delay { + std::thread::sleep(delay); } + res } /// Writes raw bytes to register. @@ -217,7 +234,11 @@ impl DynamixelSerialIO { match &self.protocol { Protocols::V1(p) => p.write(serial_port, id, addr, data), Protocols::V2(p) => p.write(serial_port, id, addr, data), + }?; + if let Some(delay) = self.post_delay { + std::thread::sleep(delay); } + Ok(()) } /// Reads raw register bytes from multiple ids at once. From 5f7792c4c075021c1b4c126eb91264303337dd8f Mon Sep 17 00:00:00 2001 From: Pierre Rouanet Date: Mon, 19 Feb 2024 20:45:47 +0100 Subject: [PATCH 2/6] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2636469..2eaa3fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustypot" -version = "0.4.2" +version = "0.5.0" edition = "2021" license = "Apache-2.0" authors = ["Pollen Robotics"] From e57eaa045e2665a75569e328b1613120106c67dd Mon Sep 17 00:00:00 2001 From: Pierre Rouanet Date: Mon, 19 Feb 2024 20:46:36 +0100 Subject: [PATCH 3/6] Update Changelog.md --- Changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index 6486da7..f2eae5c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +## Version 0.5.0 + +- Add an post delay option to the read and write method. + ## Version 0.4.0 - Add support for orbita-2dof-foc device. From c8093e04c6402212b0767128eae67106b804b0c8 Mon Sep 17 00:00:00 2001 From: Pierre Rouanet Date: Wed, 21 Feb 2024 15:36:41 +0100 Subject: [PATCH 4/6] Add post delay in write_fb --- src/lib.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4988307..95980a6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -241,8 +241,6 @@ impl DynamixelSerialIO { Ok(()) } - - pub fn write_fb( &self, serial_port: &mut dyn serialport::SerialPort, @@ -251,13 +249,17 @@ impl DynamixelSerialIO { data: &[u8], ) -> Result> { match &self.protocol { - Protocols::V1(p) => p.write_fb(serial_port, id, addr, data), - Protocols::V2(p) => Err(Box::new(CommunicationErrorKind::Unsupported)), + Protocols::V1(p) => { + let res = p.write_fb(serial_port, id, addr, data); + if let Some(delay) = self.post_delay { + std::thread::sleep(delay); + } + res + } + Protocols::V2(_) => Err(Box::new(CommunicationErrorKind::Unsupported)), } } - - /// Reads raw register bytes from multiple ids at once. /// /// Sends a sync read instruction to the specified motors and wait for the status packet in response. From cf718a889aa82ead9ebd4a2393c1c656bf0600c8 Mon Sep 17 00:00:00 2001 From: Pierre Rouanet Date: Wed, 21 Feb 2024 15:47:38 +0100 Subject: [PATCH 5/6] Fix lint. --- examples/poulpe.rs | 96 -------------------- examples/poulpe2d.rs | 13 +-- examples/poulpe3d.rs | 205 ++++++++++++++++++++++++++----------------- src/protocol/mod.rs | 13 ++- 4 files changed, 138 insertions(+), 189 deletions(-) delete mode 100644 examples/poulpe.rs diff --git a/examples/poulpe.rs b/examples/poulpe.rs deleted file mode 100644 index 8877ecf..0000000 --- a/examples/poulpe.rs +++ /dev/null @@ -1,96 +0,0 @@ -use std::f32::consts::PI; -use std::time::SystemTime; -use std::{error::Error, thread, time::Duration}; - -use rustypot::device::poulpe::{self}; -use rustypot::DynamixelSerialIO; - -use clap::Parser; - -#[derive(Parser, Debug)] -#[command(author, version, about, long_about = None)] -struct Args { - /// tty - #[arg(short, long)] - serialport: String, - /// baud - #[arg(short, long, default_value_t = 1_000_000)] - baudrate: u32, - - /// id - #[arg(short, long)] - id: u8, - - ///sinus amplitude (f64) - #[arg(short, long, default_value_t = 10.0)] - amplitude: f32, - - ///sinus frequency (f64) - #[arg(short, long, default_value_t = 1.0)] - frequency: f32, -} - -const MOTOR_A: u8 = 42; - -fn main() -> Result<(), Box> { - let args = Args::parse(); - let serialportname: String = args.serialport; - let baudrate: u32 = args.baudrate; - let id: u8 = args.id; - let amplitude: f32 = args.amplitude; - let frequency: f32 = args.frequency; - - //print the standard ids for the arm motors - - //print all the argument values - println!("serialport: {}", serialportname); - println!("baudrate: {}", baudrate); - println!("id: {}", id); - println!("amplitude: {}", amplitude); - println!("frequency: {}", frequency); - - let mut serial_port = serialport::new(serialportname, baudrate) - .timeout(Duration::from_millis(100)) - .open()?; - - let now = SystemTime::now(); - - let io = DynamixelSerialIO::v1(); - - // Ping - let x = io.ping(serial_port.as_mut(), id); - println!("Ping : {:?}", x); - - let mut t = now.elapsed().unwrap().as_secs_f32(); - loop { - if t > 10.0 { - break; - } - - // let x = io.ping(serial_port.as_mut(), id); - // println!("Ping : {:?}", x); - - t = now.elapsed().unwrap().as_secs_f32(); - let target = amplitude * 180.0_f32.to_radians() * (2.0 * PI * 0.5 * t).sin(); - - let pos = poulpe::read_motor_a_present_position(&io, serial_port.as_mut(), id)?; - thread::sleep(Duration::from_micros(1000)); - // let target = poulpe::read_motor_a_goal_position(&io, serial_port.as_mut(), id)?; - let _ = poulpe::write_motor_a_goal_position(&io, serial_port.as_mut(), id, target as i32); - println!("target: {} pos: {}", target, pos); - - thread::sleep(Duration::from_millis(1)); - } - - // orbita2dof_foc::write_torque_enable(&io, serial_port.as_mut(), id, 0x00)?; - // let reg = orbita2dof_foc::read_torque_enable(&io, serial_port.as_mut(), id)?; - // if reg == 0x01 { - // println!("Motor on"); - // } else { - // println!("Motor off"); - // } - - thread::sleep(Duration::from_millis(2000)); - - Ok(()) -} diff --git a/examples/poulpe2d.rs b/examples/poulpe2d.rs index 18e2c06..946060d 100644 --- a/examples/poulpe2d.rs +++ b/examples/poulpe2d.rs @@ -1,8 +1,7 @@ -use std::f32::consts::PI; use std::time::SystemTime; use std::{error::Error, thread, time::Duration, time::Instant}; -use rustypot::device::orbita2d_poulpe::{self, MotorPositionSpeedLoad, MotorValue}; +use rustypot::device::orbita2d_poulpe::{self, MotorValue}; // use rustypot::device::orbita3d_poulpe::{self, MotorValue}; use rustypot::DynamixelSerialIO; @@ -123,14 +122,8 @@ fn main() -> Result<(), Box> { Ok(feedback) => { nbok += 1; println!( - "42 target: {} feedback pos: {} {} feedback vel: {} {} feedback torque: {} {}", - target, - feedback.position.motor_a, - feedback.position.motor_b, - feedback.speed.motor_a, - feedback.speed.motor_b, - feedback.load.motor_a, - feedback.load.motor_b + "42 target: {} feedback pos: {} {}", + target, feedback.position.motor_a, feedback.position.motor_b, ); } Err(e) => { diff --git a/examples/poulpe3d.rs b/examples/poulpe3d.rs index 512e59b..ea84e3d 100644 --- a/examples/poulpe3d.rs +++ b/examples/poulpe3d.rs @@ -2,7 +2,6 @@ use std::f32::consts::PI; use std::time::SystemTime; use std::{error::Error, thread, time::Duration, time::Instant}; -use rustypot::device::orbita2d_poulpe::MotorPositionSpeedLoad; use rustypot::device::orbita3d_poulpe::{self, MotorValue}; use rustypot::DynamixelSerialIO; @@ -31,8 +30,6 @@ struct Args { frequency: f32, } - - fn main() -> Result<(), Box> { let args = Args::parse(); let serialportname: String = args.serialport; @@ -60,48 +57,70 @@ fn main() -> Result<(), Box> { // Ping let x = io.ping(serial_port.as_mut(), id); - println!("Ping {:?}: {:?}", id,x); - - let _ = orbita3d_poulpe::write_torque_enable(&io, serial_port.as_mut(), id, MotorValue::{top:true, middle:true, bottom:true})?; + println!("Ping {:?}: {:?}", id, x); + + let _ = orbita3d_poulpe::write_torque_enable( + &io, + serial_port.as_mut(), + id, + MotorValue:: { + top: true, + middle: true, + bottom: true, + }, + )?; // let _ = orbita3d_poulpe::write_torque_enable(&io, serial_port.as_mut(), id, MotorValue::{top:false, middle:false, bottom:false})?; thread::sleep(Duration::from_millis(1000)); // let torque = orbita3d_poulpe::read_torque_enable(&io, serial_port.as_mut(), id)?; // println!("torque: {:?}", torque); // thread::sleep(Duration::from_millis(1000)); - - let curr_pos= orbita3d_poulpe::read_current_position(&io, serial_port.as_mut(), id)?; - + let curr_pos = orbita3d_poulpe::read_current_position(&io, serial_port.as_mut(), id)?; // let index_sensor = orbita3d_poulpe::read_index_sensor(&io, serial_port.as_mut(), id)?; // println!("index_sensor: {:?} {:?} {:?}", index_sensor.top, index_sensor.middle, index_sensor.bottom); - - let limit= orbita3d_poulpe::read_velocity_limit(&io, serial_port.as_mut(), id)?; - println!("vel_limit: {:?} {:?} {:?}", limit.top, limit.middle, limit.bottom); - let limit= orbita3d_poulpe::read_torque_flux_limit(&io, serial_port.as_mut(), id)?; - println!("tf_limit: {:?} {:?} {:?}", limit.top, limit.middle, limit.bottom); - let limit= orbita3d_poulpe::read_uq_ud_limit(&io, serial_port.as_mut(), id)?; - println!("uq_ud_limit: {:?} {:?} {:?}", limit.top, limit.middle, limit.bottom); - - let pid =orbita3d_poulpe::read_flux_pid(&io, serial_port.as_mut(), id)?; + let limit = orbita3d_poulpe::read_velocity_limit(&io, serial_port.as_mut(), id)?; + println!( + "vel_limit: {:?} {:?} {:?}", + limit.top, limit.middle, limit.bottom + ); + let limit = orbita3d_poulpe::read_torque_flux_limit(&io, serial_port.as_mut(), id)?; + println!( + "tf_limit: {:?} {:?} {:?}", + limit.top, limit.middle, limit.bottom + ); + let limit = orbita3d_poulpe::read_uq_ud_limit(&io, serial_port.as_mut(), id)?; + println!( + "uq_ud_limit: {:?} {:?} {:?}", + limit.top, limit.middle, limit.bottom + ); + + let pid = orbita3d_poulpe::read_flux_pid(&io, serial_port.as_mut(), id)?; println!("flux_pid: {:?} {:?} {:?}", pid.top, pid.middle, pid.bottom); - let pid =orbita3d_poulpe::read_torque_pid(&io, serial_port.as_mut(), id)?; - println!("torque_pid: {:?} {:?} {:?}", pid.top, pid.middle, pid.bottom); - let pid =orbita3d_poulpe::read_velocity_pid(&io, serial_port.as_mut(), id)?; - println!("velocity_pid: {:?} {:?} {:?}", pid.top, pid.middle, pid.bottom); - let pid =orbita3d_poulpe::read_position_pid(&io, serial_port.as_mut(), id)?; - println!("position_pid: {:?} {:?} {:?}", pid.top, pid.middle, pid.bottom); - - + let pid = orbita3d_poulpe::read_torque_pid(&io, serial_port.as_mut(), id)?; + println!( + "torque_pid: {:?} {:?} {:?}", + pid.top, pid.middle, pid.bottom + ); + let pid = orbita3d_poulpe::read_velocity_pid(&io, serial_port.as_mut(), id)?; + println!( + "velocity_pid: {:?} {:?} {:?}", + pid.top, pid.middle, pid.bottom + ); + let pid = orbita3d_poulpe::read_position_pid(&io, serial_port.as_mut(), id)?; + println!( + "position_pid: {:?} {:?} {:?}", + pid.top, pid.middle, pid.bottom + ); let mut t = now.elapsed().unwrap().as_secs_f32(); - let mut nberr=0; - let mut nbtot=0; - let mut nbok=0; + let mut nberr = 0; + let mut nbtot = 0; + let mut nbok = 0; loop { - let t0 = Instant::now(); + let t0 = Instant::now(); if t > 100.0 { break; @@ -110,72 +129,96 @@ fn main() -> Result<(), Box> { t = now.elapsed().unwrap().as_secs_f32(); let target = amplitude * 180.0_f32.to_radians() * (2.0 * PI * 0.5 * t).sin(); - let feedback = orbita3d_poulpe::write_target_position(&io, serial_port.as_mut(), id, MotorValue::{top:target+curr_pos.top, middle:target+curr_pos.middle, bottom:target+curr_pos.bottom}); - match feedback { - Ok(feedback) => { - nbok+=1; - println!("42 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); - }, - Err(e) => { - nberr+=1; - println!("error: {:?}", e); - } - } - - // thread::sleep(Duration::from_micros(500)); + let feedback = orbita3d_poulpe::write_target_position( + &io, + serial_port.as_mut(), + id, + MotorValue:: { + top: target + curr_pos.top, + middle: target + curr_pos.middle, + bottom: target + curr_pos.bottom, + }, + ); + match feedback { + Ok(feedback) => { + nbok += 1; + println!( + "42 target: {} feedback pos: {} {} {}", + target, + feedback.position.top, + feedback.position.middle, + feedback.position.bottom, + ); + } + Err(e) => { + nberr += 1; + println!("error: {:?}", e); + } + } + + // thread::sleep(Duration::from_micros(500)); // let feedback = orbita3d_poulpe::write_target_position(&io, serial_port.as_mut(), 43, MotorValue::{top:0.0, middle:0.0, bottom:0.0}); // // let feedback = orbita3d_poulpe::write_target_position(&io, serial_port.as_mut(), 43, MotorValue::{top:0.0, middle:0.0, bottom:0.0}).unwrap_or_else(MotorPositionSpeedLoad::{position:MotorValue::{top:0.0, middle:0.0, bottom:0.0}, speed:MotorValue::{top:0.0, middle:0.0, bottom:0.0}, load:MotorValue::{top:0.0, middle:0.0, bottom:0.0}}); - // match feedback { - // Ok(feedback) => { - // nbok+=1; - // println!("43 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); - // }, - // Err(e) => { - // nberr+=1; - // println!("error: {:?}", e); - // } - // } - - + // match feedback { + // Ok(feedback) => { + // nbok+=1; + // println!("43 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); + // }, + // Err(e) => { + // nberr+=1; + // println!("error: {:?}", e); + // } + // } // println!("43 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); - // thread::sleep(Duration::from_micros(500)); + // thread::sleep(Duration::from_micros(500)); // let feedback = orbita3d_poulpe::write_target_position(&io, serial_port.as_mut(), 44, MotorValue::{top:0.0, middle:0.0, bottom:0.0}); // // let feedback = orbita3d_poulpe::write_target_position(&io, serial_port.as_mut(), 44, MotorValue::{top:0.0, middle:0.0, bottom:0.0}).unwrap_or_else(MotorPositionSpeedLoad::{position:MotorValue::{top:0.0, middle:0.0, bottom:0.0}, speed:MotorValue::{top:0.0, middle:0.0, bottom:0.0}, load:MotorValue::{top:0.0, middle:0.0, bottom:0.0}}); - // match feedback { - // Ok(feedback) => { - // nbok+=1; - // println!("44 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); - // }, - // Err(e) => { - // nberr+=1; - // println!("error: {:?}", e); - // } - // } - - // nbtot+=3; - nbtot+=1; + // match feedback { + // Ok(feedback) => { + // nbok+=1; + // println!("44 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); + // }, + // Err(e) => { + // nberr+=1; + // println!("error: {:?}", e); + // } + // } + + // nbtot+=3; + nbtot += 1; // println!("44 target: {} feedback pos: {} {} {} feedback vel: {} {} {} feedback torque: {} {} {} ", target, feedback.position.top,feedback.position.middle,feedback.position.bottom,feedback.speed.top,feedback.speed.middle,feedback.speed.bottom,feedback.load.top,feedback.load.middle,feedback.load.bottom); - // let axis_sensor = orbita3d_poulpe::read_axis_sensor(&io, serial_port.as_mut(), id)?; - // println!("axis_sensor: {:6.2} {:6.2} {:6.2}", axis_sensor.top, axis_sensor.middle, axis_sensor.bottom); + // let axis_sensor = orbita3d_poulpe::read_axis_sensor(&io, serial_port.as_mut(), id)?; + // println!("axis_sensor: {:6.2} {:6.2} {:6.2}", axis_sensor.top, axis_sensor.middle, axis_sensor.bottom); - - - - // thread::sleep(Duration::from_micros(1000-t0.elapsed().as_micros() as u64)); + // thread::sleep(Duration::from_micros(1000-t0.elapsed().as_micros() as u64)); // thread::sleep(Duration::from_millis(1)); - thread::sleep(Duration::from_micros(500)); - // thread::sleep(Duration::from_micros(4500)); - println!("ELAPSED: {:?}",t0.elapsed().as_micros()); + thread::sleep(Duration::from_micros(500)); + // thread::sleep(Duration::from_micros(4500)); + println!("ELAPSED: {:?}", t0.elapsed().as_micros()); } - println!("nberr: {} nbtot: {} nbok: {} ratio: {:?}",nberr,nbtot,nbok, nbok as f32 / nbtot as f32); + println!( + "nberr: {} nbtot: {} nbok: {} ratio: {:?}", + nberr, + nbtot, + nbok, + nbok as f32 / nbtot as f32 + ); println!("STOP"); - let _ = orbita3d_poulpe::write_torque_enable(&io, serial_port.as_mut(), id, MotorValue::{top:false, middle:false, bottom:false})?; - + let _ = orbita3d_poulpe::write_torque_enable( + &io, + serial_port.as_mut(), + id, + MotorValue:: { + top: false, + middle: false, + bottom: false, + }, + )?; thread::sleep(Duration::from_millis(2000)); diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 60f28b6..f5ef071 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -1,9 +1,11 @@ use serialport::SerialPort; mod v1; +#[allow(unused_imports)] pub use v1::{PacketV1, V1}; mod v2; +#[allow(unused_imports)] pub use v2::{PacketV2, V2}; use crate::{ @@ -32,9 +34,16 @@ pub trait Protocol { self.read_status_packet(port, id).map(|_| ()) } - fn write_fb(&self, port: &mut dyn SerialPort, id: u8, addr: u8, data: &[u8]) -> Result> { + fn write_fb( + &self, + port: &mut dyn SerialPort, + id: u8, + addr: u8, + data: &[u8], + ) -> Result> { self.send_instruction_packet(port, P::write_packet(id, addr, data).as_ref())?; - self.read_status_packet(port, id).map(|sp| sp.params().to_vec()) + self.read_status_packet(port, id) + .map(|sp| sp.params().to_vec()) } fn sync_read( From 02e97c34917c0ffe7832ccb66ec5907bfded28f0 Mon Sep 17 00:00:00 2001 From: Pierre Rouanet Date: Wed, 21 Feb 2024 15:48:43 +0100 Subject: [PATCH 6/6] Fmt. --- src/device/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/device/mod.rs b/src/device/mod.rs index dee567f..c4c04fb 100644 --- a/src/device/mod.rs +++ b/src/device/mod.rs @@ -116,7 +116,6 @@ macro_rules! reg_write_only_fb { }; } - /// Generates read, sync_read, write and sync_write functions for given register #[macro_export] macro_rules! reg_read_write { @@ -134,12 +133,11 @@ macro_rules! reg_read_write_fb { }; } - pub mod l0_force_fan; pub mod mx; pub mod orbita2d_poulpe; pub mod orbita2dof_foc; pub mod orbita_foc; -pub mod xl320; pub mod orbita3d_poulpe; +pub mod xl320;