Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SVE1] Fix level control's CurrentLevel update when receiving an Off command #20788

Merged

Conversation

marius-alex-tache
Copy link
Contributor

Problem

When using both Level Control and On/Off clusters on the same endpoint, the CurrentLevel attribute is not correctly updated when receiving an Off command.

When emberAfOnOffClusterLevelControlEffectCallback is called, if newValue is false (transition On -> Off), there is a comment which states that the actual OnLevel check will be done in emberAfLevelControlClusterServerTickCallback. There is no such check. Furthermore, due to the fact that temporaryCurrentLevelCache can never be equal to INVALID_STORED_LEVEL (0xFFFF) when OnLevel is defined and it's valid, the check inside emberAfLevelControlClusterServerTickCallback will always pass and the CurrentLevel value will be restored.

I have used section 1.6.4.1.1 from the Application Clusters document as reference.

Proposed Solution

Add a condition in emberAfLevelControlClusterServerTickCallback, which checks if the OnLevel attribute is defined. If it is,
the CurrentLevel should not be restored to the previously saved value.

@boring-cyborg boring-cyborg bot added the app label Jul 15, 2022
@CLAassistant
Copy link

CLAassistant commented Jul 15, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jul 21, 2022

PR #20788: Size comparison from 83deb47 to 1c8081b

