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

Make robotic vacuum cleaner spec compliant #37718

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

sxb427
Copy link
Contributor

@sxb427 sxb427 commented Feb 22, 2025

Changes

  1. Start a new cleaning cycle when RunMode is changed form Idle to non-Idle.
  2. Stop existing cycle when RunMode is changed from non-idle to idle.
  3. Change RunMode to idle when cycle completes.

Testing

Testing using chip tool.

Test for 1 and 2
a. Commission.
b. Read operational state and run mode and ensure both are 0.
c. Set Run Mode to 1 (cleaning)
d. Read operational state and verify it is changed to 1 (running)
e. Set Run Mode to 1 (idle)
f. Read operational state and verify it is changed to 0 (stopped)

Commands after commissioning

/chip-tool pairing code 0x20 MT:Y.#####
./chip-tool rvcrunmode read current-mode 0x20 1 | grep "CurrentMode"
./chip-tool rvcoperationalstate read operational-state 0x20 1 | grep "OperationalState"
./chip-tool rvcrunmode change-to-mode 1 0x20 1
./chip-tool rvcoperationalstate read operational-state 0x20 1 | grep "OperationalState"
./chip-tool rvcrunmode change-to-mode 0 0x20 1
./chip-tool rvcoperationalstate read operational-state 0x20 1 | grep "OperationalState"

Test for 3
a. Commission.
b. Read operational state and run mode and ensure both are 0.
c. Set Run Mode to 1 (cleaning)
d. Read operational state and verify it is changed to 1 (running)
e. Wait for 30 seconds
f. Read operational state and run mode and ensure both are 0.

/chip-tool pairing code 0x20 MT:Y.#####
./chip-tool rvcrunmode read current-mode 0x20 1 | grep "CurrentMode"
./chip-tool rvcoperationalstate read operational-state 0x20 1 | grep "OperationalState"
./chip-tool rvcrunmode change-to-mode 1 0x20 1
./chip-tool rvcoperationalstate read operational-state 0x20 1 | grep "OperationalState"
# Wait 30 seconds
./chip-tool rvcrunmode read current-mode 0x20 1 | grep "CurrentMode"
./chip-tool rvcoperationalstate read operational-state 0x20 1 | grep "OperationalState"

Copy link

Review changes with  SemanticDiff

Copy link

github-actions bot commented Feb 22, 2025

