Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit cc45f17

Browse files
authored
Update LIS2HH12.py
fix typo in variable name thres[h]old
1 parent 48fc4a8 commit cc45f17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pytrack-2/lib/LIS2HH12.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ def enable_activity_interrupt(self, threshold, duration, handler=None):
125125
self.act_dur = duration
126126

127127
if threshold > self.SCALES[self.full_scale]:
128-
error = "threshold %d exceeds full scale %d" % (thresold, self.SCALES[self.full_scale])
128+
error = "threshold %d exceeds full scale %d" % (threshold, self.SCALES[self.full_scale])
129129
print(error)
130130
raise ValueError(error)
131131

132132
if threshold < self.SCALES[self.full_scale] / 128:
133-
error = "threshold %d below resolution %d" % (thresold, self.SCALES[self.full_scale]/128)
133+
error = "threshold %d below resolution %d" % (threshold, self.SCALES[self.full_scale]/128)
134134
print(error)
135135
raise ValueError(error)
136136

@@ -157,7 +157,7 @@ def enable_activity_interrupt(self, threshold, duration, handler=None):
157157
self.int_pin = Pin('P13', mode=Pin.IN)
158158
self.int_pin.callback(trigger=Pin.IRQ_FALLING | Pin.IRQ_RISING, handler=self._int_handler)
159159

160-
# return actual used thresold and duration
160+
# return actual used threshold and duration
161161
return (_ths * self.SCALES[self.full_scale] / 128, _dur * 8 * 1000 / self.ODRS[self.odr])
162162

163163
def activity(self):

0 commit comments

Comments
 (0)