aboutsummaryrefslogtreecommitdiff
path: root/ParrotZikTray
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xParrotZikTray6
1 files changed, 5 insertions, 1 deletions
diff --git a/ParrotZikTray b/ParrotZikTray
index f66de17..6a7ab69 100755
--- a/ParrotZikTray
+++ b/ParrotZikTray
@@ -7,7 +7,7 @@ from SysIndicator import MenuItem
from SysIndicator import Menu
from SysIndicator import SysIndicator
-REFRESH_FREQUENCY = 1000
+REFRESH_FREQUENCY = 30000
RECONNECT_FREQUENCY = 5000
@@ -16,6 +16,9 @@ class repeat(object):
self.f = f
self.id = None
+ def __call__(self, cls):
+ self.f(cls)
+
def start(self, cls, frequency):
if not self.id:
def run():
@@ -65,6 +68,7 @@ class ParrotZikIndicator(SysIndicator):
parrot = ParrotZik.ParrotZik(mac)
if parrot.sock:
self.version_1_interface.activate(parrot)
+ self.autorefresh(self)
self.autorefresh.start(self, REFRESH_FREQUENCY)
self.reconnect.stop()
print "Connected"