aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGravatar Russell Cohen <rcoh@mit.edu>2010-11-26 00:07:14 -0500
committerGravatar Russell Cohen <rcoh@mit.edu>2010-11-26 00:07:14 -0500
commit9c9babfa7032b443138c4b457aabaf79fad385b3 (patch)
treef9bf3e8b51423bf6769d2c655ffa15d81a42333f /config
parent1754a1f4511ef52f0a093dd0f9915196bd4261e7 (diff)
Add PixelMapper functionality to abstract away from mapping locations->Pixels.
Diffstat (limited to 'config')
-rw-r--r--config/.LightInstallationConfig.xml.swpbin20480 -> 0 bytes
-rw-r--r--config/DecayBehavior.params3
-rw-r--r--config/LightInstallationConfig.xml9
-rw-r--r--config/MouseFollowerDemo.xml138
-rw-r--r--config/PixelAssembler.params6
5 files changed, 155 insertions, 1 deletions
diff --git a/config/.LightInstallationConfig.xml.swp b/config/.LightInstallationConfig.xml.swp
deleted file mode 100644
index 05e30ce..0000000
--- a/config/.LightInstallationConfig.xml.swp
+++ /dev/null
Binary files differ
diff --git a/config/DecayBehavior.params b/config/DecayBehavior.params
new file mode 100644
index 0000000..67b7dcf
--- /dev/null
+++ b/config/DecayBehavior.params
@@ -0,0 +1,3 @@
+{'DecayType': 'Decay type missing. Specify Exponential or Proportional.',
+ 'Coefficient':'Coeffienct missing. Coefficient for decay type. E^(-ct) if
+ exponential, c/t if proportional.'}
diff --git a/config/LightInstallationConfig.xml b/config/LightInstallationConfig.xml
index 3f73e0c..713646e 100644
--- a/config/LightInstallationConfig.xml
+++ b/config/LightInstallationConfig.xml
@@ -1,7 +1,6 @@
<!---All configuration items contain a "Class" tag specifying the python class they represent, and an "Args" tag specifying the args to be passed in.-->
<LightInstallation>
<PixelConfiguration>
-
<PixelStrip>
<Class>layouts.ZigzagLayout</Class><!--Name of Layout Class,
imported dynamically via a eval('import ' + name)-->
@@ -35,6 +34,14 @@
</Args>
</PixelStrip>
</PixelConfiguration>
+ <PixelMapperConfiguration>
+ <PixelMapper>
+ <Class>pixelmappers.SimpleMapper</Class>
+ <Args>
+ <Id>simplemap</Id>
+ </Args>
+ </PixelMapper>
+ </PixelMapperConfiguration>
<RendererConfiguration>
<Renderer>
<Class>renderers.PygameRenderer</Class>
diff --git a/config/MouseFollowerDemo.xml b/config/MouseFollowerDemo.xml
new file mode 100644
index 0000000..9e9f6e5
--- /dev/null
+++ b/config/MouseFollowerDemo.xml
@@ -0,0 +1,138 @@
+<!---All configuration items contain a "Class" tag specifying the python class they represent, and an "Args" tag specifying the args to be passed in.-->
+<LightInstallation>
+ <LayoutConfiguration>
+
+ <PixelStrip>
+ <Class>layouts.ZigzagLayout</Class><!--Name of Layout Class,
+ imported dynamically via a eval('import ' + name)-->
+ <Args><!--Any args the layout class needs. This go as
+ elements of a dictionary that gets passed to the Layout machinery-->
+ <Id>strip1</Id>
+ <zigLength>25</zigLength>
+ <zigAxis>X</zigAxis>
+ <yDirection>-1</yDirection>
+ <pixelToPixelSpacing>12</pixelToPixelSpacing>
+ <spacing>12</spacing> <!--we can space at any value less the
+ l2lspacing-->
+ <numPixels>50</numPixels>
+ <originLocation>(10,10)</originLocation>
+ </Args>
+ </PixelStrip>
+ <PixelStrip>
+ <Class>layouts.ZigzagLayout</Class><!--Name of Layout Class,
+ imported dynamically via a eval('import ' + name)-->
+ <Args><!--Any args the layout class needs. This go as
+ elements of a dictionary that gets passed to the Layout machinery-->
+ <Id>strip2</Id>
+ <zigLength>25</zigLength>
+ <zigAxis>X</zigAxis>
+ <yDirection>1</yDirection>
+ <pixelToPixelSpacing>12</pixelToPixelSpacing>
+ <spacing>12</spacing> <!--we can space at any value less the
+ l2lspacing-->
+ <numPixels>50</numPixels>
+ <originLocation>(10,30)</originLocation>
+ </Args>
+ </PixelStrip>
+ </LayoutConfiguration>
+ <RendererConfiguration>
+ <Renderer>
+ <Class>renderers.PygameRenderer</Class>
+ <Args>
+ <displaySize>(1300,50)</displaySize>
+ </Args>
+ </Renderer>
+ <Renderer>
+ <Class>renderers.IndoorRenderer</Class>
+ <Args>
+ <PowerSupply>
+ <IP>10.1.218.72</IP>
+ <PortMapping>{'strip1':1, 'strip2':2}</PortMapping>
+ </PowerSupply>
+ </Args>
+ </Renderer>
+ </RendererConfiguration>
+ <InputConfiguration>
+ <InputElement>
+ <Class>inputs.PygameInput</Class>
+ <Args><!--Passed as a dictionary-->
+ <Id>pygame</Id>
+ <RefreshInterval>100</RefreshInterval>
+ </Args>
+ </InputElement>
+ <InputElement>
+ <Class>inputs.PygameInput</Class>
+ <Args><!--Passed as a dictionary-->
+ <Id>followmouse</Id>
+ <FollowMouse>True</FollowMouse>
+ <RefreshInterval>100</RefreshInterval>
+ </Args>
+ </InputElement>
+ <InputElement>
+ <Class>inputs.UDPInput</Class>
+ <Args>
+ <Id>UDP</Id>
+ <Port>6038</Port>
+ <RefreshInterval>100</RefreshInterval>
+ </Args>
+ </InputElement>
+ </InputConfiguration>
+ <BehaviorConfiguration>
+ <Behavior>
+ <Class>behaviors.EchoBehavior</Class>
+ <Args>
+ <Id>echo</Id>
+ <z-index>0</z-index>
+ <RenderToScreen>False</RenderToScreen>
+ <Inputs>
+ </Inputs>
+ </Args>
+ </Behavior>
+ <Behavior>
+ <Class>behaviors.ColorChangerBehavior</Class>
+ <Args>
+ <Id>color</Id>
+ <z-index>0</z-index>
+ <RenderToScreen>False</RenderToScreen>
+ <Inputs>
+ </Inputs>
+ </Args>
+ </Behavior>
+ <Behavior>
+ <Class>behaviors.DecayBehavior</Class>
+ <Args>
+ <Id>decay</Id>
+ <DecayType>Exponential</DecayType>
+ <Coefficient>.01</Coefficient>
+ <z-index>0</z-index>
+ <RenderToScreen>False</RenderToScreen>
+ <Inputs>
+ </Inputs>
+ </Args>
+ </Behavior>
+ <Behavior>
+ <Class>behaviors.DebugBehavior</Class>
+ <Args>
+ <Id>debug</Id>
+ <z-index>0</z-index>
+ <Inputs>
+ <Id>UDP</Id>
+ </Inputs>
+ </Args>
+ </Behavior>
+ <Behavior>
+ <Class>behaviors.BehaviorChain</Class>
+ <Args>
+ <Inputs>
+ <Id>followmouse</Id>
+ </Inputs>
+ <ChainedBehaviors>
+ <Id>echo</Id>
+ <Id>color</Id>
+ <Id>decay</Id>
+ </ChainedBehaviors>
+ <RenderToScreen>True</RenderToScreen>
+ </Args>
+ </Behavior>
+ </BehaviorConfiguration>
+</LightInstallation>
diff --git a/config/PixelAssembler.params b/config/PixelAssembler.params
new file mode 100644
index 0000000..1b1dee5
--- /dev/null
+++ b/config/PixelAssembler.params
@@ -0,0 +1,6 @@
+{'pixelToPixelSpacing':'pixelToPixel spacing not defined in argDict. This is the
+length of wire between 2 adjacent LEDs. Common values are 4 or 12.
+Specified in config XML.', 'numPixels': 'numPixels not defined in
+argDict. Common value: 50.', 'originLocation':'originLocation not
+defined in argDict. Values should be a string in the form (x,y). This
+should be specified in the config XML.'}