Skip to content

Commit 13c2504

Browse files
authored
Merge pull request #77 from thekuwayama/fix__quality
modify: Quality bits into separated flags
2 parents 1fccb18 + b3224d2 commit 13c2504

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

rs-matter/src/data_model/cluster_on_off.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub const CLUSTER: Cluster<'static> = Cluster {
5454
Attribute::new(
5555
AttributesDiscriminants::OnOff as u16,
5656
Access::RV,
57-
Quality::PERSISTENT,
57+
Quality::SN,
5858
),
5959
],
6060
commands: &[

rs-matter/src/data_model/objects/attribute.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ bitflags! {
7373
#[derive(Default)]
7474
pub struct Quality: u8 {
7575
const NONE = 0x00;
76-
const SCENE = 0x01;
77-
const PERSISTENT = 0x02;
78-
const FIXED = 0x03;
79-
const NULLABLE = 0x04;
76+
const SCENE = 0x01; // Short: S
77+
const PERSISTENT = 0x02; // Short: N
78+
const FIXED = 0x04; // Short: F
79+
const NULLABLE = 0x08; // Short: X
80+
81+
const SN = Self::SCENE.bits | Self::PERSISTENT.bits;
8082
}
8183
}
8284

0 commit comments

Comments
 (0)