Skip to content
Snippets Groups Projects
Commit 6ae8d0f9 authored by MAUGEZ Emeline's avatar MAUGEZ Emeline
Browse files

bug encodage

parent 334a54ba
No related branches found
No related tags found
1 merge request!1MAJ BDD + Data commande fonctionnel
......@@ -60,7 +60,11 @@ class TxCharacteristic(Characteristic):
value = []
print(s)
for c in s:
value.append(dbus.Byte(c.encode()))
c_encode = c.encode()
if len(c_encode)>1:
c_encode = "-".encode()
print("Caractere ne passant pas l'encodage : ", c)
value.append(dbus.Byte(c_encode))
self.PropertiesChanged(GATT_CHRC_IFACE, {'Value': value}, [])
def StartNotify(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment