Compare commits

..

No commits in common. "546795c2b6939c7f02215cb09fa864883c7d1b95" and "f57dfcfaf7ded8469510bff92de380b6079905a0" have entirely different histories.

3 changed files with 3 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
camera.json
__pycache__

View File

@ -76,10 +76,10 @@ class ControlQueue:
self._worker = threading.Thread(target=self.worker)
self._worker.start()
def put(self, command):
def put(self, filename):
if self.q.empty():
self.camera.abort = False
self.q.put(command)
self.q.put(filename)
def join(self):
self.shutdown = True
@ -120,18 +120,6 @@ class API(object):
json.dump(data, fd, indent=4)
return result
def move(self, **data):
result = {}
if data.get('direction') in (
'LEFT', 'RIGHT', 'UP', 'DOWN',
'LEFT_UP', 'LEFT_DOWN',
'RIGHT_UP', 'RIGHT_DOWN',
'IN', 'OUT',
):
direction = getattr(ctl.camera, data['direction'])
ctl.camera.momentary(direction, float(data.get('duration', 1)))
return result
def stop(self, **data):
result = {}
ctl.camera.abort = True
@ -220,7 +208,6 @@ def main():
'gzip': True,
}
app = Application(handlers, **options)
print('listening on http://%s:%s/' % (ADDRESS, PORT))
app.listen(PORT, ADDRESS)
main = IOLoop.instance()

View File

@ -662,4 +662,5 @@ function init_shift() {
updateShiftStatus()
setInterval(updateShiftStatus, 5000)
})
}