Skip to content

Commit 45c3bf0

Browse files
committed
typo
1 parent 091fedd commit 45c3bf0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/pms/sensors/sensirion/sps30.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _validate(cls, message: bytes, header: bytes, length: int) -> base.Message:
7474
# consistency check: bug in message singnature
7575
assert len(header) == 5, f"wrong header length {len(header)}"
7676
assert header[:2] == b"\x7e\x00", f"wrong header start {header!r}"
77-
assert length in [7, 47], f"wrong payload length {length} != 4||47"
77+
assert length in {7, 47}, f"wrong payload length {length} != 7||47"
7878
len_payload = header[-1]
7979
assert length == len_payload + 7, f"wrong payload length {length} != {len_payload + 7}"
8080

tests/sensors/test_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def test_decode_error(sensor, hex, error):
284284
sps30.Message,
285285
sps30.commands.passive_read.answer_header,
286286
pmsx003.commands.passive_read.answer_length,
287-
"wrong payload length 32 != 4||47",
287+
"wrong payload length 32 != 7||47",
288288
id="SPS30 wrong payload length",
289289
),
290290
],

0 commit comments

Comments
 (0)