Skip to content

Commit

Permalink
Fix lighting samples weird values (project-chip#36079)
Browse files Browse the repository at this point in the history
- Set default brightness to 100% out of box
  (like most real light bulbs) rather than 1 or even 0 (illegal).
- Set the MinLevel and MaxLevel to legal values everywhere they
  were not.

Testing done:

- All of CI still passes
- Samples react more like real lights
  • Loading branch information
tcarmelveilleux authored Oct 15, 2024
1 parent e7ff441 commit 9117e4d
Show file tree
Hide file tree
Showing 38 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ endpoint 2 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x00;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5079,7 +5079,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2271,7 +2271,7 @@ endpoint 1 {
}

server cluster LevelControl {
ram attribute currentLevel default = 0x01;
ram attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4206,7 +4206,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x00;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x1;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2885,7 +2885,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ endpoint 13 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_onofflight_samplemei.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_onofflight_samplemei.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3062,4 +3062,4 @@
"parentEndpointIdentifier": 0
}
]
}
}
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2983,4 +2983,4 @@
"parentEndpointIdentifier": 0
}
]
}
}
4 changes: 2 additions & 2 deletions examples/chef/sample_app_util/test_files/sample_zap_file.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -4554,7 +4554,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"defaultValue": "0x01",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4315,4 +4315,4 @@
"parentEndpointIdentifier": null
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4484,7 +4484,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x254;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2952,7 +2952,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x254",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x254;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x254",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x254;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3135,7 +3135,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x254",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4500,7 +4500,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/zap/lighting-on-off.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/zap/lighting-on-off.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3637,7 +3637,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/qpg/zap/light.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2631,7 +2631,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/qpg/zap/light.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4770,7 +4770,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3803,7 +3803,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3288,7 +3288,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down

0 comments on commit 9117e4d

Please sign in to comment.