PR #37718: Size comparison from f84fe08 to fd92b12

Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section f84fe08 fd92b12 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1095140 1095140 0 0.0
RAM 94802 94802 0 0.0
bl702 lighting-app bl702+eth FLASH 651586 651586 0 0.0
RAM 33509 33509 0 0.0
bl702+wifi FLASH 827750 827750 0 0.0
RAM 22233 22233 0 0.0
bl706+mfd+rpc+littlefs FLASH 1060912 1060912 0 0.0
RAM 32157 32157 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892098 892098 0 0.0
RAM 26896 26896 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 974994 974994 0 0.0
RAM 24644 24644 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 815268 815268 0 0.0
RAM 120256 120256 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824180 824180 0 0.0
RAM 125352 125352 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771048 771048 0 0.0
RAM 113724 113724 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755324 755324 0 0.0
RAM 113932 113932 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538810 538810 0 0.0
RAM 205112 205112 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572966 572966 0 0.0
RAM 205360 205360 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 656397 656397 0 0.0
RAM 75324 75324 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 676257 676257 0 0.0
RAM 77964 77964 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 676257 676257 0 0.0
RAM 77964 77964 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 633181 633181 0 0.0
RAM 70392 70392 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616261 616261 0 0.0
RAM 71532 71532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635897 635897 0 0.0
RAM 74076 74076 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635897 635897 0 0.0
RAM 74076 74076 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635757 635757 0 0.0
RAM 74540 74540 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655473 655473 0 0.0
RAM 77084 77084 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655473 655473 0 0.0
RAM 77084 77084 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612105 612105 0 0.0
RAM 68628 68628 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631965 631965 0 0.0
RAM 71268 71268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631965 631965 0 0.0
RAM 71268 71268 0 0.0
efr32 lock-app BRD4187C FLASH 939152 939152 0 0.0
RAM 159920 159920 0 0.0
BRD4338a FLASH 732240 732240 0 0.0
RAM 234836 234836 0 0.0
window-app BRD4187C FLASH 1032000 1032000 0 0.0
RAM 128024 128024 0 0.0
esp32 all-clusters-app c3devkit DRAM 97312 97312 0 0.0
FLASH 1581932 1581932 0 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116100 116100 0 0.0
FLASH 1549958 1549958 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2649711 2649711 0 0.0
RAM 111088 111088 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 5921216 5921216 0 0.0
RAM 513712 513712 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5266218 5266218 0 0.0
RAM 221112 221112 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4624892 4624892 0 0.0
RAM 199816 199816 0 0.0
camera-app debug unknown 5424 5424 0 0.0
FLASH 4671672 4671672 0 0.0
RAM 194592 194592 0 0.0
chip-tool debug unknown 6096 6096 0 0.0
FLASH 13300565 13300565 0 0.0
RAM 603392 603392 0 0.0
chip-tool-ipv6only arm64 unknown 21976 21976 0 0.0
FLASH 11322144 11322144 0 0.0
RAM 655184 655184 0 0.0
fabric-admin debug unknown 5784 5784 0 0.0
FLASH 11565129 11565129 0 0.0
RAM 603176 603176 0 0.0
fabric-bridge-app debug unknown 4688 4688 0 0.0
FLASH 4450216 4450216 0 0.0
RAM 187016 187016 0 0.0
fabric-sync debug unknown 4944 4944 0 0.0
FLASH 5569029 5569029 0 0.0
RAM 470400 470400 0 0.0
lighting-app debug+rpc+ui unknown 6152 6152 0 0.0
FLASH 5514305 5514305 0 0.0
RAM 203952 203952 0 0.0
lock-app debug unknown 5392 5392 0 0.0
FLASH 4688328 4688328 0 0.0
RAM 191144 191144 0 0.0
ota-provider-app debug unknown 4728 4728 0 0.0
FLASH 4310508 4310508 0 0.0
RAM 179832 179832 0 0.0
ota-requestor-app debug unknown 4680 4680 0 0.0
FLASH 4440666 4440666 0 0.0
RAM 184320 184320 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 2949020 2949020 0 0.0
RAM 143672 143672 0 0.0
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4042232 4042232 0 0.0
RAM 228096 228096 0 0.0
tv-app debug unknown 5720 5720 0 0.0
FLASH 5907941 5907941 0 0.0
RAM 593832 593832 0 0.0
tv-casting-app debug unknown 5296 5296 0 0.0
FLASH 11471373 11471373 0 0.0
RAM 718656 718656 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907676 907676 0 0.0
RAM 142323 142323 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 901752 901752 0 0.0
RAM 124663 124663 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846280 846280 0 0.0
RAM 141251 141251 0 0.0
nxp contact k32w0+release FLASH 585184 585184 0 0.0
RAM 70876 70876 0 0.0
mcxw71+release FLASH 600640 600640 0 0.0
RAM 63096 63096 0 0.0
light k32w0+release FLASH 611156 611156 0 0.0
RAM 70164 70164 0 0.0
k32w1+release FLASH 685640 685640 0 0.0
RAM 48584 48584 0 0.0
lock mcxw71+release FLASH 749480 749480 0 0.0
RAM 67500 67500 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646172 1646172 0 0.0
RAM 211472 211472 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552940 1552940 0 0.0
RAM 208288 208288 0 0.0
light cy8ckit_062s2_43012 FLASH 1438612 1438612 0 0.0
RAM 197040 197040 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467500 1467500 0 0.0
RAM 224704 224704 0 0.0
qpg lighting-app qpg6105+debug FLASH 662156 662156 0 0.0
RAM 105116 105116 0 0.0
lock-app qpg6105+debug FLASH 620264 620264 0 0.0
RAM 99664 99664 0 0.0
stm32 light STM32WB5MM-DK FLASH 459800 459800 0 0.0
RAM 141472 141472 0 0.0
telink bridge-app tl7218x FLASH 665014 665014 0 0.0
RAM 90728 90728 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622058 622058 0 0.0
RAM 31488 31488 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 745198 745198 0 0.0
RAM 40396 40396 0 0.0
tl7218x FLASH 753760 753760 0 0.0
RAM 97540 97540 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680830 680830 0 0.0
RAM 52192 52192 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709392 709392 0 0.0
RAM 73400 73400 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 600572 600572 0 0.0
RAM 138812 138812 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 788714 788714 0 0.0
RAM 96388 96388 0 0.0
tizen all-clusters-app arm unknown 5076 5076 0 0.0
FLASH 1750772 1750772 0 0.0
RAM 93260 93260 0 0.0
chip-tool-ubsan arm unknown 11492 11492 0 0.0
FLASH 18981598 18981598 0 0.0
RAM 8305976 8305976 0 0.0

@andy31415
Copy link
Contributor

@sxb427 it seems like the tests you ran manually could be automated. Could you do so?

@@ -122,6 +122,8 @@ void Shutdown();
} // namespace app
} // namespace chip

extern std::unique_ptr<chip::app::Clusters::RvcOperationalState::RvcOperationalStateDelegate> gRvcOperationalStateDelegate;
Copy link
Contributor

Choose a reason for hiding this comment

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

why extern?

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make more sense to add a getter method instead?

@andy31415
Copy link
Contributor

@sxb427 it seems like the tests you ran manually could be automated. Could you do so?

I just realized this is chef not an official application ... I believe it is fine then, we don't run chef CI (too costly to compile)

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.

3 participants