Merge pull request 'public_mode' (#38) from public_mode into main

Reviewed-on: #38
This commit is contained in:
Robin Müller 2023-02-28 13:18:28 +01:00
commit b2fc172b0a

View File

@ -35,12 +35,16 @@ impl ModeAndSubmode {
submode: u16::from_be_bytes(buf[4..6].try_into().unwrap()),
})
}
pub fn mode(&self) -> u32 {self.mode}
pub fn submode(&self) -> u16 {self.submode}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct ModeCommand {
address: TargetId,
mode_submode: ModeAndSubmode,
pub address: TargetId,
pub mode_submode: ModeAndSubmode,
}
impl ModeCommand {