From 1bf1b662ee8ed729a67c9bf07d1b184691a86785 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Sun, 14 Jun 2015 17:58:21 +0200 Subject: Read battery on connection. --- ParrotZikTray | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ParrotZikTray b/ParrotZikTray index 07b631a..44a02d1 100755 --- a/ParrotZikTray +++ b/ParrotZikTray @@ -125,6 +125,7 @@ class ParrotZikBaseInterface(object): self.firmware_version.show() self.auto_connection.show() + self.read_battery() self.indicator.info_item.set_label("Connected to: " + self.parrot.friendly_name) self.firmware_version.set_label( @@ -154,6 +155,9 @@ class ParrotZikBaseInterface(object): self.deactivate() def refresh(self): + self.read_battery() + + def read_battery(self): if self.connected: battery_level = self.parrot.battery_level battery_state = self.parrot.battery_state -- cgit v1.2.1