Skip to content

Commit

Permalink
Update ColorControl bounds based on spec fixes (#35156)
Browse files Browse the repository at this point in the history
* Update color defaults in samples

* Update color control server logic to avoid div-by-zero

* Update TC-CC-2.1 with new bounds on ColorControl

* Restyled by clang-format

* More fixes to CI

* Set default startup mireds to null

* Fix some comments

* Try to fix CI

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
tcarmelveilleux and restyled-commits authored Aug 27, 2024
1 parent d705323 commit 4d4fcb3
Show file tree
Hide file tree
Showing 32 changed files with 126 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9168,10 +9168,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
persist attribute startUpColorTemperatureMireds;
persist attribute startUpColorTemperatureMireds default = 0x00FA;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 7;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18200,7 +18200,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -18216,7 +18216,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -18248,7 +18248,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2356,10 +2356,10 @@ endpoint 1 {
ram attribute enhancedCurrentHue default = 0x0000;
ram attribute enhancedColorMode default = 0x02;
ram attribute colorCapabilities default = 0x0000;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute startUpColorTemperatureMireds default = 0x00FA;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3797,7 +3797,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -3813,7 +3813,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -3845,7 +3845,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2468,10 +2468,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x0000;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds default = 0x0000;
ram attribute startUpColorTemperatureMireds default = 0;
ram attribute startUpColorTemperatureMireds default = 0x00FA;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3901,7 +3901,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -3917,7 +3917,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -3949,7 +3949,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
6 changes: 3 additions & 3 deletions examples/chef/sample_app_util/test_files/sample_zap_file.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5484,7 +5484,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -5500,7 +5500,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -5532,7 +5532,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2535,10 +2535,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute startUpColorTemperatureMireds default = 0x00FA;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 7;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4220,7 +4220,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -4236,7 +4236,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -4268,7 +4268,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2721,10 +2721,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute startUpColorTemperatureMireds default = 0x00FA;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 7;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5196,7 +5196,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -5212,7 +5212,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -5244,7 +5244,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2584,10 +2584,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute startUpColorTemperatureMireds default = 0x00FA;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 7;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4403,7 +4403,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -4419,7 +4419,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -4451,7 +4451,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
6 changes: 3 additions & 3 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3173,10 +3173,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
persist attribute startUpColorTemperatureMireds;
persist attribute startUpColorTemperatureMireds default = 0x00FA;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 7;

Expand Down
6 changes: 3 additions & 3 deletions examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5733,7 +5733,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -5749,7 +5749,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -5781,7 +5781,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
6 changes: 3 additions & 3 deletions examples/lighting-app/qpg/zap/light.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2698,10 +2698,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
ram attribute startUpColorTemperatureMireds default = 0x00FA;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
Expand Down
6 changes: 3 additions & 3 deletions examples/lighting-app/qpg/zap/light.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5881,7 +5881,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -5897,7 +5897,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -5929,7 +5929,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2748,10 +2748,10 @@ endpoint 1 {
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute colorTempPhysicalMinMireds default = 0x009A;
ram attribute colorTempPhysicalMaxMireds default = 0x01C6;
ram attribute coupleColorTempToLevelMinMireds;
persist attribute startUpColorTemperatureMireds;
persist attribute startUpColorTemperatureMireds default = 0x00FA;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5172,7 +5172,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"defaultValue": "0x009A",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -5188,7 +5188,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFEFF",
"defaultValue": "0x01C6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -5220,7 +5220,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x00FA",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Loading

0 comments on commit 4d4fcb3

Please sign in to comment.