Commit af8a4d1
docs(q7): document live map pushes and cover them in tests (#927)
The map content trait's module docstring described a pure pull contract --
`refresh()` does I/O, `parse_map_content()` reparses, fields "are then
readable" -- which no longer holds: `update_from_push()` mutates the same
cached fields from the MQTT receive callback and notifies listeners, so
they can change without the reader calling anything. Spell that out.
`docs/DEVICES.md` only mentioned `device.b01_q7_properties` for Q7, so the
push path was undiscoverable and consumers would build a polling loop for
something the device streams by itself. Name the listener entry point and
the fields to read.
The push test checked `image_content` and `raw_api_response` but not
`map_data`, the field carrying the live pose and cleaning path -- dropping
its assignment kept the test green. It also never asserted that no RPC was
published, which is the whole point of the push path: unlike `refresh()`,
it needs no map id and no round trips.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 7d65d27 commit af8a4d1
3 files changed
Lines changed: 8 additions & 0 deletions
File tree
- docs
- roborock/devices/traits/b01/q7
- tests/devices/traits/b01/q7
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
0 commit comments