add blinkenlights if phone ringing
git-svn-id: http://www.neo1973-germany.de/svn@149 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
5b8c60044b
commit
2f044ce7d9
1 changed files with 6 additions and 1 deletions
|
@ -16,7 +16,7 @@ FULLSCREEN = True
|
||||||
APP_TITLE = "epydial"
|
APP_TITLE = "epydial"
|
||||||
WM_INFO = ("epydial", "epydial")
|
WM_INFO = ("epydial", "epydial")
|
||||||
|
|
||||||
EDJE_FILE_PATH = "data/themes/default/"
|
EDJE_FILE_PATH = "data/themes/blackwhite/"
|
||||||
|
|
||||||
MAIN_SCREEN_NAME = "pyneo/dialer/main"
|
MAIN_SCREEN_NAME = "pyneo/dialer/main"
|
||||||
INCALL_SCREEN_NAME = "pyneo/dialer/incall"
|
INCALL_SCREEN_NAME = "pyneo/dialer/incall"
|
||||||
|
@ -208,6 +208,8 @@ class PyneoController(object):
|
||||||
try:
|
try:
|
||||||
class_.gsm = object_by_url('dbus:///org/pyneo/GsmDevice')
|
class_.gsm = object_by_url('dbus:///org/pyneo/GsmDevice')
|
||||||
class_.gsm_wireless = object_by_url(class_.gsm.GetDevice('wireless'))
|
class_.gsm_wireless = object_by_url(class_.gsm.GetDevice('wireless'))
|
||||||
|
|
||||||
|
class_.pwr = object_by_url('dbus:///org/pyneo/Power')
|
||||||
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "Pyneo error: " + str(e)
|
print "Pyneo error: " + str(e)
|
||||||
|
@ -226,6 +228,7 @@ class PyneoController(object):
|
||||||
# D-Bus is ready, let's power up GSM
|
# D-Bus is ready, let's power up GSM
|
||||||
class_.power_up_gsm()
|
class_.power_up_gsm()
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def power_up_gsm(class_):
|
def power_up_gsm(class_):
|
||||||
try:
|
try:
|
||||||
|
@ -332,8 +335,10 @@ class PyneoController(object):
|
||||||
ph_status = status['phone_activity_status']
|
ph_status = status['phone_activity_status']
|
||||||
|
|
||||||
if ph_status == 0:
|
if ph_status == 0:
|
||||||
|
class_.pwr.BlinkenLeds("power:blue", 0, 0, 0, dbus_interface=DIN_POWER)
|
||||||
class_.notify_callbacks("gsm_phone_call_end")
|
class_.notify_callbacks("gsm_phone_call_end")
|
||||||
if ph_status == 3:
|
if ph_status == 3:
|
||||||
|
class_.pwr.BlinkenLeds("power:blue", 400, 1300, 0, dbus_interface=DIN_POWER)
|
||||||
class_.notify_callbacks("gsm_phone_ringing")
|
class_.notify_callbacks("gsm_phone_ringing")
|
||||||
if ph_status == 4:
|
if ph_status == 4:
|
||||||
class_.notify_callbacks("gsm_phone_call_start")
|
class_.notify_callbacks("gsm_phone_call_start")
|
||||||
|
|
Loading…
Reference in a new issue