just a test

Dependencies:   mbed

Fork of scoreLight_Advanced by Alvaro Cassinelli

Revision:
18:d72935b13858
Parent:
17:356ca5690a59
Child:
20:8e82b95180e7
--- a/rigidLoop.cpp	Sat Apr 28 09:33:49 2012 +0000
+++ b/rigidLoop.cpp	Sat Apr 28 12:35:21 2012 +0000
@@ -25,9 +25,10 @@
     initCommonVariables();
 
     // (3) initialize common variables for the different modes of this rigid loop (even if some are not used, better not to have more subclasses...)
-
-  //  angleCorrectionForceLoop=0; // this will depend on the size of the blob (in principle), and number of blobs...
-
+    // Sending data:
+    sendingRecenteringAngle=true;
+    sendingAnchorPosition=true;
+    sendingOnlyWhenTouch=true;
 
 // (3) Initialize secondary variables depending on the behaviour mode (may be changed afterwards in real time)
 
@@ -342,15 +343,16 @@
     myled2=1; // for tests...
 
     // First, set the top address of the message to the ID of the blob (not the name):
-    sprintf(auxstring, "%d", identifier);
-    sendMes.setTopAddress("0");//auxstring);
+ //   sprintf(auxstring, "%d", identifier);
+ //   sendMes.setTopAddress("0");//auxstring);
 
     // =====================   OSC  ======================
     if (sendOSC) {
 
         // (a) Anchor mass:
         if (sendingAnchorPosition) {
-            sendMes.setSubAddress("/apos");
+           sprintf(auxstring, "/p %d",identifier);
+            sendMes.setSubAddress(auxstring);
             long    x, y;    //ATTENTION: parameters to setArgs should be long or unsigned long only (not int!!)
             x=(long)(centerMass.pos.x);
             y=(long)(centerMass.pos.y);
@@ -448,7 +450,8 @@
             osc.sendOsc( &sendMes );
         }
         if (sendingRecenteringAngle) {
-            sendMes.setSubAddress("/rangle");
+            sprintf(auxstring, "/v %d",identifier);
+            sendMes.setSubAddress(auxstring);
             long    x;    //ATTENTION: parameters to setArgs should be long or unsigned long only (not int!!)
             x=(long)(angleRecenteringVector);
             sendMes.setArgs( "i", &x);