]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_lamp/commitdiff
lamp/example: tweak touch UI, improve dox
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Sun, 16 Oct 2016 16:21:10 +0000 (12:21 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Sun, 16 Oct 2016 16:21:10 +0000 (12:21 -0400)
README.rst
lamp-touch.lua

index de80ae5697f7e30cefbd648a3ac2ac113a65997b..69a074ac293f30ef1a5e21172e540ecf996f3ed1 100644 (file)
@@ -94,8 +94,11 @@ At present, there are four used touch channels:
 
 * A "blackout" button, which disables drawing to the display and any other
   user interaction until touched again.  This button may be toggled at most
-  once per touch interaction; once toggled, the user must allow the touch
-  handler to timeout.  This provides a crude "debounce" facility and allows
+  once per touch; once toggled, the system will not toggle blackout again
+  until the touch sensor has been untouched for a timeout (see
+  ``touch_db_blackout``).
+  
+  This provides a crude "debounce" facility and allows
   for things like moving the lamp to a new surface (with new conductive
   properties) by gripping it in a way that touches this sensor and holding
   it on the new surface for some seconds to allow the CAP1188 to
@@ -105,8 +108,13 @@ At present, there are four used touch channels:
   and, if both are active, the wheel advances "slowly".
 
 * A shape selector toggle.  This advances through the collections of
-  drawings enumerated at the beginning of a touch event.  Each separate
-  interaction will reload the list for ease of development.
+  drawings enumerated at the beginning of a touch event.  This interaction
+  is rate-limited, so that holding the button will only slowly advance
+  through the space of drawings (see ``touch_db_fn``).  Note that releasing
+  the button immediately clears the timeout, unlike blackout above.
+  
+  Each separate touch interaction will reload the list for ease of
+  development.
 
 Notes
 #####
index 75f56d3737535cd684db02277cc810c090b32cf2..d56a9cd62545e73b8f66379e25d40813a5c82773 100644 (file)
@@ -123,6 +123,7 @@ local function ontouch()
        touch_db_fn = tq:queue(200,onfndebounce)
       end
       claimfb()
+    elseif touch_db_fn then tq:dequeue(touch_db_fn); touch_db_fn = nil
     end
   end