Skip to content

Commit 243a50e

Browse files
committed
rename als_threshold values. remove docs conf test
1 parent 7e17bcb commit 243a50e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

adafruit_vcnl4200.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ class Adafruit_VCNL4200:
161161
"""Enables or disables the ALS (Ambient Light Sensor) shutdown mode.
162162
Controls the power state of the ALS, allowing it to be shut down to conserve power.
163163
Set to true to enable shutdown mode (power off ALS), false to disable (power on ALS)."""
164-
als_low_threshold = UnaryStruct(_ALS_THDL, "<H")
164+
als_threshold_low = UnaryStruct(_ALS_THDL, "<H")
165165
"""The 16-bit numerical low threshold for the ALS (Ambient Light Sensor) interrupt.
166166
If the ALS reading falls below this threshold and ALS interrupt is enabled, an interrupt
167167
will be triggered."""
168-
als_high_threshold = UnaryStruct(_ALS_THDH, "<H")
168+
als_threshold_high = UnaryStruct(_ALS_THDH, "<H")
169169
"""The 16-bit numerical upper limit for proximity detection.If the proximity reading
170170
exceeds this threshold and the interrupt is enabled, an interrupt will be triggered."""
171171
prox_hd = RWBit(_PS_CONF12, 11)
@@ -261,8 +261,8 @@ def __init__(self, i2c: I2C, addr: int = _I2C_ADDRESS) -> None:
261261
self.als_shutdown = False
262262
self.als_integration_time = ALS_IT["50MS"]
263263
self.als_persistence = ALS_PERS["1"]
264-
self.als_low_threshold = 0
265-
self.als_high_threshold = 0xFFFF
264+
self.als_threshold_low = 0
265+
self.als_threshold_high = 0xFFFF
266266
self.als_interrupt(enabled=True, white_channel=False)
267267
self.prox_duty = PS_DUTY["1_160"]
268268
self.prox_shutdown = False

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
autodoc_mock_imports = ["busio", "adafruit_register", "adafruit_bus_device"]
2929

3030
autodoc_preserve_defaults = True
31-
# autodoc_member_order = "bysource"
31+
3232

3333
intersphinx_mapping = {
3434
"python": ("https://docs.python.org/3", None),

examples/vcnl4200_fulltest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
print(f"Lux Persistence Mode: {sensor.als_persistence}")
1818
print(f"Lux Integration Mode: {sensor.als_integration_time}")
1919
print(f"Lux Persistence Mode: {sensor.als_persistence}")
20-
sensor.als_low_threshold = 0
20+
sensor.als_threshold_low = 0
2121
print(f"Lux Low Threshold: {sensor.als_low_threshold}")
22-
sensor.als_high_threshold = 500
22+
sensor.als_threshold_high = 500
2323
print(f"Lux High Threshold: {sensor.als_high_threshold}")
2424

2525
print(" '''Proximity Settings''' ")

examples/vcnl4200_interrupts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
interrupt_pin.direction = digitalio.Direction.INPUT
1818
interrupt_pin.pull = digitalio.Pull.UP
1919

20-
sensor.als_low_threshold = 500
21-
sensor.als_high_threshold = 1000
20+
sensor.als_threshold_low = 500
21+
sensor.als_threshold_high = 1000
2222
sensor.prox_int_threshold_low = 200
2323
sensor.prox_int_threshold_high = 600
2424

0 commit comments

Comments
 (0)