diff options
author | eugue <eug.sun@gmail.com> | 2011-01-12 14:53:35 -0500 |
---|---|---|
committer | eugue <eug.sun@gmail.com> | 2011-01-12 14:53:35 -0500 |
commit | d39f871cf9fcce13c6db315052a4951f692719f9 (patch) | |
tree | 039205bea67395e614f8db622c7f0114b9500e19 | |
parent | 57edac95f928383bfd93da3fad97f4270b71be2d (diff) | |
parent | 7700e6b6c80033b4084beadc2e27164bcfa09166 (diff) |
Merge branch 'master' of github.com:rcoh/SmootLight into mobileapp
-rw-r--r-- | LightInstallation.py | 1 | ||||
-rw-r--r-- | behaviors/AddPixelEvent.py | 4 | ||||
-rw-r--r-- | behaviors/LoopAndDie.xml | 2 | ||||
-rw-r--r-- | config/NoPygame.xml | 125 | ||||
-rw-r--r-- | config/Outdoor.xml | 2 | ||||
-rw-r--r-- | pixelcore/PixelStrip.py | 1 | ||||
-rw-r--r-- | renderers/SixStripUDP.xml | 4 |
7 files changed, 133 insertions, 6 deletions
diff --git a/LightInstallation.py b/LightInstallation.py index b1ad90e..2eb03c9 100644 --- a/LightInstallation.py +++ b/LightInstallation.py @@ -2,7 +2,6 @@ from xml.etree.ElementTree import ElementTree from pixelcore.Screen import * from pixelcore.PixelStrip import * import pdb, sys, time, thread -from pygame.locals import * import util.TimeOps as clock import util.Config as configGetter import util.ComponentRegistry as compReg diff --git a/behaviors/AddPixelEvent.py b/behaviors/AddPixelEvent.py new file mode 100644 index 0000000..bf3cfff --- /dev/null +++ b/behaviors/AddPixelEvent.py @@ -0,0 +1,4 @@ +from operationscore.Behavior import * +class AddPixelEvent(Behavior): + def initBehavior(self): + className = self['Class'] diff --git a/behaviors/LoopAndDie.xml b/behaviors/LoopAndDie.xml index af26562..e2940e4 100644 --- a/behaviors/LoopAndDie.xml +++ b/behaviors/LoopAndDie.xml @@ -1,6 +1,6 @@ <Behavior> <Class>behaviors.RecursiveDecay</Class> <Args> - <InitialResponseCount>70</InitialResponseCount> + <InitialResponseCount>20</InitialResponseCount> </Args> </Behavior> diff --git a/config/NoPygame.xml b/config/NoPygame.xml new file mode 100644 index 0000000..be7849b --- /dev/null +++ b/config/NoPygame.xml @@ -0,0 +1,125 @@ +<!---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> + <InstallationConfiguration> + <Defaults> + <PixelMapper>simplemap</PixelMapper> + </Defaults> + </InstallationConfiguration> + <PixelConfiguration> + <InheritsFrom>layouts/BasicSixStrip.xml</InheritsFrom> + </PixelConfiguration> + <PixelMapperConfiguration> + <PixelMapper> + <Class>pixelmappers.SimpleMapper</Class> + <Args> + <Id>simplemap</Id> + <CutoffDist>20</CutoffDist> + </Args> + </PixelMapper> + <PixelMapper> + <Class>pixelmappers.GaussianMapper</Class> + <Args> + <Id>gaussmap</Id> + <CutoffDist>20</CutoffDist> + <MinWeight>0.01</MinWeight> + <Width>3</Width> + <Height>1</Height> + </Args> + </PixelMapper> + </PixelMapperConfiguration> + <RendererConfiguration> + <Renderer> + <InheritsFrom>renderers/SixStripUDP.xml</InheritsFrom> + </Renderer> + </RendererConfiguration> + <InputConfiguration> + <InputElement> + <Class>inputs.RandomLocs</Class> + <Args> + <Id>randomLoc</Id> + </Args> + </InputElement> + </InputConfiguration> + <BehaviorConfiguration> + <Behavior> + <Class>behaviors.EchoBehavior</Class> + <Args> + <Id>echo</Id> + <z-index>0</z-index> + <RenderToScreen>False</RenderToScreen> + </Args> + </Behavior> + <Behavior Id="colorchange"> + <InheritsFrom>behaviors/RandomColor.xml</InheritsFrom> + </Behavior> + <Behavior Id="decay"> + <InheritsFrom>behaviors/PixelDecay.xml</InheritsFrom> + </Behavior> + <Behavior> + <Class>behaviors.DebugBehavior</Class> + <Args> + <Id>debug</Id> + <z-index>0</z-index> + <Inputs> + </Inputs> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.AllPixelsLeft</Class> + <Args> + <Id>pixelsleft</Id> + </Args> + </Behavior> + <Behavior Id="recursivedecay"> + <InheritsFrom>behaviors/LoopAndDie.xml</InheritsFrom> + <Args> + <InitialResponseCount>200</InitialResponseCount> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Id>runcolordecay</Id> + <Inputs> + <Id>randomLoc</Id> + </Inputs> + <ChainedBehaviors> + <Id>colorchange</Id> + <Id>running</Id> + <Id>decay</Id> + </ChainedBehaviors> + <RecursiveHooks>{'running':'acceleratedie'}</RecursiveHooks> + <RenderToScreen>True</RenderToScreen> + <Mapper>gaussmap</Mapper> + </Args> + </Behavior> + <Behavior Id="accelerate"> + <InheritsFrom>behaviors/Accelerate.xml</InheritsFrom> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Id>acceleratedie</Id> + <ChainedBehaviors> + <Id>accelerate</Id> + <Id>recursivedecay</Id> + </ChainedBehaviors> + </Args> + </Behavior> + <Behavior> + <Class>behaviors.BehaviorChain</Class> + <Args> + <Id>mousechaser</Id> + <ChainedBehaviors> + <Id>echo</Id> + <Id>pixelsleft</Id> + <Id>decay</Id> + </ChainedBehaviors> + <RenderToScreen>True</RenderToScreen> + </Args> + </Behavior> + <Behavior Id="running"> + <InheritsFrom>behaviors/RunningBehavior.xml</InheritsFrom> + </Behavior> + </BehaviorConfiguration> +</LightInstallation> diff --git a/config/Outdoor.xml b/config/Outdoor.xml index f0995b1..9ee0c3a 100644 --- a/config/Outdoor.xml +++ b/config/Outdoor.xml @@ -87,7 +87,7 @@ <Behavior Id="recursivedecay"> <InheritsFrom>behaviors/LoopAndDie.xml</InheritsFrom> <Args> - <InitialResponseCount>2000</InitialResponseCount> + <InitialResponseCount>200</InitialResponseCount> </Args> </Behavior> <Behavior> diff --git a/pixelcore/PixelStrip.py b/pixelcore/PixelStrip.py index fceff8e..662b8fe 100644 --- a/pixelcore/PixelStrip.py +++ b/pixelcore/PixelStrip.py @@ -2,7 +2,6 @@ from pixelcore.Pixel import * import util.Strings as Strings import util.Geo as Geo from pixelevents.StepEvent import * -import pygame import math import pdb #Python class representing a single Pixel strip (usually 50 Pixels) diff --git a/renderers/SixStripUDP.xml b/renderers/SixStripUDP.xml index f3c9e75..04f493b 100644 --- a/renderers/SixStripUDP.xml +++ b/renderers/SixStripUDP.xml @@ -3,11 +3,11 @@ <Args> <Id>indoorRenderer</Id> <PowerSupply> - <IP>10.31.255.233</IP> + <IP>10.32.97.17</IP> <PortMapping>{'strip1':1, 'strip2':2}</PortMapping> </PowerSupply> <PowerSupply> - <IP>10.32.97.17</IP> + <IP>10.31.255.233</IP> <PortMapping>{'strip3':1, 'strip4':2}</PortMapping> </PowerSupply> <PowerSupply> |