Skip to content

Commit

Permalink
src: lib: add derive copy macro
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin authored and patrickelectric committed Sep 26, 2023
1 parent d8e063e commit ef10c12
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, Clone)]
#[derive(Debug, Default, Clone, Copy)]
pub struct AxisData {
pub x: f32,
pub y: f32,
pub z: f32,
}

/// Encapsulates the value of ADC's four channels.
#[derive(Debug, Default, Clone)]
#[derive(Debug, Default, Clone, Copy)]
pub struct ADCData {
pub channel: [f32; 4],
}

/// Encapsulates the value of all sensors on the board.
#[derive(Debug, Default, Clone)]
#[derive(Debug, Default, Clone, Copy)]
pub struct SensorData {
pub adc: ADCData,
pub temperature: f32,
Expand Down

0 comments on commit ef10c12

Please sign in to comment.