aboutsummaryrefslogtreecommitdiff
path: root/renderers
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-22 14:27:33 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-22 14:27:33 -0500
commitc581408f028d5b8ceadc53c68d7c1252fbe09e6d (patch)
tree8724862d05bde3bb3427cdff378cdb08da8babd2 /renderers
parenta1d9b85320c9b07d62470d78ef0c5f9015baf813 (diff)
About halfway done with support for pixel regions. Modified the component registry a bit. Added
support for multiple pixel mappers (and along with that, default components). RCOH
Diffstat (limited to 'renderers')
-rw-r--r--renderers/IndoorRenderer.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/renderers/IndoorRenderer.py b/renderers/IndoorRenderer.py
index 2eac162..c13d11f 100644
--- a/renderers/IndoorRenderer.py
+++ b/renderers/IndoorRenderer.py
@@ -20,12 +20,15 @@ class IndoorRenderer(Renderer):
self.stripLocations[stripId] = (ip, \
stripsInPowerSupply[stripId])
def render(self, lightSystem):
- for pixelStrip in lightSystem.pixelStrips:
- stripId = pixelStrip.argDict['Id']
- (ip, port) = self.stripLocations[stripId]
- if not ip in self.sockets: #do we have a socket to this
- #strip? if not, spin off a new one
- self.sockets[ip] = network.getConnectedSocket(ip,port)
- packet = composer.composePixelStripPacket(pixelStrip, port)
- self.sockets[ip].send(packet, 0x00)
+ try:
+ for pixelStrip in lightSystem.pixelStrips:
+ stripId = pixelStrip.argDict['Id']
+ (ip, port) = self.stripLocations[stripId]
+ if not ip in self.sockets: #do we have a socket to this
+ #strip? if not, spin off a new one
+ self.sockets[ip] = network.getConnectedSocket(ip,port)
+ packet = composer.composePixelStripPacket(pixelStrip, port)
+ self.sockets[ip].send(packet, 0x00)
+ except:
+ pass #Rendering error. Log it. LOG