Skip to content

Commit

Permalink
Merge pull request #20 from caternuson/iss19
Browse files Browse the repository at this point in the history
Add mask for feature set check.
  • Loading branch information
caternuson committed Jun 23, 2023
2 parents 4f872a9 + e545f8f commit 980cc47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_sgp40/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def initialize(self) -> None:
self._command_buffer[0] = 0x20
self._command_buffer[1] = 0x2F
featureset = self._read_word_from_command()
if featureset[0] != 0x3220:
if featureset[0] & 0xFF00 != 0x3200:
raise RuntimeError(f"Feature set does not match: {featureset[0]:#x}")

# Self Test
Expand Down

0 comments on commit 980cc47

Please sign in to comment.