diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-14 17:58:21 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-14 17:58:21 +0200 |
commit | 1bf1b662ee8ed729a67c9bf07d1b184691a86785 (patch) | |
tree | 59b10d51be9a920fb52eb309bbf5b583207772b2 /ParrotZikTray | |
parent | f3425cc12cdc5837625ae490ab2302ecfafc0453 (diff) | |
download | pyParrotZikTCP-1bf1b662ee8ed729a67c9bf07d1b184691a86785.tar.xz pyParrotZikTCP-1bf1b662ee8ed729a67c9bf07d1b184691a86785.zip |
Read battery on connection.
Diffstat (limited to '')
-rwxr-xr-x | ParrotZikTray | 4 |
1 files changed, 4 insertions, 0 deletions
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 |