Increases (29 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section 83deb47 1c8081b change % change
bl602 lighting-app bl602 (read/write) 1380794 1380850 56 0.0
.text 1050932 1050956 24 0.0
bl602+rpc (read/write) 1426202 1426258 56 0.0
.text 1082588 1082612 24 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668327 668343 16 0.0
.text 579700 579716 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633943 633959 16 0.0
.text 556068 556084 16 0.0
pump-app LP_CC2652R7 (read only) 680579 680619 40 0.0
.rodata 88811 88835 24 0.0
.text 591284 591300 16 0.0
shell LP_CC2652R7 (read only) 660810 660826 16 0.0
.text 575404 575420 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582050 582074 24 0.0
.app_xip_area 460440 460464 24 0.0
lock cyw930739m2evb_01 (read/write) 587958 587966 8 0.0
.app_xip_area 461620 461628 8 0.0
efr32 lighting-app BRD4161A (read/write) 1086760 1086808 48 0.0
.text 951472 951520 48 0.0
BRD4161A+rpc (read/write) 1141036 1141100 64 0.0
.text 988860 988924 64 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.text 808984 809032 48 0.0
esp32 all-clusters-app c3devkit (read only) 1021930 1021962 32 0.0
(read/write) 1486282 1486306 24 0.0
.flash.rodata 216008 216032 24 0.0
.flash.text 1021930 1021962 32 0.0
m5stack (read only) 1075691 1075711 20 0.0
(read/write) 488304 488328 24 0.0
.flash.rodata 246412 246436 24 0.0
.flash.text 1070307 1070327 20 0.0
k32w light k32w061+release (read/write) 660784 660800 16 0.0
.text 583324 583340 16 0.0
linux all-clusters-app debug (read only) 2981121 2981169 48 0.0
.rodata 265707 265739 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2327281 2327345 64 0.0
.rodata 199112 199144 32 0.0
.text 1966002 1966034 32 0.0
chip-tool debug (read only) 10350497 10362265 11768 0.1
(read/write) 631912 632872 960 0.2
.data.rel.ro 597480 598440 960 0.2
.rodata 521525 522069 544 0.1
.text 8375380 8384372 8992 0.1
chip-tool-ipv6only arm64 (read only) 9774108 9785100 10992 0.1
(read/write) 679441 680401 960 0.1
.data.rel.ro 624824 625776 952 0.2
.got 13552 13560 8 0.1
.rodata 457340 457884 544 0.1
.text 7732372 7740564 8192 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
shell debug (read only) 2567729 2567793 64 0.0
.rodata 229010 229042 32 0.0
.text 2181186 2181218 32 0.0
tv-app debug (read only) 3115497 3115513 16 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369113 5369129 16 0.0
.text 4768050 4768066 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176383 1176423 40 0.0
rodata 142200 142224 24 0.0
text 812248 812272 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156447 1156507 60 0.0
rodata 133744 133772 28 0.0
text 801564 801588 24 0.0
p6 all-clusters-app default (read/write) 1686428 1686468 40 0.0
.text 1526328 1526368 40 0.0
all-clusters-minimal-app default (read/write) 1630540 1630596 56 0.0
.text 1471160 1471216 56 0.0
light-app default (read/write) 1550780 1550844 64 0.0
.text 1399704 1399768 64 0.0
telink lighting-app tlsr9518adk80d (read/write) 818908 818960 52 0.0
text 583370 583398 28 0.0
Decreases (4 builds for cc13x2_26x2, telink)
platform target config section 83deb47 1c8081b change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 183016 183000 -16 -0.0
pump-app LP_CC2652R7 (read/write) 161796 161756 -40 -0.0
shell LP_CC2652R7 (read/write) 186036 186020 -16 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 798860 798852 -8 -0.0
text 566826 566824 -2 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 83deb47 1c8081b change % change
bl602 lighting-app bl602 (read/write) 1380794 1380850 56 0.0
.bss 117474 117474 0 0.0
.data 4480 4480 0 0.0
.text 1050932 1050956 24 0.0
bl602+rpc (read/write) 1426202 1426258 56 0.0
.bss 124922 124922 0 0.0
.data 4600 4600 0 0.0
.text 1082588 1082612 24 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668327 668343 16 0.0
(read/write) 183016 183000 -16 -0.0
.bss 74236 74236 0 0.0
.data 3356 3356 0 0.0
.rodata 88311 88311 0 0.0
.text 579700 579716 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633943 633959 16 0.0
(read/write) 157804 157804 0 0.0
.bss 73532 73532 0 0.0
.data 3356 3356 0 0.0
.rodata 77551 77551 0 0.0
.text 556068 556084 16 0.0
lock-ftd LP_CC2652R7 (read only) 671555 671555 0 0.0
(read/write) 169964 169964 0 0.0
.bss 71300 71300 0 0.0
.data 3280 3280 0 0.0
.rodata 76443 76443 0 0.0
.text 594632 594632 0 0.0
lock-mtd LP_CC2652R7 (read only) 653839 653839 0 0.0
(read/write) 183368 183368 0 0.0
.bss 66988 66988 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552176 552176 0 0.0
pump-app LP_CC2652R7 (read only) 680579 680619 40 0.0
(read/write) 161796 161756 -40 -0.0
.bss 71388 71388 0 0.0
.data 3280 3280 0 0.0
.rodata 88811 88835 24 0.0
.text 591284 591300 16 0.0
pump-controller-app LP_CC2652R7 (read only) 666355 666355 0 0.0
(read/write) 176140 176140 0 0.0
.bss 71508 71508 0 0.0
.data 3276 3276 0 0.0
.rodata 84667 84667 0 0.0
.text 581208 581208 0 0.0
shell LP_CC2652R7 (read only) 660810 660826 16 0.0
(read/write) 186036 186020 -16 -0.0
.bss 76540 76540 0 0.0
.data 3360 3360 0 0.0
.rodata 85090 85090 0 0.0
.text 575404 575420 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582050 582074 24 0.0
.app_xip_area 460440 460464 24 0.0
.bss 64404 64404 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587958 587966 8 0.0
.app_xip_area 461620 461628 8 0.0
.bss 69132 69132 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 585430 585430 0 0.0
.app_xip_area 464668 464668 0 0.0
.bss 63612 63612 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1086760 1086808 48 0.0
.bss 133220 133220 0 0.0
.data 2048 2048 0 0.0
.text 951472 951520 48 0.0
BRD4161A+rpc (read/write) 1141036 1141100 64 0.0
.bss 149892 149892 0 0.0
.data 2260 2260 0 0.0
.text 988860 988924 64 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.bss 161664 161664 0 0.0
.data 2048 2048 0 0.0
.text 808984 809032 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128224 1128224 0 0.0
.bss 144304 144304 0 0.0
.data 2056 2056 0 0.0
.text 981844 981844 0 0.0
window-app BRD4161A (read/write) 1080236 1080236 0 0.0
.bss 134692 134692 0 0.0
.data 2076 2076 0 0.0
.text 943448 943448 0 0.0
esp32 all-clusters-app c3devkit (read only) 1021930 1021962 32 0.0
(read/write) 1486282 1486306 24 0.0
.dram0.bss 70232 70232 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216008 216032 24 0.0
.flash.text 1021930 1021962 32 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075691 1075711 20 0.0
(read/write) 488304 488328 24 0.0
.dram0.bss 75752 75752 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246412 246436 24 0.0
.flash.text 1070307 1070327 20 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 660784 660800 16 0.0
.bss 69668 69668 0 0.0
.data 1992 1992 0 0.0
.text 583324 583340 16 0.0
lock k32w061+release (read/write) 687788 687788 0 0.0
.bss 70140 70140 0 0.0
.data 2004 2004 0 0.0
.text 609844 609844 0 0.0
linux all-clusters-app debug (read only) 2981121 2981169 48 0.0
(read/write) 155344 155344 0 0.0
.bss 61792 61792 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 265707 265739 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
(read/write) 147016 147016 0 0.0
.bss 60992 60992 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77784 77784 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2327281 2327345 64 0.0
(read/write) 125832 125832 0 0.0
.bss 49088 49088 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67160 67160 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 199112 199144 32 0.0
.text 1966002 1966034 32 0.0
chip-tool debug (read only) 10350497 10362265 11768 0.1
(read/write) 631912 632872 960 0.2
.bss 24760 24760 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 597480 598440 960 0.2
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 521525 522069 544 0.1
.text 8375380 8384372 8992 0.1
chip-tool-ipv6only arm64 (read only) 9774108 9785100 10992 0.1
(read/write) 679441 680401 960 0.1
.bss 32833 32833 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 624824 625776 952 0.2
.dynamic 560 560 0 0.0
.got 13552 13560 8 0.1
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 457340 457884 544 0.1
.text 7732372 7740564 8192 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
(read/write) 129888 129888 0 0.0
.bss 49632 49632 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
lock-app debug (read only) 2529921 2529921 0 0.0
(read/write) 124872 124872 0 0.0
.bss 48032 48032 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69272 69272 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 229936 229936 0 0.0
.text 2134386 2134386 0 0.0
ota-provider-app debug (read only) 2333505 2333505 0 0.0
(read/write) 118672 118672 0 0.0
.bss 47680 47680 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63256 63256 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 204728 204728 0 0.0
.text 1965570 1965570 0 0.0
ota-requestor-app debug (read only) 2451961 2451961 0 0.0
(read/write) 125576 125576 0 0.0
.bss 50016 50016 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67480 67480 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 208448 208448 0 0.0
.text 2071906 2071906 0 0.0
shell debug (read only) 2567729 2567793 64 0.0
(read/write) 141400 141400 0 0.0
.bss 57608 57608 0 0.0
.data 1248 1248 0 0.0
.data.rel.ro 76856 76856 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 229010 229042 32 0.0
.text 2181186 2181218 32 0.0
thermostat-no-ble arm64 (read only) 2341476 2341476 0 0.0
(read/write) 141265 141265 0 0.0
.bss 55233 55233 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75616 75616 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139420 139420 0 0.0
.text 1965248 1965248 0 0.0
tv-app debug (read only) 3115497 3115513 16 0.0
(read/write) 257024 257024 0 0.0
.bss 167064 167064 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78792 78792 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 250408 250408 0 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369113 5369129 16 0.0
(read/write) 158328 158328 0 0.0
.bss 51256 51256 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98352 98352 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 334561 334561 0 0.0
.text 4768050 4768066 16 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449032 2449032 0 0.0
.bss 214444 214444 0 0.0
.data 5872 5872 0 0.0
.text 1411676 1411676 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176383 1176423 40 0.0
bss 143068 143068 0 0.0
rodata 142200 142224 24 0.0
text 812248 812272 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156447 1156507 60 0.0
bss 142304 142304 0 0.0
rodata 133744 133772 28 0.0
text 801564 801588 24 0.0
p6 all-clusters-app default (read only) 881632 881632 0 0.0
(read/write) 1686428 1686468 40 0.0
.bss 149064 149064 0 0.0
.data 2648 2648 0 0.0
.text 1526328 1526368 40 0.0
all-clusters-minimal-app default (read only) 882352 882352 0 0.0
(read/write) 1630540 1630596 56 0.0
.bss 148344 148344 0 0.0
.data 2648 2648 0 0.0
.text 1471160 1471216 56 0.0
light-app default (read only) 890656 890656 0 0.0
(read/write) 1550780 1550844 64 0.0
.bss 140248 140248 0 0.0
.data 2440 2440 0 0.0
.text 1399704 1399768 64 0.0
lock-app default (read only) 886184 886184 0 0.0
(read/write) 1588372 1588372 0 0.0
.bss 144704 144704 0 0.0
.data 2456 2456 0 0.0
.text 1432824 1432824 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 798860 798852 -8 -0.0
bss 70744 70744 0 0.0
noinit 40416 40416 0 0.0
text 566826 566824 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 818908 818960 52 0.0
bss 71588 71588 0 0.0
noinit 40416 40416 0 0.0
text 583370 583398 28 0.0

@marius-alex-tache marius-alex-tache force-pushed the level-control/fix-off-action branch from 1c8081b to 88a4bdc Compare July 21, 2022 18:40
@github-actions
Copy link

github-actions bot commented Jul 21, 2022

PR #20788: Size comparison from b87244d to 88a4bdc

Increases (29 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section b87244d 88a4bdc change % change
bl602 lighting-app bl602 (read/write) 1380794 1380858 64 0.0
.text 1050932 1050960 28 0.0
bl602+rpc (read/write) 1426202 1426258 56 0.0
.text 1082588 1082612 24 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668327 668343 16 0.0
.text 579700 579716 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633943 633951 8 0.0
.text 556068 556076 8 0.0
pump-app LP_CC2652R7 (read only) 680579 680619 40 0.0
.rodata 88811 88835 24 0.0
.text 591284 591300 16 0.0
shell LP_CC2652R7 (read only) 660810 660818 8 0.0
.text 575404 575412 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582050 582074 24 0.0
.app_xip_area 460440 460464 24 0.0
efr32 lighting-app BRD4161A (read/write) 1086760 1086808 48 0.0
.text 951472 951520 48 0.0
BRD4161A+rpc (read/write) 1141036 1141100 64 0.0
.text 988860 988924 64 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.text 808984 809032 48 0.0
esp32 all-clusters-app c3devkit (read only) 1021928 1021960 32 0.0
(read/write) 1486282 1486306 24 0.0
.flash.rodata 216008 216032 24 0.0
.flash.text 1021928 1021960 32 0.0
m5stack (read only) 1075691 1075711 20 0.0
(read/write) 488304 488328 24 0.0
.flash.rodata 246412 246436 24 0.0
.flash.text 1070307 1070327 20 0.0
k32w light k32w061+release (read/write) 660784 660800 16 0.0
.text 583324 583340 16 0.0
linux all-clusters-app debug (read only) 2981121 2981169 48 0.0
.rodata 265707 265739 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2341705 2341753 48 0.0
.rodata 199208 199240 32 0.0
.text 1980210 1980226 16 0.0
chip-tool debug (read only) 10350497 10365033 14536 0.1
(read/write) 631912 632872 960 0.2
.data.rel.ro 597480 598440 960 0.2
.rodata 521525 522325 800 0.2
.text 8375380 8386884 11504 0.1
chip-tool-ipv6only arm64 (read only) 9774108 9787692 13584 0.1
(read/write) 679441 680401 960 0.1
.data.rel.ro 624824 625776 952 0.2
.got 13552 13560 8 0.1
.rodata 457340 458140 800 0.2
.text 7732372 7742900 10528 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
shell debug (read only) 2567729 2567793 64 0.0
.rodata 229010 229042 32 0.0
.text 2181186 2181218 32 0.0
tv-app debug (read only) 3115497 3115513 16 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369113 5369129 16 0.0
.text 4768050 4768066 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176383 1176423 40 0.0
rodata 142200 142224 24 0.0
text 812244 812272 28 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156447 1156507 60 0.0
rodata 133744 133772 28 0.0
text 801564 801588 24 0.0
p6 all-clusters-app default (read/write) 1686428 1686468 40 0.0
.text 1526328 1526368 40 0.0
all-clusters-minimal-app default (read/write) 1630540 1630596 56 0.0
.text 1471160 1471216 56 0.0
light-app default (read/write) 1550780 1550844 64 0.0
.text 1399704 1399768 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 798852 798860 8 0.0
text 566824 566826 2 0.0
lighting-app tlsr9518adk80d (read/write) 818900 818960 60 0.0
text 583368 583400 32 0.0
Decreases (3 builds for cc13x2_26x2)
platform target config section b87244d 88a4bdc change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 183016 183000 -16 -0.0
pump-app LP_CC2652R7 (read/write) 161796 161756 -40 -0.0
shell LP_CC2652R7 (read/write) 186036 186028 -8 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section b87244d 88a4bdc change % change
bl602 lighting-app bl602 (read/write) 1380794 1380858 64 0.0
.bss 117474 117474 0 0.0
.data 4480 4480 0 0.0
.text 1050932 1050960 28 0.0
bl602+rpc (read/write) 1426202 1426258 56 0.0
.bss 124922 124922 0 0.0
.data 4600 4600 0 0.0
.text 1082588 1082612 24 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668327 668343 16 0.0
(read/write) 183016 183000 -16 -0.0
.bss 74236 74236 0 0.0
.data 3356 3356 0 0.0
.rodata 88311 88311 0 0.0
.text 579700 579716 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633943 633951 8 0.0
(read/write) 157804 157804 0 0.0
.bss 73532 73532 0 0.0
.data 3356 3356 0 0.0
.rodata 77551 77551 0 0.0
.text 556068 556076 8 0.0
lock-ftd LP_CC2652R7 (read only) 671555 671555 0 0.0
(read/write) 169964 169964 0 0.0
.bss 71300 71300 0 0.0
.data 3280 3280 0 0.0
.rodata 76443 76443 0 0.0
.text 594632 594632 0 0.0
lock-mtd LP_CC2652R7 (read only) 653839 653839 0 0.0
(read/write) 183368 183368 0 0.0
.bss 66988 66988 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552176 552176 0 0.0
pump-app LP_CC2652R7 (read only) 680579 680619 40 0.0
(read/write) 161796 161756 -40 -0.0
.bss 71388 71388 0 0.0
.data 3280 3280 0 0.0
.rodata 88811 88835 24 0.0
.text 591284 591300 16 0.0
pump-controller-app LP_CC2652R7 (read only) 666355 666355 0 0.0
(read/write) 176140 176140 0 0.0
.bss 71508 71508 0 0.0
.data 3276 3276 0 0.0
.rodata 84667 84667 0 0.0
.text 581208 581208 0 0.0
shell LP_CC2652R7 (read only) 660810 660818 8 0.0
(read/write) 186036 186028 -8 -0.0
.bss 76540 76540 0 0.0
.data 3360 3360 0 0.0
.rodata 85090 85090 0 0.0
.text 575404 575412 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582050 582074 24 0.0
.app_xip_area 460440 460464 24 0.0
.bss 64404 64404 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587966 587966 0 0.0
.app_xip_area 461628 461628 0 0.0
.bss 69132 69132 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 585430 585430 0 0.0
.app_xip_area 464668 464668 0 0.0
.bss 63612 63612 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1086760 1086808 48 0.0
.bss 133220 133220 0 0.0
.data 2048 2048 0 0.0
.text 951472 951520 48 0.0
BRD4161A+rpc (read/write) 1141036 1141100 64 0.0
.bss 149892 149892 0 0.0
.data 2260 2260 0 0.0
.text 988860 988924 64 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.bss 161664 161664 0 0.0
.data 2048 2048 0 0.0
.text 808984 809032 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128224 1128224 0 0.0
.bss 144304 144304 0 0.0
.data 2056 2056 0 0.0
.text 981844 981844 0 0.0
window-app BRD4161A (read/write) 1080236 1080236 0 0.0
.bss 134692 134692 0 0.0
.data 2076 2076 0 0.0
.text 943448 943448 0 0.0
esp32 all-clusters-app c3devkit (read only) 1021928 1021960 32 0.0
(read/write) 1486282 1486306 24 0.0
.dram0.bss 70232 70232 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216008 216032 24 0.0
.flash.text 1021928 1021960 32 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075691 1075711 20 0.0
(read/write) 488304 488328 24 0.0
.dram0.bss 75752 75752 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246412 246436 24 0.0
.flash.text 1070307 1070327 20 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 660784 660800 16 0.0
.bss 69668 69668 0 0.0
.data 1992 1992 0 0.0
.text 583324 583340 16 0.0
lock k32w061+release (read/write) 687788 687788 0 0.0
.bss 70140 70140 0 0.0
.data 2004 2004 0 0.0
.text 609844 609844 0 0.0
linux all-clusters-app debug (read only) 2981121 2981169 48 0.0
(read/write) 155344 155344 0 0.0
.bss 61792 61792 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 265707 265739 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
(read/write) 147016 147016 0 0.0
.bss 60992 60992 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77784 77784 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2341705 2341753 48 0.0
(read/write) 126920 126920 0 0.0
.bss 50080 50080 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67240 67240 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 199208 199240 32 0.0
.text 1980210 1980226 16 0.0
chip-tool debug (read only) 10350497 10365033 14536 0.1
(read/write) 631912 632872 960 0.2
.bss 24760 24760 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 597480 598440 960 0.2
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 521525 522325 800 0.2
.text 8375380 8386884 11504 0.1
chip-tool-ipv6only arm64 (read only) 9774108 9787692 13584 0.1
(read/write) 679441 680401 960 0.1
.bss 32833 32833 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 624824 625776 952 0.2
.dynamic 560 560 0 0.0
.got 13552 13560 8 0.1
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 457340 458140 800 0.2
.text 7732372 7742900 10528 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
(read/write) 129888 129888 0 0.0
.bss 49632 49632 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
lock-app debug (read only) 2529921 2529921 0 0.0
(read/write) 124872 124872 0 0.0
.bss 48032 48032 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69272 69272 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 229936 229936 0 0.0
.text 2134386 2134386 0 0.0
ota-provider-app debug (read only) 2333505 2333505 0 0.0
(read/write) 118672 118672 0 0.0
.bss 47680 47680 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63256 63256 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 204728 204728 0 0.0
.text 1965570 1965570 0 0.0
ota-requestor-app debug (read only) 2451961 2451961 0 0.0
(read/write) 125576 125576 0 0.0
.bss 50016 50016 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67480 67480 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 208448 208448 0 0.0
.text 2071906 2071906 0 0.0
shell debug (read only) 2567729 2567793 64 0.0
(read/write) 141400 141400 0 0.0
.bss 57608 57608 0 0.0
.data 1248 1248 0 0.0
.data.rel.ro 76856 76856 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 229010 229042 32 0.0
.text 2181186 2181218 32 0.0
thermostat-no-ble arm64 (read only) 2341476 2341476 0 0.0
(read/write) 141265 141265 0 0.0
.bss 55233 55233 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75616 75616 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139420 139420 0 0.0
.text 1965248 1965248 0 0.0
tv-app debug (read only) 3115497 3115513 16 0.0
(read/write) 257024 257024 0 0.0
.bss 167064 167064 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78792 78792 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 250408 250408 0 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369113 5369129 16 0.0
(read/write) 158328 158328 0 0.0
.bss 51256 51256 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98352 98352 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 334561 334561 0 0.0
.text 4768050 4768066 16 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449032 2449032 0 0.0
.bss 214444 214444 0 0.0
.data 5872 5872 0 0.0
.text 1411676 1411676 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176383 1176423 40 0.0
bss 143068 143068 0 0.0
rodata 142200 142224 24 0.0
text 812244 812272 28 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156447 1156507 60 0.0
bss 142304 142304 0 0.0
rodata 133744 133772 28 0.0
text 801564 801588 24 0.0
p6 all-clusters-app default (read only) 881632 881632 0 0.0
(read/write) 1686428 1686468 40 0.0
.bss 149064 149064 0 0.0
.data 2648 2648 0 0.0
.text 1526328 1526368 40 0.0
all-clusters-minimal-app default (read only) 882352 882352 0 0.0
(read/write) 1630540 1630596 56 0.0
.bss 148344 148344 0 0.0
.data 2648 2648 0 0.0
.text 1471160 1471216 56 0.0
light-app default (read only) 890656 890656 0 0.0
(read/write) 1550780 1550844 64 0.0
.bss 140248 140248 0 0.0
.data 2440 2440 0 0.0
.text 1399704 1399768 64 0.0
lock-app default (read only) 886184 886184 0 0.0
(read/write) 1588372 1588372 0 0.0
.bss 144704 144704 0 0.0
.data 2456 2456 0 0.0
.text 1432824 1432824 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 798852 798860 8 0.0
bss 70744 70744 0 0.0
noinit 40416 40416 0 0.0
text 566824 566826 2 0.0
lighting-app tlsr9518adk80d (read/write) 818900 818960 60 0.0
bss 71588 71588 0 0.0
noinit 40416 40416 0 0.0
text 583368 583400 32 0.0

Copy link
Member

@jmartinez-silabs jmartinez-silabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You caught a bug indeed and your fix might work but I think the real issue and easy fix is the following.

The last parameter of this call in emberAfOnOffClusterLevelControlEffectCallback should not be temporaryCurrentLevelCache

moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF,
                           0xFF, temporaryCurrentLevelCache);

This only work when onLevel is Null
resolvedLevel.Value() should be used ( it is set to temporaryCurrentLevelCache if onLevel is null else it is the read value of onLevel).

moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF,
                           0xFF, resolvedLevel.Value() );

