Mercurial > code > home > repos > light9
annotate bin/captureDevice @ 2061:a415be4cfac4
timeline gets a launcher for vitejs server
author | drewp@bigasterisk.com |
---|---|
date | Mon, 16 May 2022 01:32:57 -0700 |
parents | 9aa046cc9b33 |
children | 8516a39eedc9 |
rev | line source |
---|---|
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
1 #!bin/python |
1859
f066d6e874db
2to3 with these fixers: all idioms set_literal
drewp@bigasterisk.com
parents:
1858
diff
changeset
|
2 |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
3 from rdflib import URIRef |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
4 from twisted.internet import reactor |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
5 from twisted.internet.defer import inlineCallbacks, Deferred |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
6 |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
7 import logging |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
8 import optparse |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
9 import os |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
10 import time |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
11 import treq |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
12 import cyclone.web, cyclone.websocket, cyclone.httpclient |
2046
9aa046cc9b33
replace greplin with prometheus throughout (untested)
drewp@bigasterisk.com
parents:
1937
diff
changeset
|
13 from light9.metrics import metrics, metricsRoute |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
14 from run_local import log |
1861 | 15 from cycloneerr import PrettyErrorHandler |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
16 |
1585
17da56a3c8df
group device captures into sessions, limit solver to specific ones
Drew Perttula <drewp@bigasterisk.com>
parents:
1584
diff
changeset
|
17 from light9.namespaces import L9, RDF |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
18 from light9 import networking, showconfig |
1692 | 19 from rdfdb.syncedgraph import SyncedGraph |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
20 from light9.paint.capture import writeCaptureDescription |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
21 from light9.effect.settings import DeviceSettings |
1830 | 22 from light9.collector.collector_client import sendToCollector |
1692 | 23 from rdfdb.patch import Patch |
1866
3c523c71da29
pyflakes cleanups and some refactors
Drew Perttula <drewp@bigasterisk.com>
parents:
1861
diff
changeset
|
24 from light9.zmqtransport import parseJsonMessage |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
25 |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
26 |
1858 | 27 |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
28 class Camera(object): |
1858 | 29 |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
30 def __init__(self, imageUrl): |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
31 self.imageUrl = imageUrl |
1858 | 32 |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
33 def takePic(self, uri, writePath): |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
34 log.info('takePic %s', uri) |
1858 | 35 return treq.get( |
36 self.imageUrl).addCallbacks(lambda r: self._done(writePath, r), | |
37 log.error) | |
38 | |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
39 @inlineCallbacks |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
40 def _done(self, writePath, response): |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
41 jpg = yield response.content() |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
42 try: |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
43 os.makedirs(os.path.dirname(writePath)) |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
44 except OSError: |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
45 pass |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
46 with open(writePath, 'w') as out: |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
47 out.write(jpg) |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
48 log.info('wrote %s', writePath) |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
49 |
1858 | 50 |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
51 def deferSleep(sec): |
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
52 d = Deferred() |
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
53 reactor.callLater(sec, d.callback, None) |
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
54 return d |
1858 | 55 |
56 | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
57 class Capture(object): |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
58 firstMoveTime = 3 |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
59 settleTime = .5 |
1858 | 60 |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
61 def __init__(self, graph, dev): |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
62 self.graph = graph |
1585
17da56a3c8df
group device captures into sessions, limit solver to specific ones
Drew Perttula <drewp@bigasterisk.com>
parents:
1584
diff
changeset
|
63 self.dev = dev |
1858 | 64 |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
65 def steps(a, b, n): |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
66 return [round(a + (b - a) * i / n, 5) for i in range(n)] |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
67 |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
68 startTime = time.time() |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
69 self.captureId = 'cap%s' % (int(startTime) - 1495170000) |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
70 self.toGather = [] |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
71 |
1625 | 72 #quantum |
73 rxSteps = steps(.06, .952, 10) | |
74 rySteps = steps(0.1, .77, 5) | |
75 zoomSteps = steps(.12, .85, 3) | |
76 # aura | |
77 rxSteps = steps(0.15, .95, 10) | |
78 rySteps = steps(0, .9, 5) | |
1858 | 79 zoomSteps = steps(.6, .9, 3) |
80 | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
81 row = 0 |
1625 | 82 for ry in rySteps: |
83 xSteps = rxSteps[:] | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
84 if row % 2: |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
85 xSteps.reverse() |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
86 row += 1 |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
87 for rx in xSteps: |
1625 | 88 for zoom in zoomSteps: |
1858 | 89 self.toGather.append( |
90 DeviceSettings( | |
91 graph, | |
92 [ | |
93 (dev, L9['rx'], rx), | |
94 (dev, L9['ry'], ry), | |
95 (dev, L9['color'], '#ffffff'), | |
96 (dev, L9['zoom'], zoom), | |
97 #(dev, L9['focus'], 0.13), | |
98 ])) | |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
99 |
1585
17da56a3c8df
group device captures into sessions, limit solver to specific ones
Drew Perttula <drewp@bigasterisk.com>
parents:
1584
diff
changeset
|
100 self.devTail = dev.rsplit('/')[-1] |
1858 | 101 self.session = URIRef('/'.join( |
102 [showconfig.showUri(), 'capture', self.devTail, self.captureId])) | |
1585
17da56a3c8df
group device captures into sessions, limit solver to specific ones
Drew Perttula <drewp@bigasterisk.com>
parents:
1584
diff
changeset
|
103 self.ctx = URIRef(self.session + '/index') |
1858 | 104 |
105 self.graph.patch( | |
106 Patch(addQuads=[ | |
107 (self.session, RDF.type, L9['CaptureSession'], self.ctx), | |
108 ])) | |
109 | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
110 self.numPics = 0 |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
111 self.settingsCache = set() |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
112 self.step().addErrback(log.error) |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
113 |
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
114 def off(self): |
1858 | 115 return sendToCollector(client='captureDevice', |
116 session='main', | |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
117 settings=DeviceSettings(self.graph, [])) |
1858 | 118 |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
119 @inlineCallbacks |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
120 def step(self): |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
121 if not self.toGather: |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
122 yield self.off() |
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
123 yield deferSleep(1) |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
124 reactor.stop() |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
125 return |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
126 settings = self.toGather.pop() |
1858 | 127 |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
128 log.info('[%s left] move to %r', len(self.toGather), settings) |
1858 | 129 yield sendToCollector(client='captureDevice', |
130 session='main', | |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
131 settings=settings) |
1858 | 132 |
133 yield deferSleep(self.firstMoveTime if self.numPics == | |
134 0 else self.settleTime) | |
135 | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
136 picId = 'pic%s' % self.numPics |
1858 | 137 path = '/'.join(['capture', self.devTail, self.captureId, picId |
138 ]) + '.jpg' | |
1585
17da56a3c8df
group device captures into sessions, limit solver to specific ones
Drew Perttula <drewp@bigasterisk.com>
parents:
1584
diff
changeset
|
139 uri = URIRef(self.session + '/' + picId) |
1858 | 140 |
1584
2239d5648932
captureDevice saves all pics
Drew Perttula <drewp@bigasterisk.com>
parents:
1553
diff
changeset
|
141 yield camera.takePic(uri, os.path.join(showconfig.root(), path)) |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
142 self.numPics += 1 |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
143 |
1585
17da56a3c8df
group device captures into sessions, limit solver to specific ones
Drew Perttula <drewp@bigasterisk.com>
parents:
1584
diff
changeset
|
144 writeCaptureDescription(self.graph, self.ctx, self.session, uri, |
1858 | 145 self.dev, path, self.settingsCache, settings) |
146 | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
147 reactor.callLater(0, self.step) |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
148 |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
149 |
1858 | 150 camera = Camera( |
151 'http://plus:8200/picamserve/pic?res=1080&resize=800&iso=800&redgain=1.6&bluegain=1.6&shutter=60000&x=0&w=1&y=0&h=.952' | |
152 ) | |
153 | |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
154 |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
155 class Attrs(PrettyErrorHandler, cyclone.web.RequestHandler): |
1858 | 156 |
2046
9aa046cc9b33
replace greplin with prometheus throughout (untested)
drewp@bigasterisk.com
parents:
1937
diff
changeset
|
157 @metrics('set_attr').time() |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
158 def put(self): |
2046
9aa046cc9b33
replace greplin with prometheus throughout (untested)
drewp@bigasterisk.com
parents:
1937
diff
changeset
|
159 client, clientSession, settings, sendTime = parseJsonMessage( |
9aa046cc9b33
replace greplin with prometheus throughout (untested)
drewp@bigasterisk.com
parents:
1937
diff
changeset
|
160 self.request.body) |
9aa046cc9b33
replace greplin with prometheus throughout (untested)
drewp@bigasterisk.com
parents:
1937
diff
changeset
|
161 self.set_status(202) |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
162 |
1858 | 163 |
1552
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
164 def launch(graph): |
0aad247a1168
refactor and fix captureDevice
Drew Perttula <drewp@bigasterisk.com>
parents:
1544
diff
changeset
|
165 |
1625 | 166 cap = Capture(graph, dev=L9['device/aura5']) |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
167 reactor.listenTCP(networking.captureDevice.port, |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
168 cyclone.web.Application(handlers=[ |
1858 | 169 (r'/()', cyclone.web.StaticFileHandler, { |
170 "path": "light9/web", | |
171 "default_filename": "captureDevice.html" | |
172 }), | |
2046
9aa046cc9b33
replace greplin with prometheus throughout (untested)
drewp@bigasterisk.com
parents:
1937
diff
changeset
|
173 metricsRoute(), |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
174 ]), |
1866
3c523c71da29
pyflakes cleanups and some refactors
Drew Perttula <drewp@bigasterisk.com>
parents:
1861
diff
changeset
|
175 interface='::', |
3c523c71da29
pyflakes cleanups and some refactors
Drew Perttula <drewp@bigasterisk.com>
parents:
1861
diff
changeset
|
176 cap=cap) |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
177 log.info('serving http on %s', networking.captureDevice.port) |
1858 | 178 |
179 | |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
180 def main(): |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
181 parser = optparse.OptionParser() |
1858 | 182 parser.add_option("-v", |
183 "--verbose", | |
184 action="store_true", | |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
185 help="logging.DEBUG") |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
186 (options, args) = parser.parse_args() |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
187 log.setLevel(logging.DEBUG if options.verbose else logging.INFO) |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
188 |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
189 graph = SyncedGraph(networking.rdfdb.url, "captureDevice") |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
190 |
1858 | 191 graph.initiallySynced.addCallback(lambda _: launch(graph)).addErrback( |
192 log.error) | |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
193 reactor.run() |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
194 |
1858 | 195 |
1544
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
196 if __name__ == '__main__': |
fc5675f5b756
captureDevice tool for sweeping through light settings and grabbing pics
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
197 main() |