mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-15 03:08:50 +01:00
bluetooth
This commit is contained in:
parent
a3b07ecadd
commit
cef6e9622e
@ -469,6 +469,16 @@ class BluetoothPage(Page):
|
|||||||
def CheckIfBluetoothConnecting(self):
|
def CheckIfBluetoothConnecting(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def RefreshDevices(self):
|
||||||
|
global devices
|
||||||
|
proxy_obj = bus.get_object("org.bluez", "/")
|
||||||
|
manager = dbus.Interface(proxy_obj,"org.freedesktop.DBus.ObjectManager")
|
||||||
|
objects = manager.GetManagedObjects()
|
||||||
|
for path, interfaces in objects.iteritems():
|
||||||
|
if "org.bluez.Device1" in interfaces:
|
||||||
|
devices[path] = interfaces["org.bluez.Device1"] ## like /org/bluez/hci0/dev_xx_xx_xx_yy_yy_yy
|
||||||
|
|
||||||
|
|
||||||
def GenNetworkList(self):
|
def GenNetworkList(self):
|
||||||
self._WirelessList = []
|
self._WirelessList = []
|
||||||
start_x = 0
|
start_x = 0
|
||||||
@ -514,6 +524,8 @@ class BluetoothPage(Page):
|
|||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
def OnLoadCb(self):
|
def OnLoadCb(self):
|
||||||
|
self.RefreshDevices()
|
||||||
|
|
||||||
self.GenNetworkList()
|
self.GenNetworkList()
|
||||||
|
|
||||||
def ScrollUp(self):
|
def ScrollUp(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user