Commit da2d79e
authored
level_control: bump TestLevelControlDeviceLogic cluster revision to 6 (#453)
## Summary
`LevelControlHandler::validate()` panics unless `H::CLUSTER.revision ==
6`, and the Matter 1.5.1 IDL declares LevelControl at revision 6. The
in-tree `TestLevelControlDeviceLogic` still declared revision 5, so any
caller that exercises `init()` panics at startup with:
```
LevelControl validation: incorrect version number: expected 6 got 5
```
`examples/src/bin/speaker.rs` L99–115 hits this — it constructs the
handler with `new(...) + .init(...)`. The sibling `TestOnOffDeviceLogic`
already tracks revision 6, so this just brings LevelControl in line.
## Changes
- `rs-matter/src/dm/clusters/app/level_control.rs:1778` —
`with_revision(5)` → `with_revision(6)`.
- Same file — adds a regression test that constructs the LevelControl +
OnOff handler pair the same way `speaker.rs` does, so future drift
between `TestLevelControlDeviceLogic::CLUSTER` and what
`LevelControlHandler::validate()` requires is caught at CI time rather
than at first runtime use.
## References
- `rs-matter/src/dm/clusters/app/level_control.rs` L290–296 — validator
(`if H::CLUSTER.revision != 6 { panic!(...) }`).
- `rs-matter-codegen/src/idl/parser/controller-clusters-V1.5.1.0.matter`
L557–558 — IDL says revision 6.
## Test plan
- [x] `cargo test --package rs-matter --lib
dm::clusters::app::level_control::tests::` — passes.
- [x] Reverted the revision to 5 to confirm the new test fails with the
original panic; restored.1 parent 7d96427 commit da2d79e
1 file changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1775 | 1775 | | |
1776 | 1776 | | |
1777 | 1777 | | |
1778 | | - | |
| 1778 | + | |
1779 | 1779 | | |
1780 | 1780 | | |
1781 | 1781 | | |
| |||
1827 | 1827 | | |
1828 | 1828 | | |
1829 | 1829 | | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
0 commit comments