Skip to content

Commit

Permalink
feat: add defmt-03 feature with Format for SensorData
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Dec 27, 2023
1 parent 7cacb48 commit 4497a11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ rust-version = "1.62"
[features]
default = []

nightly = ["embedded-hal-async"]
nightly = ["dep:embedded-hal-async"]
defmt-03 = ["dep:defmt"]

[dependencies]
embedded-hal = "0.2"
embedded-hal-async = { version = "1.0.0-rc.3", optional = true }

defmt = { version = "0.3", optional = true }

num-traits = { version = "0.2", default-features = false, features = ["libm"] }
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ pub enum OutputMode {
}

#[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
///Sensor data
pub struct SensorData {
///The measured pressure
Expand Down

0 comments on commit 4497a11

Please sign in to comment.