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