With this, nothing else has to change and emberAfLevelControlClusterServerTickCallback will set back the level to the right stored level.

@bzbarsky-apple bzbarsky-apple dismissed their stale review July 21, 2022 21:06

Test has been added.

@marius-alex-tache
Copy link
Contributor Author

marius-alex-tache commented Jul 22, 2022

@jmartinez-silabs Thank you for your answer! The actual issue is that the current level should not be restored if OnLevel is defined and not null. When receiving an On command, the current level is correctly updated. But when receiving an Off command, the current level is always restored, instead of being set to minimum level if OnLevel is defined. So, even with your suggestion, the check state->storedLevel != INVALID_STORED_LEVEL will always be true, so the current level will always be restored.

Furthermore, I don't think moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, 0xFF, resolvedLevel.Value() ); would be correct. If OnLevel is defined and not null and if an Off command is received, the current level should be set to minimum level, not to the value of OnLevel attribute, which would be the case in the above code.

@marius-alex-tache marius-alex-tache force-pushed the level-control/fix-off-action branch from 88a4bdc to 34d0436 Compare July 22, 2022 08:20
@github-actions
Copy link

github-actions bot commented Jul 22, 2022

PR #20788: Size comparison from 8548f96 to 34d0436

Increases (26 builds for bl602, cc13x2_26x2, cyw30739, efr32, k32w, linux, nrfconnect, p6, telink)
platform target config section 8548f96 34d0436 change % change
bl602 lighting-app bl602 (read/write) 1380794 1380858 64 0.0
.text 1050932 1050960 28 0.0
bl602+rpc (read/write) 1426202 1426266 64 0.0
.text 1082588 1082616 28 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668383 668399 16 0.0
.text 579740 579756 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633983 633999 16 0.0
.text 556108 556124 16 0.0
pump-app LP_CC2652R7 (read only) 681087 681127 40 0.0
.rodata 89039 89063 24 0.0
.text 591564 591580 16 0.0
shell LP_CC2652R7 (read only) 660858 660874 16 0.0
.text 575444 575460 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582082 582106 24 0.0
.app_xip_area 460472 460496 24 0.0
efr32 lighting-app BRD4161A (read/write) 1087488 1087552 64 0.0
.text 952200 952264 64 0.0
BRD4161A+rpc (read/write) 1141780 1141828 48 0.0
.text 989604 989652 48 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.text 808984 809032 48 0.0
k32w light k32w061+release (read/write) 660816 660832 16 0.0
.text 583356 583372 16 0.0
linux all-clusters-app debug (read only) 2981177 2981225 48 0.0
.rodata 265739 265771 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2341777 2341841 64 0.0
.rodata 199240 199272 32 0.0
.text 1980226 1980258 32 0.0
chip-tool debug (read only) 10349249 10363801 14552 0.1
(read/write) 631912 632872 960 0.2
.data.rel.ro 597480 598440 960 0.2
.rodata 521813 522613 800 0.2
.text 8373844 8385364 11520 0.1
chip-tool-ipv6only arm64 (read only) 9778876 9792476 13600 0.1
(read/write) 679441 680401 960 0.1
.data.rel.ro 624824 625776 952 0.2
.got 13552 13560 8 0.1
.rodata 457580 458380 800 0.2
.text 7736900 7747444 10544 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
shell debug (read only) 2567785 2567849 64 0.0
.rodata 229042 229074 32 0.0
.text 2181186 2181218 32 0.0
tv-app debug (read only) 3115553 3115569 16 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369265 5369281 16 0.0
.text 4768114 4768130 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176927 1176967 40 0.0
rodata 142440 142464 24 0.0
text 812548 812572 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156979 1157023 44 0.0
rodata 133972 134000 28 0.0
text 801864 801888 24 0.0
p6 all-clusters-app default (read/write) 1686436 1686484 48 0.0
.text 1526336 1526384 48 0.0
all-clusters-minimal-app default (read/write) 1630540 1630596 56 0.0
.text 1471160 1471216 56 0.0
light-app default (read/write) 1550780 1550844 64 0.0
.text 1399704 1399768 64 0.0
telink lighting-app tlsr9518adk80d (read/write) 819516 819576 60 0.0
text 583732 583762 30 0.0
Decreases (4 builds for cc13x2_26x2, telink)
platform target config section 8548f96 34d0436 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182960 182944 -16 -0.0
pump-app LP_CC2652R7 (read/write) 161288 161248 -40 -0.0
shell LP_CC2652R7 (read/write) 185988 185972 -16 -0.0
telink light-switch-app tlsr9518adk80d text 567188 567186 -2 -0.0
Full report (41 builds for bl602, cc13x2_26x2, cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 8548f96 34d0436 change % change
bl602 lighting-app bl602 (read/write) 1380794 1380858 64 0.0
.bss 117474 117474 0 0.0
.data 4480 4480 0 0.0
.text 1050932 1050960 28 0.0
bl602+rpc (read/write) 1426202 1426266 64 0.0
.bss 124922 124922 0 0.0
.data 4600 4600 0 0.0
.text 1082588 1082616 28 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668383 668399 16 0.0
(read/write) 182960 182944 -16 -0.0
.bss 74236 74236 0 0.0
.data 3356 3356 0 0.0
.rodata 88327 88327 0 0.0
.text 579740 579756 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633983 633999 16 0.0
(read/write) 157804 157804 0 0.0
.bss 73532 73532 0 0.0
.data 3356 3356 0 0.0
.rodata 77551 77551 0 0.0
.text 556108 556124 16 0.0
lock-ftd LP_CC2652R7 (read only) 671587 671587 0 0.0
(read/write) 169932 169932 0 0.0
.bss 71300 71300 0 0.0
.data 3280 3280 0 0.0
.rodata 76443 76443 0 0.0
.text 594664 594664 0 0.0
lock-mtd LP_CC2652R7 (read only) 653871 653871 0 0.0
(read/write) 183336 183336 0 0.0
.bss 66988 66988 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552208 552208 0 0.0
pump-app LP_CC2652R7 (read only) 681087 681127 40 0.0
(read/write) 161288 161248 -40 -0.0
.bss 71388 71388 0 0.0
.data 3280 3280 0 0.0
.rodata 89039 89063 24 0.0
.text 591564 591580 16 0.0
pump-controller-app LP_CC2652R7 (read only) 666863 666863 0 0.0
(read/write) 175632 175632 0 0.0
.bss 71508 71508 0 0.0
.data 3276 3276 0 0.0
.rodata 84895 84895 0 0.0
.text 581488 581488 0 0.0
shell LP_CC2652R7 (read only) 660858 660874 16 0.0
(read/write) 185988 185972 -16 -0.0
.bss 76540 76540 0 0.0
.data 3360 3360 0 0.0
.rodata 85098 85098 0 0.0
.text 575444 575460 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582082 582106 24 0.0
.app_xip_area 460472 460496 24 0.0
.bss 64404 64404 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587998 587998 0 0.0
.app_xip_area 461660 461660 0 0.0
.bss 69132 69132 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 586286 586286 0 0.0
.app_xip_area 465524 465524 0 0.0
.bss 63612 63612 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1087488 1087552 64 0.0
.bss 133220 133220 0 0.0
.data 2048 2048 0 0.0
.text 952200 952264 64 0.0
BRD4161A+rpc (read/write) 1141780 1141828 48 0.0
.bss 149892 149892 0 0.0
.data 2260 2260 0 0.0
.text 989604 989652 48 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.bss 161664 161664 0 0.0
.data 2048 2048 0 0.0
.text 808984 809032 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128224 1128224 0 0.0
.bss 144304 144304 0 0.0
.data 2056 2056 0 0.0
.text 981844 981844 0 0.0
window-app BRD4161A (read/write) 1080980 1080980 0 0.0
.bss 134692 134692 0 0.0
.data 2076 2076 0 0.0
.text 944192 944192 0 0.0
k32w light k32w061+release (read/write) 660816 660832 16 0.0
.bss 69668 69668 0 0.0
.data 1992 1992 0 0.0
.text 583356 583372 16 0.0
lock k32w061+release (read/write) 687820 687820 0 0.0
.bss 70140 70140 0 0.0
.data 2004 2004 0 0.0
.text 609876 609876 0 0.0
linux all-clusters-app debug (read only) 2981177 2981225 48 0.0
(read/write) 155344 155344 0 0.0
.bss 61792 61792 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 265739 265771 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
(read/write) 147016 147016 0 0.0
.bss 60992 60992 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77784 77784 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2341777 2341841 64 0.0
(read/write) 126920 126920 0 0.0
.bss 50080 50080 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67240 67240 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 199240 199272 32 0.0
.text 1980226 1980258 32 0.0
chip-tool debug (read only) 10349249 10363801 14552 0.1
(read/write) 631912 632872 960 0.2
.bss 24760 24760 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 597480 598440 960 0.2
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 521813 522613 800 0.2
.text 8373844 8385364 11520 0.1
chip-tool-ipv6only arm64 (read only) 9778876 9792476 13600 0.1
(read/write) 679441 680401 960 0.1
.bss 32833 32833 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 624824 625776 952 0.2
.dynamic 560 560 0 0.0
.got 13552 13560 8 0.1
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 457580 458380 800 0.2
.text 7736900 7747444 10544 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
(read/write) 129888 129888 0 0.0
.bss 49632 49632 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
lock-app debug (read only) 2529921 2529921 0 0.0
(read/write) 124872 124872 0 0.0
.bss 48032 48032 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69272 69272 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 229936 229936 0 0.0
.text 2134386 2134386 0 0.0
ota-provider-app debug (read only) 2333505 2333505 0 0.0
(read/write) 118672 118672 0 0.0
.bss 47680 47680 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63256 63256 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 204728 204728 0 0.0
.text 1965570 1965570 0 0.0
ota-requestor-app debug (read only) 2451961 2451961 0 0.0
(read/write) 125576 125576 0 0.0
.bss 50016 50016 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67480 67480 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 208448 208448 0 0.0
.text 2071906 2071906 0 0.0
shell debug (read only) 2567785 2567849 64 0.0
(read/write) 141400 141400 0 0.0
.bss 57608 57608 0 0.0
.data 1248 1248 0 0.0
.data.rel.ro 76856 76856 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 229042 229074 32 0.0
.text 2181186 2181218 32 0.0
thermostat-no-ble arm64 (read only) 2341532 2341532 0 0.0
(read/write) 141265 141265 0 0.0
.bss 55233 55233 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75616 75616 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139444 139444 0 0.0
.text 1965248 1965248 0 0.0
tv-app debug (read only) 3115553 3115569 16 0.0
(read/write) 257024 257024 0 0.0
.bss 167064 167064 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78792 78792 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 250440 250440 0 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369265 5369281 16 0.0
(read/write) 158328 158328 0 0.0
.bss 51256 51256 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98352 98352 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 334625 334625 0 0.0
.text 4768114 4768130 16 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449032 2449032 0 0.0
.bss 214444 214444 0 0.0
.data 5872 5872 0 0.0
.text 1411676 1411676 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176927 1176967 40 0.0
bss 143068 143068 0 0.0
rodata 142440 142464 24 0.0
text 812548 812572 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156979 1157023 44 0.0
bss 142304 142304 0 0.0
rodata 133972 134000 28 0.0
text 801864 801888 24 0.0
p6 all-clusters-app default (read only) 881632 881632 0 0.0
(read/write) 1686436 1686484 48 0.0
.bss 149064 149064 0 0.0
.data 2648 2648 0 0.0
.text 1526336 1526384 48 0.0
all-clusters-minimal-app default (read only) 882352 882352 0 0.0
(read/write) 1630540 1630596 56 0.0
.bss 148344 148344 0 0.0
.data 2648 2648 0 0.0
.text 1471160 1471216 56 0.0
light-app default (read only) 890656 890656 0 0.0
(read/write) 1550780 1550844 64 0.0
.bss 140248 140248 0 0.0
.data 2440 2440 0 0.0
.text 1399704 1399768 64 0.0
lock-app default (read only) 886184 886184 0 0.0
(read/write) 1588372 1588372 0 0.0
.bss 144704 144704 0 0.0
.data 2456 2456 0 0.0
.text 1432824 1432824 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799468 799468 0 0.0
bss 70744 70744 0 0.0
noinit 40416 40416 0 0.0
text 567188 567186 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 819516 819576 60 0.0
bss 71588 71588 0 0.0
noinit 40416 40416 0 0.0
text 583732 583762 30 0.0

@marius-alex-tache marius-alex-tache force-pushed the level-control/fix-off-action branch from 34d0436 to e86ce2f Compare July 22, 2022 09:53
@github-actions
Copy link

github-actions bot commented Jul 22, 2022

PR #20788: Size comparison from c3e71f2 to e86ce2f

Increases (29 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section c3e71f2 e86ce2f change % change
bl602 lighting-app bl602 (read/write) 1380794 1380850 56 0.0
.text 1050932 1050956 24 0.0
bl602+rpc (read/write) 1426202 1426266 64 0.0
.text 1082588 1082616 28 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668383 668399 16 0.0
.text 579740 579756 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633983 633991 8 0.0
.text 556108 556116 8 0.0
pump-app LP_CC2652R7 (read only) 681087 681127 40 0.0
.rodata 89039 89063 24 0.0
.text 591564 591580 16 0.0
shell LP_CC2652R7 (read only) 660850 660866 16 0.0
.text 575436 575452 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582082 582106 24 0.0
.app_xip_area 460472 460496 24 0.0
lock cyw930739m2evb_01 (read/write) 587990 587998 8 0.0
.app_xip_area 461652 461660 8 0.0
efr32 lighting-app BRD4161A (read/write) 1087488 1087552 64 0.0
.text 952200 952264 64 0.0
BRD4161A+rpc (read/write) 1141780 1141828 48 0.0
.text 989604 989652 48 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.text 808984 809032 48 0.0
esp32 all-clusters-app c3devkit (read only) 1021930 1021962 32 0.0
(read/write) 1486290 1486314 24 0.0
.flash.rodata 216016 216040 24 0.0
.flash.text 1021930 1021962 32 0.0
m5stack (read only) 1075691 1075711 20 0.0
(read/write) 488312 488336 24 0.0
.flash.rodata 246420 246444 24 0.0
.flash.text 1070307 1070327 20 0.0
k32w light k32w061+release (read/write) 660816 660832 16 0.0
.text 583356 583372 16 0.0
linux all-clusters-app debug (read only) 2981177 2981225 48 0.0
.rodata 265739 265771 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2341777 2341841 64 0.0
.rodata 199240 199272 32 0.0
.text 1980226 1980258 32 0.0
chip-tool debug (read only) 10349249 10364361 15112 0.1
(read/write) 631912 632872 960 0.2
.data.rel.ro 597480 598440 960 0.2
.rodata 521813 522645 832 0.2
.text 8373844 8385892 12048 0.1
chip-tool-ipv6only arm64 (read only) 9778876 9793004 14128 0.1
(read/write) 679441 680401 960 0.1
.data.rel.ro 624824 625776 952 0.2
.got 13552 13560 8 0.1
.rodata 457580 458412 832 0.2
.text 7736900 7747940 11040 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
shell debug (read only) 2567785 2567849 64 0.0
.rodata 229042 229074 32 0.0
.text 2181186 2181218 32 0.0
tv-app debug (read only) 3115553 3115569 16 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369265 5369281 16 0.0
.text 4768114 4768130 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176911 1176967 56 0.0
rodata 142440 142464 24 0.0
text 812544 812572 28 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156979 1157023 44 0.0
rodata 133972 134000 28 0.0
text 801864 801888 24 0.0
p6 all-clusters-app default (read/write) 1686436 1686484 48 0.0
.text 1526336 1526384 48 0.0
all-clusters-minimal-app default (read/write) 1630540 1630596 56 0.0
.text 1471160 1471216 56 0.0
light-app default (read/write) 1550780 1550844 64 0.0
.text 1399704 1399768 64 0.0
telink lighting-app tlsr9518adk80d (read/write) 819516 819576 60 0.0
text 583730 583762 32 0.0
Decreases (3 builds for cc13x2_26x2)
platform target config section c3e71f2 e86ce2f change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182960 182944 -16 -0.0
pump-app LP_CC2652R7 (read/write) 161288 161248 -40 -0.0
shell LP_CC2652R7 (read/write) 185996 185980 -16 -0.0
Full report (42 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section c3e71f2 e86ce2f change % change
bl602 lighting-app bl602 (read/write) 1380794 1380850 56 0.0
.bss 117474 117474 0 0.0
.data 4480 4480 0 0.0
.text 1050932 1050956 24 0.0
bl602+rpc (read/write) 1426202 1426266 64 0.0
.bss 124922 124922 0 0.0
.data 4600 4600 0 0.0
.text 1082588 1082616 28 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668383 668399 16 0.0
(read/write) 182960 182944 -16 -0.0
.bss 74236 74236 0 0.0
.data 3356 3356 0 0.0
.rodata 88327 88327 0 0.0
.text 579740 579756 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633983 633991 8 0.0
(read/write) 157804 157804 0 0.0
.bss 73532 73532 0 0.0
.data 3356 3356 0 0.0
.rodata 77551 77551 0 0.0
.text 556108 556116 8 0.0
lock-ftd LP_CC2652R7 (read only) 671587 671587 0 0.0
(read/write) 169932 169932 0 0.0
.bss 71300 71300 0 0.0
.data 3280 3280 0 0.0
.rodata 76443 76443 0 0.0
.text 594664 594664 0 0.0
lock-mtd LP_CC2652R7 (read only) 653871 653871 0 0.0
(read/write) 183336 183336 0 0.0
.bss 66988 66988 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552208 552208 0 0.0
pump-app LP_CC2652R7 (read only) 681087 681127 40 0.0
(read/write) 161288 161248 -40 -0.0
.bss 71388 71388 0 0.0
.data 3280 3280 0 0.0
.rodata 89039 89063 24 0.0
.text 591564 591580 16 0.0
pump-controller-app LP_CC2652R7 (read only) 666863 666863 0 0.0
(read/write) 175632 175632 0 0.0
.bss 71508 71508 0 0.0
.data 3276 3276 0 0.0
.rodata 84895 84895 0 0.0
.text 581488 581488 0 0.0
shell LP_CC2652R7 (read only) 660850 660866 16 0.0
(read/write) 185996 185980 -16 -0.0
.bss 76540 76540 0 0.0
.data 3360 3360 0 0.0
.rodata 85098 85098 0 0.0
.text 575436 575452 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582082 582106 24 0.0
.app_xip_area 460472 460496 24 0.0
.bss 64404 64404 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587990 587998 8 0.0
.app_xip_area 461652 461660 8 0.0
.bss 69132 69132 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 586286 586286 0 0.0
.app_xip_area 465524 465524 0 0.0
.bss 63612 63612 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1087488 1087552 64 0.0
.bss 133220 133220 0 0.0
.data 2048 2048 0 0.0
.text 952200 952264 64 0.0
BRD4161A+rpc (read/write) 1141780 1141828 48 0.0
.bss 149892 149892 0 0.0
.data 2260 2260 0 0.0
.text 989604 989652 48 0.0
BRD4161A+rs911x (read/write) 972716 972764 48 0.0
.bss 161664 161664 0 0.0
.data 2048 2048 0 0.0
.text 808984 809032 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128224 1128224 0 0.0
.bss 144304 144304 0 0.0
.data 2056 2056 0 0.0
.text 981844 981844 0 0.0
window-app BRD4161A (read/write) 1080980 1080980 0 0.0
.bss 134692 134692 0 0.0
.data 2076 2076 0 0.0
.text 944192 944192 0 0.0
esp32 all-clusters-app c3devkit (read only) 1021930 1021962 32 0.0
(read/write) 1486290 1486314 24 0.0
.dram0.bss 70232 70232 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216016 216040 24 0.0
.flash.text 1021930 1021962 32 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075691 1075711 20 0.0
(read/write) 488312 488336 24 0.0
.dram0.bss 75752 75752 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246420 246444 24 0.0
.flash.text 1070307 1070327 20 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 660816 660832 16 0.0
.bss 69668 69668 0 0.0
.data 1992 1992 0 0.0
.text 583356 583372 16 0.0
lock k32w061+release (read/write) 687820 687820 0 0.0
.bss 70140 70140 0 0.0
.data 2004 2004 0 0.0
.text 609876 609876 0 0.0
linux all-clusters-app debug (read only) 2981177 2981225 48 0.0
(read/write) 155344 155344 0 0.0
.bss 61792 61792 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 265739 265771 32 0.0
.text 2537298 2537314 16 0.0
all-clusters-minimal-app debug (read only) 2827073 2827121 48 0.0
(read/write) 147016 147016 0 0.0
.bss 60992 60992 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77784 77784 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 266603 266635 32 0.0
.text 2385010 2385026 16 0.0
bridge-app debug+rpc (read only) 2341777 2341841 64 0.0
(read/write) 126920 126920 0 0.0
.bss 50080 50080 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67240 67240 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 199240 199272 32 0.0
.text 1980226 1980258 32 0.0
chip-tool debug (read only) 10349249 10364361 15112 0.1
(read/write) 631912 632872 960 0.2
.bss 24760 24760 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 597480 598440 960 0.2
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 521813 522645 832 0.2
.text 8373844 8385892 12048 0.1
chip-tool-ipv6only arm64 (read only) 9778876 9793004 14128 0.1
(read/write) 679441 680401 960 0.1
.bss 32833 32833 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 624824 625776 952 0.2
.dynamic 560 560 0 0.0
.got 13552 13560 8 0.1
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 457580 458412 832 0.2
.text 7736900 7747940 11040 0.1
lighting-app debug+rpc (read only) 2564897 2564961 64 0.0
(read/write) 129888 129888 0 0.0
.bss 49632 49632 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 214896 214928 32 0.0
.text 2179602 2179634 32 0.0
lock-app debug (read only) 2529921 2529921 0 0.0
(read/write) 124872 124872 0 0.0
.bss 48032 48032 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69272 69272 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 229936 229936 0 0.0
.text 2134386 2134386 0 0.0
ota-provider-app debug (read only) 2333505 2333505 0 0.0
(read/write) 118672 118672 0 0.0
.bss 47680 47680 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63256 63256 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 204728 204728 0 0.0
.text 1965570 1965570 0 0.0
ota-requestor-app debug (read only) 2451961 2451961 0 0.0
(read/write) 125576 125576 0 0.0
.bss 50016 50016 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67480 67480 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 208448 208448 0 0.0
.text 2071906 2071906 0 0.0
shell debug (read only) 2567785 2567849 64 0.0
(read/write) 141400 141400 0 0.0
.bss 57608 57608 0 0.0
.data 1248 1248 0 0.0
.data.rel.ro 76856 76856 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 229042 229074 32 0.0
.text 2181186 2181218 32 0.0
thermostat-no-ble arm64 (read only) 2341532 2341532 0 0.0
(read/write) 141265 141265 0 0.0
.bss 55233 55233 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75616 75616 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139444 139444 0 0.0
.text 1965248 1965248 0 0.0
tv-app debug (read only) 3115553 3115569 16 0.0
(read/write) 257024 257024 0 0.0
.bss 167064 167064 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78792 78792 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 250440 250440 0 0.0
.text 2676690 2676706 16 0.0
tv-casting-app debug (read only) 5369265 5369281 16 0.0
(read/write) 158328 158328 0 0.0
.bss 51256 51256 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98352 98352 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 334625 334625 0 0.0
.text 4768114 4768130 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176911 1176967 56 0.0
bss 143068 143068 0 0.0
rodata 142440 142464 24 0.0
text 812544 812572 28 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156979 1157023 44 0.0
bss 142304 142304 0 0.0
rodata 133972 134000 28 0.0
text 801864 801888 24 0.0
p6 all-clusters-app default (read only) 881632 881632 0 0.0
(read/write) 1686436 1686484 48 0.0
.bss 149064 149064 0 0.0
.data 2648 2648 0 0.0
.text 1526336 1526384 48 0.0
all-clusters-minimal-app default (read only) 882352 882352 0 0.0
(read/write) 1630540 1630596 56 0.0
.bss 148344 148344 0 0.0
.data 2648 2648 0 0.0
.text 1471160 1471216 56 0.0
light-app default (read only) 890656 890656 0 0.0
(read/write) 1550780 1550844 64 0.0
.bss 140248 140248 0 0.0
.data 2440 2440 0 0.0
.text 1399704 1399768 64 0.0
lock-app default (read only) 886184 886184 0 0.0
(read/write) 1588372 1588372 0 0.0
.bss 144704 144704 0 0.0
.data 2456 2456 0 0.0
.text 1432824 1432824 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799460 799460 0 0.0
bss 70744 70744 0 0.0
noinit 40416 40416 0 0.0
text 567184 567184 0 0.0
lighting-app tlsr9518adk80d (read/write) 819516 819576 60 0.0
bss 71588 71588 0 0.0
noinit 40416 40416 0 0.0
text 583730 583762 32 0.0

@jmartinez-silabs
Copy link
Member

jmartinez-silabs commented Jul 22, 2022

marius-alex-tache Ok based on your last comment I re-read that portion of the spec. And I understand now. If on level is configured and not null it should stay at the minimal level after an off command.

So wouldn't using INVALID_STORED_LEVEL as the last parameter of the moveToLevelHandler as in other places do exactly that?

@marius-alex-tache
Copy link
Contributor Author

You are correct, but only in the case where OnLevel is configured and not null. From my understanding, if OnLevel is not defined or is null, the effect

Change CurrentLevel to the minimum level allowed for the device over the time
period OnOffTransitionTime

should still happen. After reaching minimum level, the actual check of OnLevel should decide whether or not the current level will be restored.

@jmartinez-silabs
Copy link
Member

marius-alex-tache Yeah i understand. I meant that in the case where the action is turn off (newValue==false) we could either pass INVALID_STORED_LEVEL or temporaryCurrentLevelCache in the emberAfOnOffClusterLevelControlEffectCallback function. But either way, Your current fix work also so I approved

@marius-alex-tache
Copy link
Contributor Author

marius-alex-tache commented Jul 22, 2022

@jmartinez-silabs Sorry, I misunderstood. I think your solution is more elegant, because there is no need to use the useOnLevel field, which previously was always set to false, so it had no effect. I think this field can be removed from the EmberAfLevelControlState struct. What I fail to grasp is the following code in emberAfLevelControlClusterServerTickCallback:

if (state->commandId == Commands::MoveToLevelWithOnOff::Id || state->commandId == Commands::MoveWithOnOff::Id ||
            state->commandId == Commands::StepWithOnOff::Id)
        {
            setOnOffValue(endpoint, (currentLevel != state->minLevel)); <-------- this is according to the spec
            if (currentLevel == state->minLevel && state->useOnLevel)   <-------- this check seems deprecated
            {
                status = Attributes::CurrentLevel::Set(endpoint, state->onLevel);
                if (status != EMBER_ZCL_STATUS_SUCCESS)
                {
                    emberAfLevelControlClusterPrintln("ERR: writing current level %x", status);
                }
                else
                {
                    updateCoupledColorTemp(endpoint);
                }
            }
        }

This really looks like some deprecated functionality, especially since useOnLevel was never set to true. I couldn't find anything related to this particular scenario in the specification.

@jmartinez-silabs
Copy link
Member

marius-alex-tache I think you are right. state->useOnLevel can be removed.

@bzbarsky-apple
Copy link
Contributor

@marius-alex-tache Please apply 6486a1f to fix the restyled and ZAP failures?

@marius-alex-tache marius-alex-tache force-pushed the level-control/fix-off-action branch from e86ce2f to 3e3c0de Compare July 23, 2022 17:38
According to the Application Clusters specification, when Level Control
cluster is used in association with the On/Off cluster, the action on
receipt for an Off command should be to change the current level to:
    * the minimum level allowed for the device, if OnLevel is defined.
    * the stored level, if OnLevel is not defined.

In the current implementation, when receiving an Off command, the
currentLevel attribute is always restored to the stored value.

Signed-off-by: Marius Tache <[email protected]>

Restyled by clang-format
@marius-alex-tache marius-alex-tache force-pushed the level-control/fix-off-action branch from 3e3c0de to 400ebfd Compare July 23, 2022 17:41
@github-actions
Copy link

github-actions bot commented Jul 23, 2022

PR #20788: Size comparison from b647dfb to 400ebfd

Increases (8 builds for cc13x2_26x2, esp32, linux, nrfconnect, telink)
platform target config section b647dfb 400ebfd change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182864 182880 16 0.0
pump-app LP_CC2652R7 (read only) 681271 681295 24 0.0
.rodata 89183 89207 24 0.0
esp32 all-clusters-app c3devkit (read/write) 1486522 1486554 32 0.0
.flash.rodata 216248 216280 32 0.0
m5stack (read only) 1075795 1075799 4 0.0
(read/write) 488528 488552 24 0.0
.flash.rodata 246636 246660 24 0.0
.flash.text 1070411 1070415 4 0.0
linux chip-tool-ipv6only arm64 (read only) 9779324 9793452 14128 0.1
(read/write) 679441 680401 960 0.1
.data.rel.ro 624824 625776 952 0.2
.got 13552 13560 8 0.1
.rodata 457724 458556 832 0.2
.text 7737204 7748244 11040 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177235 1177259 24 0.0
rodata 142652 142676 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157287 1157311 24 0.0
rodata 134184 134208 24 0.0
telink lighting-app tlsr9518adk80d (read/write) 819668 819696 28 0.0
Decreases (10 builds for bl602, cc13x2_26x2, efr32, esp32, nrfconnect, p6)
platform target config section b647dfb 400ebfd change % change
bl602 lighting-app bl602 (read/write) 1380794 1380786 -8 -0.0
.text 1050944 1050916 -28 -0.0
bl602+rpc (read/write) 1426202 1426194 -8 -0.0
.text 1082600 1082568 -32 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668479 668463 -16 -0.0
.text 579796 579780 -16 -0.0
pump-app LP_CC2652R7 (read/write) 161104 161080 -24 -0.0
efr32 lighting-app BRD4161A (read/write) 1087680 1087672 -8 -0.0
.text 952392 952384 -8 -0.0
BRD4161A+rpc (read/write) 1141972 1141964 -8 -0.0
.text 989796 989788 -8 -0.0
BRD4161A+rs911x (read/write) 952180 952172 -8 -0.0
.text 809184 809176 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1022020 1022012 -8 -0.0
.flash.text 1022020 1022012 -8 -0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 801968 801964 -4 -0.0
p6 all-clusters-minimal-app default (read/write) 1630884 1630876 -8 -0.0
.text 1471504 1471496 -8 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section b647dfb 400ebfd change % change
bl602 lighting-app bl602 (read/write) 1380794 1380786 -8 -0.0
.bss 117474 117474 0 0.0
.data 4480 4480 0 0.0
.text 1050944 1050916 -28 -0.0
bl602+rpc (read/write) 1426202 1426194 -8 -0.0
.bss 124922 124922 0 0.0
.data 4600 4600 0 0.0
.text 1082600 1082568 -32 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668479 668463 -16 -0.0
(read/write) 182864 182880 16 0.0
.bss 74236 74236 0 0.0
.data 3356 3356 0 0.0
.rodata 88367 88367 0 0.0
.text 579796 579780 -16 -0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634063 634063 0 0.0
(read/write) 157804 157804 0 0.0
.bss 73532 73532 0 0.0
.data 3356 3356 0 0.0
.rodata 77591 77591 0 0.0
.text 556148 556148 0 0.0
lock-ftd LP_CC2652R7 (read only) 671603 671603 0 0.0
(read/write) 169916 169916 0 0.0
.bss 71300 71300 0 0.0
.data 3280 3280 0 0.0
.rodata 76451 76451 0 0.0
.text 594672 594672 0 0.0
lock-mtd LP_CC2652R7 (read only) 653847 653847 0 0.0
(read/write) 183360 183360 0 0.0
.bss 66988 66988 0 0.0
.data 3280 3280 0 0.0
.rodata 101167 101167 0 0.0
.text 552200 552200 0 0.0
pump-app LP_CC2652R7 (read only) 681271 681295 24 0.0
(read/write) 161104 161080 -24 -0.0
.bss 71388 71388 0 0.0
.data 3280 3280 0 0.0
.rodata 89183 89207 24 0.0
.text 591604 591604 0 0.0
pump-controller-app LP_CC2652R7 (read only) 667039 667039 0 0.0
(read/write) 175456 175456 0 0.0
.bss 71508 71508 0 0.0
.data 3276 3276 0 0.0
.rodata 85039 85039 0 0.0
.text 581520 581520 0 0.0
shell LP_CC2652R7 (read only) 660954 660954 0 0.0
(read/write) 185892 185892 0 0.0
.bss 76540 76540 0 0.0
.data 3360 3360 0 0.0
.rodata 85146 85146 0 0.0
.text 575492 575492 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 582042 582042 0 0.0
.app_xip_area 460432 460432 0 0.0
.bss 64404 64404 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587942 587942 0 0.0
.app_xip_area 461604 461604 0 0.0
.bss 69132 69132 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 586494 586494 0 0.0
.app_xip_area 465732 465732 0 0.0
.bss 63612 63612 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1087680 1087672 -8 -0.0
.bss 133220 133220 0 0.0
.data 2048 2048 0 0.0
.text 952392 952384 -8 -0.0
BRD4161A+rpc (read/write) 1141972 1141964 -8 -0.0
.bss 149892 149892 0 0.0
.data 2260 2260 0 0.0
.text 989796 989788 -8 -0.0
BRD4161A+rs911x (read/write) 952180 952172 -8 -0.0
.bss 140928 140928 0 0.0
.data 2048 2048 0 0.0
.text 809184 809176 -8 -0.0
lock-app BRD4161A+wf200 (read/write) 1128424 1128424 0 0.0
.bss 144304 144304 0 0.0
.data 2056 2056 0 0.0
.text 982044 982044 0 0.0
window-app BRD4161A (read/write) 1081156 1081156 0 0.0
.bss 134692 134692 0 0.0
.data 2076 2076 0 0.0
.text 944368 944368 0 0.0
esp32 all-clusters-app c3devkit (read only) 1022020 1022012 -8 -0.0
(read/write) 1486522 1486554 32 0.0
.dram0.bss 70232 70232 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216248 216280 32 0.0
.flash.text 1022020 1022012 -8 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075795 1075799 4 0.0
(read/write) 488528 488552 24 0.0
.dram0.bss 75752 75752 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246636 246660 24 0.0
.flash.text 1070411 1070415 4 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641520 641520 0 0.0
.bss 69696 69696 0 0.0
.data 2028 2028 0 0.0
.text 567068 567068 0 0.0
lock k32w0+release (read/write) 698880 698880 0 0.0
.bss 70144 70144 0 0.0
.data 2036 2036 0 0.0
.text 623972 623972 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9779324 9793452 14128 0.1
(read/write) 679441 680401 960 0.1
.bss 32833 32833 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 624824 625776 952 0.2
.dynamic 560 560 0 0.0
.got 13552 13560 8 0.1
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 457724 458556 832 0.2
.text 7737204 7748244 11040 0.1
thermostat-no-ble arm64 (read only) 2341916 2341916 0 0.0
(read/write) 141249 141249 0 0.0
.bss 55233 55233 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75592 75592 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139572 139572 0 0.0
.text 1965536 1965536 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449240 2449240 0 0.0
.bss 214444 214444 0 0.0
.data 5872 5872 0 0.0
.text 1411884 1411884 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177235 1177259 24 0.0
bss 143068 143068 0 0.0
rodata 142652 142676 24 0.0
text 812656 812656 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157287 1157311 24 0.0
bss 142304 142304 0 0.0
rodata 134184 134208 24 0.0
text 801968 801964 -4 -0.0
p6 all-clusters-app default (read only) 881632 881632 0 0.0
(read/write) 1686780 1686780 0 0.0
.bss 149064 149064 0 0.0
.data 2648 2648 0 0.0
.text 1526680 1526680 0 0.0
all-clusters-minimal-app default (read only) 882352 882352 0 0.0
(read/write) 1630884 1630876 -8 -0.0
.bss 148344 148344 0 0.0
.data 2648 2648 0 0.0
.text 1471504 1471496 -8 -0.0
light-app default (read only) 890656 890656 0 0.0
(read/write) 1550972 1550972 0 0.0
.bss 140248 140248 0 0.0
.data 2440 2440 0 0.0
.text 1399896 1399896 0 0.0
lock-app default (read only) 886184 886184 0 0.0
(read/write) 1588564 1588564 0 0.0
.bss 144704 144704 0 0.0
.data 2456 2456 0 0.0
.text 1433016 1433016 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799620 799620 0 0.0
bss 70744 70744 0 0.0
noinit 40416 40416 0 0.0
text 567210 567210 0 0.0
lighting-app tlsr9518adk80d (read/write) 819668 819696 28 0.0
bss 71588 71588 0 0.0
noinit 40416 40416 0 0.0
text 583754 583754 0 0.0

@jmartinez-silabs jmartinez-silabs merged commit 2557f51 into project-chip:master Jul 23, 2022
github-actions bot pushed a commit that referenced this pull request Jul 23, 2022
…#20788)

According to the Application Clusters specification, when Level Control
cluster is used in association with the On/Off cluster, the action on
receipt for an Off command should be to change the current level to:
    * the minimum level allowed for the device, if OnLevel is defined.
    * the stored level, if OnLevel is not defined.

In the current implementation, when receiving an Off command, the
currentLevel attribute is always restored to the stored value.

Signed-off-by: Marius Tache <[email protected]>

Restyled by clang-format
woody-apple added a commit that referenced this pull request Jul 25, 2022
…#20788) (#21143)

According to the Application Clusters specification, when Level Control
cluster is used in association with the On/Off cluster, the action on
receipt for an Off command should be to change the current level to:
    * the minimum level allowed for the device, if OnLevel is defined.
    * the stored level, if OnLevel is not defined.

In the current implementation, when receiving an Off command, the
currentLevel attribute is always restored to the stored value.

Signed-off-by: Marius Tache <[email protected]>

Restyled by clang-format

Co-authored-by: marius-alex-tache <[email protected]>
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…project-chip#20788)

According to the Application Clusters specification, when Level Control
cluster is used in association with the On/Off cluster, the action on
receipt for an Off command should be to change the current level to:
    * the minimum level allowed for the device, if OnLevel is defined.
    * the stored level, if OnLevel is not defined.

In the current implementation, when receiving an Off command, the
currentLevel attribute is always restored to the stored value.

Signed-off-by: Marius Tache <[email protected]>

Restyled by clang-format
@dvagner dvagner deleted the level-control/fix-off-action branch October 24, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants