From 2f044ce7d91fd3b832f79c62c25ea82214468ee6 Mon Sep 17 00:00:00 2001 From: fgau Date: Mon, 15 Sep 2008 17:51:27 +0000 Subject: [PATCH] add blinkenlights if phone ringing git-svn-id: http://www.neo1973-germany.de/svn@149 46df4e5c-bc4e-4628-a0fc-830ba316316d --- epydial/epydial.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/epydial/epydial.py b/epydial/epydial.py index fc90c0b..b179cf2 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -16,7 +16,7 @@ FULLSCREEN = True APP_TITLE = "epydial" WM_INFO = ("epydial", "epydial") -EDJE_FILE_PATH = "data/themes/default/" +EDJE_FILE_PATH = "data/themes/blackwhite/" MAIN_SCREEN_NAME = "pyneo/dialer/main" INCALL_SCREEN_NAME = "pyneo/dialer/incall" @@ -208,6 +208,8 @@ class PyneoController(object): try: class_.gsm = object_by_url('dbus:///org/pyneo/GsmDevice') class_.gsm_wireless = object_by_url(class_.gsm.GetDevice('wireless')) + + class_.pwr = object_by_url('dbus:///org/pyneo/Power') except Exception, e: print "Pyneo error: " + str(e) @@ -226,6 +228,7 @@ class PyneoController(object): # D-Bus is ready, let's power up GSM class_.power_up_gsm() + @classmethod def power_up_gsm(class_): try: @@ -332,8 +335,10 @@ class PyneoController(object): ph_status = status['phone_activity_status'] if ph_status == 0: + class_.pwr.BlinkenLeds("power:blue", 0, 0, 0, dbus_interface=DIN_POWER) class_.notify_callbacks("gsm_phone_call_end") if ph_status == 3: + class_.pwr.BlinkenLeds("power:blue", 400, 1300, 0, dbus_interface=DIN_POWER) class_.notify_callbacks("gsm_phone_ringing") if ph_status == 4: class_.notify_callbacks("gsm_phone_call_start")