Revert "base: once the device is registered, we're done"
This broke device initialization in some cases (not sure why it worked until
today though). Where a device is in register mode but the ManufacturerData has
not yet updated to the 4-byte string (i.e. a device previously known
normally), the device would now always call listen(). The firmware - in
register mode - would start initializing the connection though and get
rejected, leaving us with a device that cannot be registered.
This reverts commit a061240b11
.
This commit is contained in:
parent
48a339c3b7
commit
498a867558
|
@ -385,11 +385,11 @@ class Tuhi(GObject.Object):
|
|||
|
||||
d = self.devices[bluez_device.address]
|
||||
|
||||
if d.mode == DeviceMode.LISTEN or d.listening:
|
||||
d.listen()
|
||||
else:
|
||||
if mode == DeviceMode.REGISTER:
|
||||
d.mode = mode
|
||||
logger.debug(f'{bluez_device.objpath}: call Register() on device')
|
||||
elif d.listening:
|
||||
d.listen()
|
||||
|
||||
def _on_bluez_device_updated(self, manager, bluez_device):
|
||||
self._add_device(manager, bluez_device, True)
|
||||
|
|
Loading…
Reference in New Issue