diff org/touch.org @ 188:22548d48cc85

added debug for vision
author Robert McIntyre <rlm@mit.edu>
date Sat, 04 Feb 2012 10:00:37 -0700
parents 6142e85f5825
children facc2ef3fe5c
line wrap: on
line diff
     1.1 --- a/org/touch.org	Sat Feb 04 09:42:19 2012 -0700
     1.2 +++ b/org/touch.org	Sat Feb 04 10:00:37 2012 -0700
     1.3 @@ -300,15 +300,10 @@
     1.4          (filter #(isa? (class %) Geometry)
     1.5                  (node-seq creature)))))
     1.6  
     1.7 -(defn gray
     1.8 -  "Create a gray RGB pixel with R, G, and B set to 'num"
     1.9 -  [num]
    1.10 -  (+ num
    1.11 -     (bit-shift-left num 8)
    1.12 -     (bit-shift-left num 16)))
    1.13 -
    1.14 -(defvar
    1.15 -  view-touch 
    1.16 +(defn view-touch 
    1.17 +  "Creates a function which accepts touch sensor-data and displays it
    1.18 +   to the screen."
    1.19 +  []
    1.20    (view-sense
    1.21     (fn 
    1.22       [[coords sensor-data]]
    1.23 @@ -317,9 +312,7 @@
    1.24          (for [i (range (count coords))]
    1.25            (.setRGB image ((coords i) 0) ((coords i) 1)
    1.26                     (gray (sensor-data i)))))
    1.27 -       image)))
    1.28 -  "Creates a function which accepts touch sensor-data and displays it
    1.29 -   as BufferedImages in JFrames.")
    1.30 +       image))))
    1.31   
    1.32  
    1.33  #+end_src