Laser Sensing Display for UI interfaces in the real world

Dependencies:   mbed

Fork of skinGames_forktest by Alvaro Cassinelli

Revision:
31:5f039cbddee8
Parent:
30:d8af03f01cd4
Child:
32:52273c3291fe
--- a/main.cpp	Fri Sep 21 10:02:35 2012 +0000
+++ b/main.cpp	Sun Sep 23 10:11:43 2012 +0000
@@ -420,21 +420,55 @@
             // timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThreadONEBLOBONLY, RENDER_INTERVAL);
         }
     }
-
-    else if (!strcmp(address[0], "pac_man")) {
+    
+ else if (!strcmp(address[0], "fish_net")) {
         int value=data[0];
         if (value!=-1) { // otherwise do nothing, this is a reception error (there was no data)
 
             timerForRendering.detach();
             
+            blobconf.initConfig(FISH_NET_GAME, value); // value is the nb of spots instantiated
+            
+            lsr.setConfigToRender(&blobconf);
+            timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThread, RENDER_INTERVAL);
+            // timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThreadONEBLOBONLY, RENDER_INTERVAL);
+        }
+    }
+
+
+    else if (!strcmp(address[0], "vertical_pinball")) {
+           int value=data[0];
+        if (value!=-1) { // otherwise do nothing, this is a reception error (there was no data)
+
+            timerForRendering.detach();
+            
+            blobconf.initConfig(VERTICAL_PINBALL_GAME, value); 
+            
+            lsr.setConfigToRender(&blobconf);
+            timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThread, RENDER_INTERVAL);
+            // timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThreadONEBLOBONLY, RENDER_INTERVAL);
+    }
+    }
+    
+      else if (!strcmp(address[0], "pac_man")) {
+            timerForRendering.detach();
+            
             blobconf.initConfig(PAC_MAN_GAME); 
             
             lsr.setConfigToRender(&blobconf);
             timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThread, RENDER_INTERVAL);
             // timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThreadONEBLOBONLY, RENDER_INTERVAL);
-        }
     }
 
+   else if (!strcmp(address[0], "spot_tracking")) {
+            timerForRendering.detach();
+            
+            blobconf.initConfig(ONE_TRACKING_SPOT); // value is the nb of spots instantiated
+            
+            lsr.setConfigToRender(&blobconf);
+            timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThread, RENDER_INTERVAL);
+            // timerForRendering.attach(&lsr, &simpleLaserSensingRenderer::laserRenderThreadONEBLOBONLY, RENDER_INTERVAL);
+    }
 
     else if (!strcmp(address[0], "spot_test")) {
         timerForRendering.detach();