Skip to content
Snippets Groups Projects
Commit 484ba7bd authored by Adrien Chabod's avatar Adrien Chabod
Browse files

Test

parent 3f2f743d
Branches
No related tags found
1 merge request!1MAJ BDD + Data commande fonctionnel
......@@ -194,7 +194,6 @@ class BLE_MACHINE_SEND_ORDER(RxCharacteristic):
data = unformalize_data_list(format(bytearray(value).decode()))
commande = mysql_get_composition_for_machine(data)
print(commande)
#print(format(bytearray(value).decode()))
def main():
global mainloop
......
......@@ -96,7 +96,7 @@ def mysql_get_composition_for_machine(commande: tuple):
cursor = connection.cursor()
for k in commande:
cursor.execute("SELECT machine.id_bec, quantite FROM ingredient INNER JOIN machine ON ingredient.id_bec = machine.id_bec WHERE ingredient.id_ingredient = %s", (k[1],))
data.append(cursor.fetchall())
data+=cursor.fetchall()
cursor.close()
connection.close()
return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment