Merge pull request #77 from thekuwayama/fix__quality
modify: Quality bits into separated flags
This commit is contained in:
commit
13c2504d4c
2 changed files with 7 additions and 5 deletions
|
@ -54,7 +54,7 @@ pub const CLUSTER: Cluster<'static> = Cluster {
|
|||
Attribute::new(
|
||||
AttributesDiscriminants::OnOff as u16,
|
||||
Access::RV,
|
||||
Quality::PERSISTENT,
|
||||
Quality::SN,
|
||||
),
|
||||
],
|
||||
commands: &[
|
||||
|
|
|
@ -73,10 +73,12 @@ bitflags! {
|
|||
#[derive(Default)]
|
||||
pub struct Quality: u8 {
|
||||
const NONE = 0x00;
|
||||
const SCENE = 0x01;
|
||||
const PERSISTENT = 0x02;
|
||||
const FIXED = 0x03;
|
||||
const NULLABLE = 0x04;
|
||||
const SCENE = 0x01; // Short: S
|
||||
const PERSISTENT = 0x02; // Short: N
|
||||
const FIXED = 0x04; // Short: F
|
||||
const NULLABLE = 0x08; // Short: X
|
||||
|
||||
const SN = Self::SCENE.bits | Self::PERSISTENT.bits;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue