From cf4abccc319bbfe7f4729037625ab901f7915ec1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 10 Sep 2025 17:34:00 +0200 Subject: [PATCH] add some missing defmt impls --- src/ecss/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ecss/mod.rs b/src/ecss/mod.rs index b0dae80..7687261 100644 --- a/src/ecss/mod.rs +++ b/src/ecss/mod.rs @@ -29,6 +29,7 @@ pub type CrcType = u16; #[derive(Debug, Copy, Clone, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(u8)] #[non_exhaustive] pub enum PusServiceId { @@ -103,6 +104,7 @@ impl TryFrom for PusVersion { /// ECSS Packet Type Codes (PTC)s. #[derive(Debug, Copy, Clone, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(u8)] pub enum PacketTypeCodes { Boolean = 1, @@ -124,6 +126,7 @@ pub type Ptc = PacketTypeCodes; /// ECSS Packet Field Codes (PFC)s for the unsigned [Ptc]. #[derive(Debug, Copy, Clone, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(u8)] pub enum PfcUnsigned { OneByte = 4, @@ -141,6 +144,7 @@ pub enum PfcUnsigned { /// ECSS Packet Field Codes (PFC)s for the real (floating point) [Ptc]. #[derive(Debug, Copy, Clone, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(u8)] pub enum PfcReal { /// 4 octets simple precision format (IEEE)