Author: simplet Date: 2008-11-30 20:11:12 +0100 (Sun, 30 Nov 2008) New Revision: 2942
Added: software_suite_v2/software/scripts/ThunderBird_DBUS/eyesOff.py Modified: software_suite_v2/software/scripts/ThunderBird_DBUS/AlerteEmailDbusThunderbird_2.py software_suite_v2/software/scripts/ThunderBird_DBUS/readEmail.py Log: * Added visual indicator (right led) * Added a script to turns leds off. Modified: software_suite_v2/software/scripts/ThunderBird_DBUS/AlerteEmailDbusThunderbird_2.py =================================================================== --- software_suite_v2/software/scripts/ThunderBird_DBUS/AlerteEmailDbusThunderbird_2.py 2008-11-30 18:09:27 UTC (rev 2941) +++ software_suite_v2/software/scripts/ThunderBird_DBUS/AlerteEmailDbusThunderbird_2.py 2008-11-30 19:11:12 UTC (rev 2942) @@ -5,8 +5,8 @@ Author: Simplet <simplet _at_ ptigeek _dot_ net> -This script runs in the backgorund and monitor DBUS messages DBUS sent -by the thunderbird extension "DBUS Thunderbird" when an new mail comes in. +This script runs in the background and monitor DBUS messages sent +by the thunderbird extension "DBUS Thunderbird", when an new mail comes in. Thunderbid DBUS extension can be downloaded here : http://www.mumbles-project.org/wp-content/uploads/2007/08/thunderbird_dbus.xpi @@ -15,7 +15,10 @@ To make TUX read the email, I use another little script (ReadEmail.py) because if I read it inside the DBUS loop, it disconnect the TUX (timeout). +I also use a little script that puts both leds off (because right led stays ON +as a visual indicator if a new mail comes in). + TODO ===== - Add an attitune or WAV before reading the email Added: software_suite_v2/software/scripts/ThunderBird_DBUS/eyesOff.py =================================================================== --- software_suite_v2/software/scripts/ThunderBird_DBUS/eyesOff.py (rev 0) +++ software_suite_v2/software/scripts/ThunderBird_DBUS/eyesOff.py 2008-11-30 19:11:12 UTC (rev 2942) @@ -0,0 +1,39 @@ +#!/usr/bin/python +# -*- coding: latin1 -*- + +""" + + This script put both leds OFF. + + It is used to reset the "email not read" state. + + Author: Simplet <simplet _at_ ptigeek _dot_ net> + +""" + +__author__ = 'Simplet <simplet _at_ ptigeek _dot_ net>' +__appname__ = 'Thunderbird DBUS script (EyesOff part)' +__version__ = '0.0.1' +__date__ = '2008/11/30' +__license__ = 'GPL' + + +import os +import sys +import time + +from tuxisalive.api import * + + +tux = TuxAPI('192.168.1.5', 270) +tux.server.autoConnect(CLIENT_LEVEL_RESTRICTED, 'ThunderbirdDBUSEyesOff', 'NONE') +tux.server.waitConnected(10.0) +tux.dongle.waitConnected(10.0) +tux.radio.waitConnected(10.0) +if tux.access.waitAcquire(10.0, ACCESS_PRIORITY_NORMAL): + + tux.led.both.off() + +tux.access.release() +tux.server.disconnect() +tux.destroy() Property changes on: software_suite_v2/software/scripts/ThunderBird_DBUS/eyesOff.py ___________________________________________________________________ Name: svn:executable + * Modified: software_suite_v2/software/scripts/ThunderBird_DBUS/readEmail.py =================================================================== --- software_suite_v2/software/scripts/ThunderBird_DBUS/readEmail.py 2008-11-30 18:09:27 UTC (rev 2941) +++ software_suite_v2/software/scripts/ThunderBird_DBUS/readEmail.py 2008-11-30 19:11:12 UTC (rev 2942) @@ -18,6 +18,7 @@ import os import sys +import time from tuxisalive.api import * @@ -26,10 +27,12 @@ def SayThat(text): tux.led.both.blinkAsync(4,25, LFX_FADE) tux.soundFlash.play(16) + time.sleep(1) text = unicode(text, "UTF8") text = text.encode("latin1") tux.tts.speak(text, "Julie", 100) tux.led.both.off() + tux.led.right.on() tux = TuxAPI('192.168.1.5', 270) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Tux-droid-svn mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tux-droid-svn
