mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 20:35:00 +00:00
python merge fix
This commit is contained in:
@@ -49,18 +49,6 @@ def on_message(client, userdata, message):
|
||||
cv2.rectangle(processed_image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
||||
cv2.putText(processed_image, f"{class_name} {box.conf.item():.2f}", (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 255, 0), 2)
|
||||
|
||||
|
||||
# Globale MQTT setup
|
||||
def on_message(client,userdata, message):
|
||||
global kobuki_message, latest_image
|
||||
if message.topic == "kobuki/data":
|
||||
kobuki_message = str(message.payload.decode("utf-8"))
|
||||
with app.app_context():
|
||||
sensor_data(kobuki_message) # Sla de data op in de database
|
||||
elif message.topic == "kobuki/cam":
|
||||
latest_image = message.payload
|
||||
|
||||
|
||||
# Create an MQTT client instance
|
||||
mqtt_client = mqtt.Client()
|
||||
mqtt_client.username_pw_set("server", "serverwachtwoordofzo")
|
||||
|
Reference in New Issue
Block a user