We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae2a64b commit 78a5e14Copy full SHA for 78a5e14
adafruit_pm25/__init__.py
@@ -83,7 +83,7 @@ def read(self):
83
# print([hex(i) for i in self._buffer])
84
85
# check packet header
86
- if (self._buffer[0] != 0x42) or (self._buffer[1] != 0x4D):
+ if not self._buffer[0:2] == b'BM':
87
raise RuntimeError("Invalid PM2.5 header")
88
89
# check frame length
0 commit comments