-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PyPMS reader instead of low-level serial cmds
This is viable since [^1]. There are some minor differences to note: - SensorReader._cmd uses Serial.flush(), but this shouldn't be an issue in newer versions of Python [^2]. - SensorReader._cmd reads all available input into the buffer and only calls Serial.reset after a "_read", or if the buffer turns out to be invalid. This is less robust than just calling Serial.reset before each command, but it seems to work. - SensorReader.open does an additional check to verify the sensor. [^1]: avaldebe/PyPMS#33 [^2]: python/cpython#97001
- Loading branch information
1 parent
b823612
commit 19a981b
Showing
2 changed files
with
45 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters