Commit 0e564061 authored by Daniel Kolibár's avatar Daniel Kolibár
Browse files

Update camera.py

parent 8715eb73
......@@ -15,8 +15,8 @@ def on_connect(client, userdata, flags, rc):
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)
y = json.loads(messagedecoded)
print(y)
if str(msg.payload.decode("utf-8")) == 'TAKE_PHOTO':
print('taking photo!')
photo = io.BytesIO()
......
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