Skip to content

Commit 6ac8462

Browse files
allenporterCopilot
andauthored
feat: Update roborock/devices/rpc/b01_q7_channel.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ea5d444 commit 6ac8462

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

roborock/devices/rpc/b01_q7_channel.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,15 @@ def __init__(self, mqtt_channel: MqttChannel, map_key: MapKey) -> None:
142142
self._map_key = map_key
143143

144144
async def send_map_command(self, request_message: Q7RequestMessage) -> bytes:
145-
"""Send map upload command and wait for MAP_RESPONSE payload bytes.
145+
"""Send a map upload command and return decoded SCMap bytes.
146146
147-
This stays separate from ``send_decoded_command()`` because map uploads arrive as
148-
raw ``MAP_RESPONSE`` payload bytes instead of a decoded RPC ``data`` payload.
147+
This publishes the request and waits for a matching ``MAP_RESPONSE`` message
148+
with the correct protocol version. The raw ``MAP_RESPONSE`` payload bytes are
149+
then decoded/inflated via :func:`decode_map_payload` using this channel's
150+
``map_key``, and the resulting SCMap bytes are returned.
149151
150-
The response is a protocol buffer than can be parsed by the map parser library.
152+
The returned value is the decoded map data bytes suitable for passing to the
153+
map parser library, not the raw MQTT ``MAP_RESPONSE`` payload bytes.
151154
"""
152155

153156
try:

0 commit comments

Comments
 (0)