Commit 12785d7c authored by Daniel Kolibár's avatar Daniel Kolibár
Browse files

Update camera.py

parent de264ecf
......@@ -11,8 +11,9 @@ def on_connect(client, userdata, flags, rc):
else:
print(f"Connecting to MQTT broker failed with code {rc}")
def on_message(client, userdata, msg):
def on_message(client, userdata, msg):
messagedecoded = str(msg.payload.decode("utf-8"))
print(messagedecoded)
x = json.loads(messagedecoded, object_hook=lambda d: SimpleNamespace(**d))
print(x)
if str(msg.payload.decode("utf-8")) == 'TAKE_PHOTO':
......
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