Skip to content

Commit

Permalink
Drop unnecessary temporary frame variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Aug 17, 2020
1 parent 78a5e14 commit eecc6b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adafruit_pm25/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def read(self):
raise RuntimeError("Invalid PM2.5 checksum")

# unpack data
frame = struct.unpack(">HHHHHHHHHHHH", self._buffer[4:28])
(
self.aqi_reading["pm10 standard"],
self.aqi_reading["pm25 standard"],
Expand All @@ -111,6 +110,6 @@ def read(self):
self.aqi_reading["particles 25um"],
self.aqi_reading["particles 50um"],
self.aqi_reading["particles 100um"],
) = frame
) = struct.unpack(">HHHHHHHHHHHH", self._buffer[4:28])

return self.aqi_reading

0 comments on commit eecc6b2

Please sign in to comment.