Loading Software-hub/ble_driver.py +5 −5 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class ModuleDevice(gatt.Device): def connect_failed(self, error): super().connect_failed(error) print("[%s] Connection failed: %s" % (self.mac_address, str(error))) print("[%s] Connection lost: %s" % (self.mac_address, str(error))) def disconnect_succeeded(self): super().disconnect_succeeded() Loading Loading @@ -97,8 +97,8 @@ class ModuleDevice(gatt.Device): else: print("Failed to fetch values") # DBus is taking its time getting back on disconnect(), which blocks # DBus is taking its time getting back with a reply on self.disconnect(), which blocks # the whole process, so we offload this work to a different process. #os.system("bluetoothctl disconnect %s" % self.mac_address) #subprocess.Popen(["bluetoothctl", "disconnect", self.mac_address], shell=True) subprocess.Popen(["bluetoothctl", "disconnect %s" % self.mac_address], shell=True) # TODO: Find a nicer way of doing this. #self.disconnect() subprocess.Popen(["/usr/bin/bt-device", "--remove=%s" % self.mac_address]) Software-hub/rfid_driver.py +1 −3 Original line number Diff line number Diff line Loading @@ -63,8 +63,6 @@ class RFIDManager(QtCore.QThread): except KeyError: continue if key == u'CRLF': if len(self.rfid_string) == 10: print("RFID: rfid not of len() == 10: %s" % self.rfid_string) self.rfid_received(self.rfid_string) self.rfid_string = "" else: Loading Loading
Software-hub/ble_driver.py +5 −5 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class ModuleDevice(gatt.Device): def connect_failed(self, error): super().connect_failed(error) print("[%s] Connection failed: %s" % (self.mac_address, str(error))) print("[%s] Connection lost: %s" % (self.mac_address, str(error))) def disconnect_succeeded(self): super().disconnect_succeeded() Loading Loading @@ -97,8 +97,8 @@ class ModuleDevice(gatt.Device): else: print("Failed to fetch values") # DBus is taking its time getting back on disconnect(), which blocks # DBus is taking its time getting back with a reply on self.disconnect(), which blocks # the whole process, so we offload this work to a different process. #os.system("bluetoothctl disconnect %s" % self.mac_address) #subprocess.Popen(["bluetoothctl", "disconnect", self.mac_address], shell=True) subprocess.Popen(["bluetoothctl", "disconnect %s" % self.mac_address], shell=True) # TODO: Find a nicer way of doing this. #self.disconnect() subprocess.Popen(["/usr/bin/bt-device", "--remove=%s" % self.mac_address])
Software-hub/rfid_driver.py +1 −3 Original line number Diff line number Diff line Loading @@ -63,8 +63,6 @@ class RFIDManager(QtCore.QThread): except KeyError: continue if key == u'CRLF': if len(self.rfid_string) == 10: print("RFID: rfid not of len() == 10: %s" % self.rfid_string) self.rfid_received(self.rfid_string) self.rfid_string = "" else: Loading