Skip to content

Commit 2e8dc7d

Browse files
committed
Add TouchSensor aliases for clarity and update DistanceSensor docstring
1 parent 5780dd6 commit 2e8dc7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

picozero/picozero.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,8 +2376,8 @@ def __init__(self, pin, pull_up=False, bounce_time=0.02):
23762376

23772377

23782378
TouchSensor.is_touched = TouchSensor.is_active
2379-
# Note: No alias for is_inactive - use 'not touch.is_touched' for clarity
2380-
TouchSensor.when_touched = TouchSensor.when_activated
2379+
TouchSensor.is_not_touched = TouchSensor.is_inactive
2380+
TouchSensor.when_touch_starts = TouchSensor.when_activated
23812381
TouchSensor.when_touch_ends = TouchSensor.when_deactivated
23822382

23832383

0 commit comments

Comments
 (0)