Main Page
Namespaces
Classes
Files
File List
File Members
src
TelloPy
tests
tello_qt
thread_qt.py
Go to the documentation of this file.
1
import
sys
2
import
time
3
from
PyQt5.QtCore
import
QThread, pyqtSignal, pyqtSlot
4
import
wifi
5
6
7
class
WifiThread
(QThread):
8
updated = pyqtSignal()
9
10
def
__init__
(self):
11
QThread.__init__(self)
12
self.
wifi_device_name
=
'unknown'
13
self.
wifi_status
=
'unknown'
14
self.
wifi_active
=
False
15
self.
wifi_ssid
=
'unknown'
16
17
def
__del__
(self):
18
self.wait()
19
20
def
update
(self):
21
self.
wifi_device_name
=
wifi.get_device_name
()
22
self.
wifi_status
=
wifi.get_status
()
23
self.
wifi_active
=
True
if
self.
wifi_status
==
'active'
else
False
24
self.
wifi_ssid
= (
wifi.get_ssid
()
if
self.
wifi_active
else
'-'
)
25
self.updated.emit()
26
27
def
run
(self):
28
self.
update
()
29
while
True
:
30
wifi.wait
()
31
self.
update
()
32
self.sleep(1)
thread_qt.WifiThread.__del__
def __del__(self)
Definition:
thread_qt.py:17
thread_qt.WifiThread.run
def run(self)
Definition:
thread_qt.py:27
thread_qt.WifiThread.wifi_ssid
wifi_ssid
Definition:
thread_qt.py:15
thread_qt.WifiThread.wifi_status
wifi_status
Definition:
thread_qt.py:13
wifi.get_status
def get_status(device_name=get_device_name())
Definition:
wifi.py:26
thread_qt.WifiThread.wifi_device_name
wifi_device_name
Definition:
thread_qt.py:12
thread_qt.WifiThread.update
def update(self)
Definition:
thread_qt.py:20
wifi.wait
def wait()
Definition:
wifi.py:60
thread_qt.WifiThread.__init__
def __init__(self)
Definition:
thread_qt.py:10
thread_qt.WifiThread
Definition:
thread_qt.py:7
thread_qt.WifiThread.wifi_active
wifi_active
Definition:
thread_qt.py:14
wifi.get_device_name
def get_device_name()
Definition:
wifi.py:6
wifi.get_ssid
def get_ssid(device_name=get_device_name())
Definition:
wifi.py:44
tello_driver
Author(s): Jordy van Appeven
autogenerated on Wed May 13 2020 03:34:54