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:
commit
8b73cbd71a
2 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ enum NocState {
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
pub struct ArmedCtx {
|
pub struct ArmedCtx {
|
||||||
session_mode: SessionMode,
|
session_mode: SessionMode,
|
||||||
timeout: u8,
|
timeout: u16,
|
||||||
noc_state: NocState,
|
noc_state: NocState,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ impl FailSafe {
|
||||||
Self { state: State::Idle }
|
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 {
|
match &mut self.state {
|
||||||
State::Idle => {
|
State::Idle => {
|
||||||
self.state = State::Armed(ArmedCtx {
|
self.state = State::Armed(ArmedCtx {
|
||||||
|
|
|
@ -117,8 +117,8 @@ pub const CLUSTER: Cluster<'static> = Cluster {
|
||||||
|
|
||||||
#[derive(FromTLV, ToTLV)]
|
#[derive(FromTLV, ToTLV)]
|
||||||
struct FailSafeParams {
|
struct FailSafeParams {
|
||||||
expiry_len: u8,
|
expiry_len: u16,
|
||||||
bread_crumb: u8,
|
bread_crumb: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(ToTLV)]
|
#[derive(ToTLV)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue