2016-10-08 16:51:12 +02:00
|
|
|
import drivers.camera as camera
|
2016-10-08 16:32:48 +02:00
|
|
|
import requests
|
|
|
|
|
import config
|
|
|
|
|
|
|
|
|
|
picture_base64 = camera.get_transfer_picture_base64()
|
|
|
|
|
if picture_base64 is not None:
|
|
|
|
|
camera.remove_transfer_picture()
|
|
|
|
|
|
|
|
|
|
controller_id = config.CONTROLLER_ID
|
|
|
|
|
owner = "Controller: %s" % controller_id
|
|
|
|
|
|
|
|
|
|
response = requests.post(config.PICTURE_URL + '/' + controller_id, json={
|
|
|
|
|
"picture_base64": picture_base64
|
|
|
|
|
})
|
2016-10-08 17:16:36 +02:00
|
|
|
|
2016-10-08 17:32:21 +02:00
|
|
|
print response
|
|
|
|
|
print picture_base64 is not None
|