Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions roborock/data/b01_q10/b01_q10_code_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class B01_Q10_DP(RoborockModeEnum):
DUST_SETTING = ("dpDustSetting", 50)
MAP_SAVE_SWITCH = ("dpMapSaveSwitch", 51)
CLEAN_RECORD = ("dpCleanRecord", 52)
RECEND_CLEAN_RECORD = ("dpRecendCleanRecord", 53)
RECENT_CLEAN_RECORD = ("dpRecentCleanRecord", 53) # NOTE: typo "dpRecendCleanRecord" in source code
RESTRICTED_ZONE = ("dpRestrictedZone", 54)
RESTRICTED_ZONE_UP = ("dpRestrictedZoneUp", 55)
VIRTUAL_WALL = ("dpVirtualWall", 56)
Expand All @@ -56,7 +56,7 @@ class B01_Q10_DP(RoborockModeEnum):
ROOM_MERGE = ("dpRoomMerge", 72)
ROOM_SPLIT = ("dpRoomSplit", 73)
RESET_ROOM_NAME = ("dpResetRoomName", 74)
REQUSET_NOT_DISTURB_DATA = ("dpRequsetNotDisturbData", 75)
REQUEST_NOT_DISTURB_DATA = ("dpRequestNotDisturbData", 75) # NOTE: typo "dpRequsetNotDisturbData" in source code
CARPET_CLEAN_TYPE = ("dpCarpetCleanType", 76)
BUTTON_LIGHT_SWITCH = ("dpButtonLightSwitch", 77)
CLEAN_LINE = ("dpCleanLine", 78)
Expand All @@ -68,7 +68,7 @@ class B01_Q10_DP(RoborockModeEnum):
LOG_SWITCH = ("dpLogSwitch", 84)
FLOOR_MATERIAL = ("dpFloorMaterial", 85)
LINE_LASER_OBSTACLE_AVOIDANCE = ("dpLineLaserObstacleAvoidance", 86)
CLEAN_PROGESS = ("dpCleanProgess", 87)
CLEAN_PROGRESS = ("dpCleanProgress", 87) # NOTE: typo "dpCleanProgess" in source code
GROUND_CLEAN = ("dpGroundClean", 88)
IGNORE_OBSTACLE = ("dpIgnoreObstacle", 89)
FAULT = ("dpFault", 90)
Expand All @@ -84,7 +84,7 @@ class B01_Q10_DP(RoborockModeEnum):
SUSPECTED_THRESHOLD_UP = ("dpSuspectedThresholdUp", 100)
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
Copy link

Copilot AI Feb 1, 2026

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.

Copilot uses AI. Check for mistakes.
CLIFF_RESTRICTED_AREA = ("dpCliffRestrictedArea", 102)
CLIFF_RESTRICTED_AREA_UP = ("dpCliffRestrictedAreaUp", 103)
BREAKPOINT_CLEAN = ("dpBreakpointClean", 104)
Expand All @@ -96,7 +96,7 @@ class B01_Q10_DP(RoborockModeEnum):
HEARTBEAT = ("dpHeartbeat", 110)
STATUS = ("dpStatus", 121)
BATTERY = ("dpBattery", 122)
FUN_LEVEL = ("dpfunLevel", 123)
FAN_LEVEL = ("dpFanLevel", 123) # NOTE: typo "dpfunLevel" in source code
WATER_LEVEL = ("dpWaterLevel", 124)
MAIN_BRUSH_LIFE = ("dpMainBrushLife", 125)
SIDE_BRUSH_LIFE = ("dpSideBrushLife", 126)
Expand Down Expand Up @@ -125,7 +125,7 @@ class YXFanLevel(RoborockModeEnum):
NORMAL = "normal", 2
STRONG = "strong", 3
MAX = "max", 4
SUPER = "super", 5
SUPER = "super", 8
Copy link
Collaborator

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.



class YXWaterLevel(RoborockModeEnum):
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ async def test_q10_device(
# against the golden byte stream snapshot.
assert device.b01_q10_properties
command = device.b01_q10_properties.command
await command.send(B01_Q10_DP.REQUETDPS, params={})
await command.send(B01_Q10_DP.REQUEST_DPS, params={})

# In the future here we can verify receiving requests from the device

Expand Down
10 changes: 5 additions & 5 deletions tests/protocols/__snapshots__/test_b01_q10_protocol.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"dpStatus": 8,
"dpBattery": 100,
"dpfunLevel": 2,
"dpFanLevel": 2,
"dpWaterLevel": 1,
"dpMainBrushLife": 0,
"dpSideBrushLife": 0,
Expand All @@ -35,7 +35,7 @@
"dpChildLock": 0,
"dpDustSetting": 0,
"dpMapSaveSwitch": true,
"dpRecendCleanRecord": false,
"dpRecentCleanRecord": false,
"dpCleanTime": 0,
"dpMultiMapSwitch": 1,
"dpSensorLife": 0,
Expand All @@ -55,7 +55,7 @@
},
"dpRobotType": 1,
"dpLineLaserObstacleAvoidance": 1,
"dpCleanProgess": 100,
"dpCleanProgress": 100,
"dpGroundClean": 0,
"dpFault": 0,
"dpNotDisturbExpand": {
Expand All @@ -77,10 +77,10 @@
}
'''
# ---
# name: test_encode_mqtt_payload[dpRequetdps-None]
# name: test_encode_mqtt_payload[dpRequestDps-None]
b'{"dps": {"102": {}}}'
# ---
# name: test_encode_mqtt_payload[dpRequetdps-params0]
# name: test_encode_mqtt_payload[dpRequestDps-params0]
b'{"dps": {"102": {}}}'
# ---
# name: test_encode_mqtt_payload[dpStartClean-params2]
Expand Down
4 changes: 2 additions & 2 deletions tests/protocols/test_b01_q10_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def test_decode_unknown_dps_code() -> None:
@pytest.mark.parametrize(
("command", "params"),
[
(B01_Q10_DP.REQUETDPS, {}),
(B01_Q10_DP.REQUETDPS, None),
(B01_Q10_DP.REQUEST_DPS, {}),
(B01_Q10_DP.REQUEST_DPS, None),
(B01_Q10_DP.START_CLEAN, {"cmd": 1}),
(B01_Q10_DP.WATER_LEVEL, YXWaterLevel.MIDDLE.code),
],
Expand Down
Loading