OpenRoberta / robertalab-ev3dev

roberta lab connector for ev3dev
Apache License 2.0
17 stars 14 forks source link

long play tone commands cannot be canceled #37

Closed ensonic closed 7 years ago

ensonic commented 7 years ago

Beep commands are blocking. Right now we can't cancel the program while a beep runs. This is problematic if the beep has a ridiculously long duration of e.g. 1000000 ms.

This is because we use wait() on the popen object: https://github.com/OpenRoberta/robertalab-ev3dev/blob/develop/roberta/ev3.py#L242 (see https://docs.python.org/3/library/subprocess.html) We can also poll() the status and terminate() the child if neccesary.

ensonic commented 7 years ago

Depends on rhempel/ev3dev-lang-python#316