@@ -121,29 +121,29 @@ def als_data_gain(self) -> int:
121
121
@property
122
122
def integration_time (self ) -> int :
123
123
"""ALS integration times, can be: 50, 100, 150, 200, 250,
124
- 300, 350, or 400 millisec """
124
+ 300, 350, or 400 milliseconds """
125
125
return _integration_times [self ._integration_time ]
126
126
127
127
@integration_time .setter
128
128
def integration_time (self , int_time : int ) -> None :
129
129
if not int_time in _integration_times :
130
130
raise RuntimeError (
131
131
"Invalid integration time: must be 50, 100, 150, "
132
- "200, 250, 300, 350, or 400 millisec "
132
+ "200, 250, 300, 350, or 400 milliseconds "
133
133
)
134
134
self ._integration_time = _integration_times .index (int_time )
135
135
136
136
@property
137
137
def measurement_rate (self ) -> int :
138
138
"""ALS measurement rate, must be = or > than ALS integration rate!
139
- Can be: 50, 100, 200, 500, 1000, or 2000 millisec """
139
+ Can be: 50, 100, 200, 500, 1000, or 2000 milliseconds """
140
140
return _measurement_rates [self ._measurement_rate ]
141
141
142
142
@measurement_rate .setter
143
143
def measurement_rate (self , rate : int ) -> None :
144
144
if not rate in _measurement_rates :
145
145
raise RuntimeError (
146
- "Invalid measurement rate: must be 50, 100, 200, 500, 1000, or 2000 millisec "
146
+ "Invalid measurement rate: must be 50, 100, 200, 500, 1000, or 2000 milliseconds "
147
147
)
148
148
self ._measurement_rate = _measurement_rates .index (rate )
149
149
@@ -189,25 +189,25 @@ class LTR303(LTR329):
189
189
threshold_high = UnaryStruct (_LTR303_REG_THRESHHIGH_LSB , "<H" )
190
190
threshold_low = UnaryStruct (_LTR303_REG_THRESHLOW_LSB , "<H" )
191
191
192
- _int_persistance = RWBits (4 , _LTR303_REG_INTPERSIST , 0 )
192
+ _int_persistence = RWBits (4 , _LTR303_REG_INTPERSIST , 0 )
193
193
194
194
@property
195
- def int_persistance (self ) -> int :
195
+ def int_persistence (self ) -> int :
196
196
"""How long the data needs to be high/low to generate an interrupt.
197
197
Setting of 1 means 'every measurement', 2 means "two in a row", etc
198
198
up to 16
199
199
"""
200
- return self ._int_persistance + 1
200
+ return self ._int_persistence + 1
201
201
202
- @int_persistance .setter
203
- def int_persistance (self , counts : int ) -> None :
202
+ @int_persistence .setter
203
+ def int_persistence (self , counts : int ) -> None :
204
204
if not 1 <= counts <= 16 :
205
- raise ValueError ("Persistance counts must be 1-16" )
206
- self ._int_persistance = counts - 1
205
+ raise ValueError ("Persistence counts must be 1-16" )
206
+ self ._int_persistence = counts - 1
207
207
208
208
@property
209
209
def enable_int (self ) -> bool :
210
- """Whether the interupt is enabled """
210
+ """Enable the interrupt functionality. """
211
211
return self ._enable_int
212
212
213
213
@enable_int .setter
@@ -222,7 +222,7 @@ def enable_int(self, enable: bool) -> None:
222
222
223
223
@property
224
224
def int_polarity (self ) -> bool :
225
- """The polarity of the interupt (whether high or low is "active")"""
225
+ """The polarity of the interrupt (whether high or low is "active")"""
226
226
return self ._int_polarity
227
227
228
228
@int_polarity .setter
0 commit comments