diff --git a/src/lib.rs b/src/lib.rs index f83aea0806..0af8c64472 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -116,7 +116,7 @@ pub enum PwmChannel { } /// The `AxisData` struct encapsulate values for the x, y, and z axes. -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone)] pub struct AxisData { pub x: f32, pub y: f32, @@ -124,13 +124,13 @@ pub struct AxisData { } /// Encapsulates the value of ADC's four channels. -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone)] pub struct ADCData { pub channel: [f32; 4], } /// Encapsulates the value of all sensors on the board. -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone)] pub struct SensorData { pub adc: ADCData, pub temperature: f32,