picture controller scripts ready
This commit is contained in:
16
controller/camera_send.py
Normal file
16
controller/camera_send.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import camera
|
||||
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={
|
||||
"owner": owner,
|
||||
"controllerId": controller_id,
|
||||
"picture_base64": picture_base64
|
||||
})
|
||||
Reference in New Issue
Block a user