mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 10:18:51 +01:00
bluetooth scan foot nav
This commit is contained in:
parent
c7b1fbb30d
commit
b464c84277
@ -428,7 +428,7 @@ class BluetoothPage(Page):
|
|||||||
|
|
||||||
def DbusPropertiesChanged(self, interface, changed, invalidated, path):
|
def DbusPropertiesChanged(self, interface, changed, invalidated, path):
|
||||||
global devices
|
global devices
|
||||||
|
print("DbusPropertiesChanged")
|
||||||
if interface != "org.bluez.Device1":
|
if interface != "org.bluez.Device1":
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -448,7 +448,11 @@ class BluetoothPage(Page):
|
|||||||
|
|
||||||
self._Devices = devices
|
self._Devices = devices
|
||||||
self.print_normal(address, devices[path])
|
self.print_normal(address, devices[path])
|
||||||
|
|
||||||
|
self.GenNetworkList()
|
||||||
|
self._Screen.Draw()
|
||||||
|
self._Screen.SwapAndShow()
|
||||||
|
|
||||||
def ShutDownConnecting(self):
|
def ShutDownConnecting(self):
|
||||||
print("Shutdownconnecting...")
|
print("Shutdownconnecting...")
|
||||||
|
|
||||||
@ -487,12 +491,14 @@ class BluetoothPage(Page):
|
|||||||
|
|
||||||
self._Scanning = True
|
self._Scanning = True
|
||||||
self.ShowBox("Bluetooth scanning...")
|
self.ShowBox("Bluetooth scanning...")
|
||||||
|
self._Screen._FootBar.UpdateNavText("bluetooth scanning")
|
||||||
|
|
||||||
proxy_obj = self._Dbus.get_object("org.bluez", "/org/bluez/" + self._ADAPTER_DEV)
|
proxy_obj = self._Dbus.get_object("org.bluez", "/org/bluez/" + self._ADAPTER_DEV)
|
||||||
adapter_props = dbus.Interface(proxy_obj,"org.freedesktop.DBus.Properties")
|
adapter_props = dbus.Interface(proxy_obj,"org.freedesktop.DBus.Properties")
|
||||||
discoverying = adapter_props.Get("org.bluez.Adapter1", "Discovering")
|
discoverying = adapter_props.Get("org.bluez.Adapter1", "Discovering")
|
||||||
print(discoverying)
|
print(discoverying)
|
||||||
|
|
||||||
|
|
||||||
if self._Adapter!= None:
|
if self._Adapter!= None:
|
||||||
try:
|
try:
|
||||||
self._Adapter.StopDiscovery()
|
self._Adapter.StopDiscovery()
|
||||||
@ -545,7 +551,9 @@ class BluetoothPage(Page):
|
|||||||
self.ReturnToUpLevelPage()
|
self.ReturnToUpLevelPage()
|
||||||
self._Screen.Draw()
|
self._Screen.Draw()
|
||||||
self._Screen.SwapAndShow()
|
self._Screen.SwapAndShow()
|
||||||
|
|
||||||
|
self._Screen._FootBar.ResetNavText()
|
||||||
|
|
||||||
if event.key == CurKeys["Up"]:
|
if event.key == CurKeys["Up"]:
|
||||||
self.ScrollUp()
|
self.ScrollUp()
|
||||||
self._Screen.Draw()
|
self._Screen.Draw()
|
||||||
|
|||||||
@ -103,6 +103,7 @@ class FootBar:
|
|||||||
self._Icons["nav"]._Label.SetText("Nav.")
|
self._Icons["nav"]._Label.SetText("Nav.")
|
||||||
self._State = "normal"
|
self._State = "normal"
|
||||||
self.Draw()
|
self.Draw()
|
||||||
|
return False
|
||||||
|
|
||||||
def UpdateNavText(self,texts):
|
def UpdateNavText(self,texts):
|
||||||
self._State = "tips"
|
self._State = "tips"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user