Skip to content

Commit

Permalink
src: lib: add clone to some structs
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin authored and patrickelectric committed Sep 19, 2023
1 parent 3d7a020 commit d8e063e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,21 @@ 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,
pub z: f32,
}

/// 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,
Expand Down

0 comments on commit d8e063e

Please sign in to comment.