Merge pull request #95 from ssnover/fix-armfailsafe-command-arg-types

Update the types of the arguments for General Commissioning cluster's ArmFailSafe command to match spec
This commit is contained in:
Kedar Sovani 2023-09-15 11:52:58 +05:30 committed by GitHub
commit 8b73cbd71a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -34,7 +34,7 @@ enum NocState {
#[derive(PartialEq)]
pub struct ArmedCtx {
session_mode: SessionMode,
timeout: u8,
timeout: u16,
noc_state: NocState,
}
@ -54,7 +54,7 @@ impl FailSafe {
Self { state: State::Idle }
}
pub fn arm(&mut self, timeout: u8, session_mode: SessionMode) -> Result<(), Error> {
pub fn arm(&mut self, timeout: u16, session_mode: SessionMode) -> Result<(), Error> {
match &mut self.state {
State::Idle => {
self.state = State::Armed(ArmedCtx {

View file

@ -117,8 +117,8 @@ pub const CLUSTER: Cluster<'static> = Cluster {
#[derive(FromTLV, ToTLV)]
struct FailSafeParams {
expiry_len: u8,
bread_crumb: u8,
expiry_len: u16,
bread_crumb: u64,
}
#[derive(ToTLV)]