example: Wait a bit before ending
feedbackd terminates feedback when clients disconnect from DBus so we need to wait a bit before quitting as otherwise no feedback will be played. Closes: #65
This commit is contained in:
committed by
Guido Gunther
parent
3206976a4a
commit
254bf944eb
@@ -3,9 +3,13 @@
|
||||
# export GI_TYPELIB_PATH=/usr/local/lib/x86_64-linux-gnu/girepository-1.0/
|
||||
|
||||
import gi
|
||||
import time
|
||||
gi.require_version('Lfb', '0.0')
|
||||
from gi.repository import Lfb
|
||||
|
||||
Lfb.init('org.sigxcpu.lfbexample')
|
||||
event = Lfb.Event.new('phone-incoming-call')
|
||||
event.trigger_feedback()
|
||||
# feedbackd terminates feedback from clients that disconnect from DBus to avoid
|
||||
# feedback not being stopped. So wait a bit before quitting:
|
||||
time.sleep(3)
|
||||
|
||||
Reference in New Issue
Block a user