Skip to content

Commit

Permalink
adding more missing defmt derives, and bumping versions to test again
Browse files Browse the repository at this point in the history
Feature flag defmt has been unusable mostly for v0.0.17 and v0.0.18 hopefully this is the last set of them. Might be more
  • Loading branch information
Michael Aebli committed Jan 28, 2025
1 parent 9545921 commit 22efc96
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "m-bus-parser"
version = "0.0.18"
version = "0.0.19"
edition = "2021"
description = "A library for parsing M-Bus frames"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ keywords = ["m-bus", "parser", "parse", "cli"]


[dependencies]
m-bus-parser = { path = "..", version = "0.0.18", features = ["std", "serde"] }
m-bus-parser = { path = "..", version = "0.0.19", features = ["std", "serde"] }
clap = { version = "4.5.4", features = ["derive"] }
2 changes: 1 addition & 1 deletion examples/cortex-m/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cortex-m = "0.7.7"
cortex-m-rt = "0.7.3"
cortex-m-semihosting = "0.5.0"
panic-halt = "0.2.0"
m-bus-parser = { path = "../../", version = "0.0.18" }
m-bus-parser = { path = "../../", version = "0.0.19" }
# Uncomment for the panic example.
# panic-itm = "0.4.1"

Expand Down
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://maebli.github.io/"
repository = "https://github.com/maebli/m-bus-parser"

[dependencies]
m-bus-parser = { path = "..", version = "0.0.18", features = ["std", "serde"] }
m-bus-parser = { path = "..", version = "0.0.19", features = ["std", "serde"] }
serde_json = "1.0"
pyo3 = { version = "0.23.1", features = ["extension-module","generate-import-lib"] }
hex = "0.4.2"
Expand Down
5 changes: 5 additions & 0 deletions src/user_data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ bitflags::bitflags! {
#[repr(transparent)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct StatusField: u8 {
const COUNTER_BINARY_SIGNED = 0b0000_0001;
const COUNTER_FIXED_DATE = 0b0000_0010;
Expand Down Expand Up @@ -269,6 +270,7 @@ impl std::error::Error for ApplicationLayerError {}

#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum ApplicationResetSubcode {
All(u8),
UserData(u8),
Expand Down Expand Up @@ -354,6 +356,7 @@ fn bcd_hex_digits_to_u32(digits: [u8; 4]) -> Result<u32, ApplicationLayerError>
}
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Counter {
count: u32,
}
Expand All @@ -366,6 +369,7 @@ impl fmt::Display for Counter {
}
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct IdentificationNumber {
pub number: u32,
}
Expand Down Expand Up @@ -525,6 +529,7 @@ impl fmt::Display for Medium {
}
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct FixedDataHeader {
pub identification_number: IdentificationNumber,
pub manufacturer: Result<ManufacturerCode, ApplicationLayerError>,
Expand Down
2 changes: 1 addition & 1 deletion wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = ["console_error_panic_hook"]

[dependencies]
wasm-bindgen = "0.2.84"
m-bus-parser = { path = "..", version = "0.0.18", features = ["std", "serde"] }
m-bus-parser = { path = "..", version = "0.0.19", features = ["std", "serde"] }
serde = { version = "1.0" }
serde_json = "1.0"

Expand Down

0 comments on commit 22efc96

Please sign in to comment.