-
Notifications
You must be signed in to change notification settings - Fork 63
Fix typos in code mappings for Roborock #762
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
Conversation
|
The requet DPS thing is similar -- it's following the naming of the internal code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR corrects several typos in the Roborock B01/Q10 datapoint (DP) code mappings and updates tests/snapshots to match the corrected enum member names and DP value strings.
Changes:
- Renames multiple
B01_Q10_DPenum members and their.valuestrings to fix inherited typos (e.g.,REQUETDPS→REQUEST_DPS,FUN_LEVEL→FAN_LEVEL). - Updates protocol/e2e tests and snapshot outputs to reflect the corrected DP names.
- Adjusts
YXFanLevel.SUPERmode code from5to8.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
roborock/data/b01_q10/b01_q10_code_mappings.py |
Fixes enum member/value typos and updates fan level mode code. |
tests/protocols/test_b01_q10_protocol.py |
Updates protocol encoding test inputs to use renamed enum members. |
tests/protocols/__snapshots__/test_b01_q10_protocol.ambr |
Updates snapshot keys and test case names to match corrected DP naming. |
tests/e2e/test_device_manager.py |
Updates end-to-end command send to use renamed enum member. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| COMMON = ("dpCommon", 101) | ||
| JUMP_SCAN = ("dpJumpScan", 101) | ||
| REQUETDPS = ("dpRequetdps", 102) # NOTE: THIS TYPO IS FOUND IN SOURCE CODE | ||
| REQUEST_DPS = ("dpRequestDps", 102) # NOTE: typo "dpRequetdps" in source code |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test data file/snapshot identifier for this datapoint is still dpRequetdps (see tests/protocols/testdata/b01_q10_protocol/dpRequetdps.json and the snapshot section name), which is now inconsistent with the corrected enum value dpRequestDps. Renaming the fixture file and corresponding snapshot section would keep the tests aligned with the corrected mapping and avoid reintroducing the typo via test IDs.
| STRONG = "strong", 3 | ||
| MAX = "max", 4 | ||
| SUPER = "super", 5 | ||
| SUPER = "super", 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was confused by this change, but it looks like the app stores the value as 5 then converts it to 8 when it sends it out.
Summary
This PR fixes multiple typos found in the B01_Q10 device code mappings that were inherited from the original Roborock application source code. These corrections improve code clarity and consistency while maintaining compatibility with the device protocol.
Changes
Code Mapping Corrections:
FUN_LEVEL→FAN_LEVEL(constant name)dpfunLevel→dpFanLevel(property name)dpRecendCleanRecord→dpRecentCleanRecord(typo: "Recend" → "Recent")dpCleanProgess→dpCleanProgress(typo: "Progess" → "Progress")REQUETDPS→REQUEST_DPS(typo: "Requet" → "Request")REQUSET_NOT_DISTURB_DATA→REQUEST_NOT_DISTURB_DATA(typo: "Requset" → "Request")YXFanLevel.SUPERvalue:5→8(corrected mode code)Documentation:
Type Checking
Testing