diff options
author | rcoh <rcoh@mit.edu> | 2011-01-28 16:24:41 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-28 16:24:41 -0500 |
commit | 23b8176c9e7fcbcc7fbe45b9840012a91e2f39e0 (patch) | |
tree | bfae320048c9216ffd800cbd49a964f33b55fb4a /behaviors/MoveBehavior.py | |
parent | bd1119e82ff9f4bd8835ed6d3934f156a6da8b23 (diff) | |
parent | 51b0d5f0cd4524a977e0bf48ca6f643d85d05d00 (diff) |
Merge branch 'mobileapp' of github.com:rcoh/SmootLight into fridaydemo
Diffstat (limited to 'behaviors/MoveBehavior.py')
-rw-r--r-- | behaviors/MoveBehavior.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/behaviors/MoveBehavior.py b/behaviors/MoveBehavior.py index e504ca9..6e7fc6a 100644 --- a/behaviors/MoveBehavior.py +++ b/behaviors/MoveBehavior.py @@ -19,12 +19,13 @@ class MoveBehavior(Behavior): currDict = dict(currRecLoc) for sensorInput in sensorInputs: if 'type' in sensorInput and sensorInput['type'] == 1: + currDict['Shake'] = 0 currDict['Location'] = (currDict['Location'][0] - sensorInput['x'] * self['XStep'], \ currDict['Location'][1] + sensorInput['y'] * self['YStep']) currDict['Color'] = [sensorInput['r'], sensorInput['g'], sensorInput['b']] - #elif sensorInput['type'] == 2: - # currDict['Shake'] = 1 - # currDict['Force'] = sensorInput['force'] + elif sensorInput['type'] == 2: + currDict['Shake'] = 1 + #currDict['Force'] = sensorInput['force'] ret.append(currDict) #print ret return (ret, ret) |