Commit 1b27ecf5 authored by magho's avatar magho

Merge branch 'master' into magho_dev

parents e7f58a0b 0e823eb6
......@@ -65,7 +65,7 @@ class ModuleDevice(gatt.Device):
def connect_failed(self, 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):
......@@ -97,8 +97,8 @@ class ModuleDevice(gatt.Device):
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.
subprocess.Popen(["/usr/bin/bt-device", "--remove=%s" % self.mac_address])
......@@ -63,9 +63,7 @@ class RFIDManager(QtCore.QThread):
except KeyError:
if key == u'CRLF':
if len(self.rfid_string) == 10:
print("RFID: rfid not of len() == 10: %s" % self.rfid_string)
self.rfid_string = ""
self.rfid_string += key
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment