@@ -232,16 +232,22 @@ def _read_range_continuous(self) -> int:
232
232
def read_lux (self , gain : int ) -> float :
233
233
"""Read the lux (light value) from the sensor and return it. Must
234
234
specify the gain value to use for the lux reading:
235
- - ALS_GAIN_1 = 1x
236
- - ALS_GAIN_1_25 = 1.25x
237
- - ALS_GAIN_1_67 = 1.67x
238
- - ALS_GAIN_2_5 = 2.5x
239
- - ALS_GAIN_5 = 5x
240
- - ALS_GAIN_10 = 10x
241
- - ALS_GAIN_20 = 20x
242
- - ALS_GAIN_40 = 40x
235
+
236
+ ================= =====
237
+ Setting Value
238
+ ================= =====
239
+ ``ALS_GAIN_1`` 1x
240
+ ``ALS_GAIN_1_25`` 1.25x
241
+ ``ALS_GAIN_1_67`` 1.67x
242
+ ``ALS_GAIN_2_5`` 2.5x
243
+ ``ALS_GAIN_5`` 5x
244
+ ``ALS_GAIN_10`` 10x
245
+ ``ALS_GAIN_20`` 20x
246
+ ``ALS_GAIN_40`` 40x
247
+ ================= =====
243
248
244
249
:param int gain: The gain value to use
250
+
245
251
"""
246
252
reg = self ._read_8 (_VL6180X_REG_SYSTEM_INTERRUPT_CONFIG )
247
253
reg &= ~ 0x38
@@ -290,17 +296,22 @@ def range_status(self) -> int:
290
296
"""Retrieve the status/error from a previous range read. This will
291
297
return a constant value such as:
292
298
293
- - ERROR_NONE - No error
294
- - ERROR_SYSERR_1 - System error 1 (see datasheet)
295
- - ERROR_SYSERR_5 - System error 5 (see datasheet)
296
- - ERROR_ECEFAIL - ECE failure
297
- - ERROR_NOCONVERGE - No convergence
298
- - ERROR_RANGEIGNORE - Outside range ignored
299
- - ERROR_SNR - Too much noise
300
- - ERROR_RAWUFLOW - Raw value underflow
301
- - ERROR_RAWOFLOW - Raw value overflow
302
- - ERROR_RANGEUFLOW - Range underflow
303
- - ERROR_RANGEOFLOW - Range overflow
299
+ ===================== ==============================
300
+ Error Description
301
+ ===================== ==============================
302
+ ``ERROR_NONE`` No error
303
+ ``ERROR_SYSERR_1`` System error 1 (see datasheet)
304
+ ``ERROR_SYSERR_5`` System error 5 (see datasheet)
305
+ ``ERROR_ECEFAIL`` ECE failure
306
+ ``ERROR_NOCONVERGE`` No convergence
307
+ ``ERROR_RANGEIGNORE`` Outside range ignored
308
+ ``ERROR_SNR`` Too much noise
309
+ ``ERROR_RAWUFLOW`` Raw value underflow
310
+ ``ERROR_RAWOFLOW`` Raw value overflow
311
+ ``ERROR_RANGEUFLOW`` Range underflow
312
+ ``ERROR_RANGEOFLOW`` Range overflow
313
+ ===================== ==============================
314
+
304
315
"""
305
316
return self ._read_8 (_VL6180X_REG_RESULT_RANGE_STATUS ) >> 4
306
317
0 commit comments