mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
removed in /move
This commit is contained in:
@@ -53,13 +53,6 @@ def move():
|
|||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
direction = data.get("direction")
|
direction = data.get("direction")
|
||||||
|
|
||||||
# Haal databaseverbinding op
|
|
||||||
db = get_db()
|
|
||||||
cursor = db.cursor()
|
|
||||||
cursor.execute("INSERT INTO command VALUES (%s)", (direction,))
|
|
||||||
db.commit()
|
|
||||||
cursor.close()
|
|
||||||
|
|
||||||
# Verstuur de richting via MQTT
|
# Verstuur de richting via MQTT
|
||||||
if direction:
|
if direction:
|
||||||
mqtt_client.publish("home/commands", direction)
|
mqtt_client.publish("home/commands", direction)
|
||||||
|
Reference in New Issue
Block a user