Merge pull request #1029 from adafruit/sipnpuff

fixing sip 'n puff typo and name
This commit is contained in:
Limor "Ladyada" Fried 2020-02-13 11:26:02 -05:00 committed by GitHub
commit c2ecbdabb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ DISPLAY_HEIGHT = 64
Y_OFFSET = 3
TEXT_HEIGHT = 8
BOTTOM_ROW = DISPLAY_HEIGHT - TEXT_HEIGHT
BANNER_STRING = "PUFF-O-TRON-9000"
BANNER_STRING = "ST LPS33HW Sip & Puff"
pressure_string = " "
input_type_string = " "
# pylint:disable=too-many-locals,exec-used,eval-used
@ -134,7 +134,7 @@ class PuffDetector:
while True:
self.check_for_events()
def _catagorize_pressure(self, pressure):
def _categorize_pressure(self, pressure):
"""determine the strength and polarity of the pressure reading"""
level = 0
polarity = 0
@ -170,7 +170,7 @@ class PuffDetector:
def _update_state(self):
"""Updates the internal state to detect if a sip/puff has been started or stopped"""
self.current_polarity, level = self._catagorize_pressure(self.current_pressure)
self.current_polarity, level = self._categorize_pressure(self.current_pressure)
if self.state == DETECTED:
self.state = WAITING