diff --git a/adafruit_pm25/__init__.py b/adafruit_pm25/__init__.py index 98ae61a..80425e9 100644 --- a/adafruit_pm25/__init__.py +++ b/adafruit_pm25/__init__.py @@ -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"], @@ -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