Skip to content

Commit

Permalink
Merge pull request #95 from ssnover/fix-armfailsafe-command-arg-types
Browse files Browse the repository at this point in the history
Update the types of the arguments for General Commissioning cluster's ArmFailSafe command to match spec
  • Loading branch information
kedars authored Sep 15, 2023
2 parents 320d1ec + c74c46d commit 8b73cbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rs-matter/src/data_model/sdm/failsafe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum NocState {
#[derive(PartialEq)]
pub struct ArmedCtx {
session_mode: SessionMode,
timeout: u8,
timeout: u16,
noc_state: NocState,
}

Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions rs-matter/src/data_model/sdm/general_commissioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 8b73cbd

Please sign in to comment.