Skip to content

Commit c15d0cb

Browse files
committed
Change method used to flush buffer to fix #1
1 parent c9ba849 commit c15d0cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plantower/plantower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def read(self, perform_flush=True):
119119
recv = b''
120120
start = datetime.utcnow() #Start timer
121121
if perform_flush:
122-
self.serial.flush() #Flush any data in the buffer
122+
self.serial.reset_input_buffer() #Flush any data in the buffer
123123
while(
124124
datetime.utcnow() <
125125
(start + timedelta(seconds=self.read_timeout))):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="plantower",
8-
version="0.0.5",
8+
version="0.0.6",
99
author="Philip Basford",
1010
author_email="[email protected]",
1111
description="An interface for plantower particulate matter sensors",

0 commit comments

Comments
 (0)