Commit 1b27ecf5 authored by magho's avatar magho
Browse files

Merge branch 'master' into magho_dev

parents e7f58a0b 0e823eb6
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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()
@@ -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])
+1 −3
Original line number Diff line number Diff line
@@ -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: