-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
bugSomething isn't workingSomething isn't workingwontfixThis will not be worked onThis will not be worked on
Description
Consider the following program:
from picozero import LED, Button
led = LED(1)
led.off()
button = Button(3)
def blink_2_times():
led.blink(on_time=0.5, n=2, wait=True)
button.when_pressed = blink_2_times
button.when_released = led.offThe expected behaivour would be for the LED to blink twice, but as soon as button is released the LED should turn off.
In practice the LED will continue to blink until it has finished.
This issue affects all calls which use wait. It becomes more apparent functions like PWMBuzzer.play which wait by default and it isnt an explicit action by the user to set wait to True.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingwontfixThis will not be worked onThis will not be worked on