From 277a5143165d2553ce5e97f151cc6b3cea426468 Mon Sep 17 00:00:00 2001 From: rcoh Date: Sat, 29 Jan 2011 21:15:28 -0500 Subject: A couple bits of cleanup to the firefly code --- behaviors/Flasher.py | 12 +++--- config/FireflyDemo.xml | 106 ++----------------------------------------------- 2 files changed, 10 insertions(+), 108 deletions(-) diff --git a/behaviors/Flasher.py b/behaviors/Flasher.py index 4a2dad4..1d79d41 100644 --- a/behaviors/Flasher.py +++ b/behaviors/Flasher.py @@ -1,14 +1,14 @@ -# Implements a pulsing/flashing behavior. -# Jim Salem: jsalem@gmail.com -# -# Args: -# Factor - The speed of flashing. Must be b/w 0 and 1. Default is .95 -# from operationscore.Behavior import * import util.ColorOps as colorops import pdb class Flasher(Behavior): + """Implements a pulsing/flashing behavior. + Jim Salem: jsalem@gmail.com + + Args: + Factor - The speed of flashing. Must be b/w 0 and 1. Default is .95 + """ def processResponse(self, sensorInputs, recursiveInputs): ret = [] for response in sensorInputs: diff --git a/config/FireflyDemo.xml b/config/FireflyDemo.xml index 8008168..856569e 100644 --- a/config/FireflyDemo.xml +++ b/config/FireflyDemo.xml @@ -33,11 +33,9 @@ - renderers/Pygame.xml @@ -67,62 +65,18 @@ 50 - - - inputs/MouseFollower.xml - - behaviors.RandomSetBrightColorBehavior - - setbrightcolor - - - - - behaviors/RandomColor.xml + behaviors.RandomSetBrightColorBehavior - - (255,0,0) - (0,0,255) - - - - - behaviors/PixelDecay.xml - - .5 + setbrightcolor behaviors/PixelDecay.xml - - behaviors/SingleFrame.xml - - - behaviors/PixelDecay.xml - - .01 - - - - behaviors.XYMove - - xymove - 5 - 2 - - behaviors.RestrictLocation @@ -141,24 +95,12 @@ {y}<0 or {y}>200 - - behaviors.BehaviorChain - - movebounce - - xymove - ybounce - xbounce - - - behaviors.Flasher flasher - behaviors.BehaviorChain @@ -167,8 +109,7 @@ randmovement ybounce xbounce - - flasher + flasher @@ -179,12 +120,6 @@ 15 - - behaviors/LoopAndDie.xml - - 80 - - behaviors.RandomWalk @@ -192,17 +127,6 @@ 20 - - - behaviors.ModifyParam - - fadecolor - Sensor - Color - [chan*.98 for chan in {val}] - - - behaviors.BehaviorChain @@ -226,36 +150,14 @@ mover - - behaviors/Accelerate.xml - behaviors.EchoBehavior echo 0 - (90,90,90) + (90,90,90) False - - behaviors.BehaviorChain - - mousechaser - - followmouse - - - echo - square - singleframe - - True - - - - - behaviors/RunningBehavior.xml - -- cgit v1.2.3