Index: trunk/lib/FlairSensorActuator/src/VrpnClient_impl.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/VrpnClient_impl.cpp	(revision 331)
+++ trunk/lib/FlairSensorActuator/src/VrpnClient_impl.cpp	(revision 332)
@@ -89,5 +89,5 @@
 
 VrpnClient_impl::~VrpnClient_impl() {
-  if (connectionType==VrpnClient::Vrpn) {
+  if (connectionType==VrpnClient::Vrpn|| connectionType==VrpnClient::VrpnLite) {
     // on fait une copie car le delete touche a trackables_copy via
     // RemoveTrackable
@@ -96,10 +96,10 @@
       delete trackables_copy.at(i)->self;
     // trackables.clear();
-  } else if(connectionType==VrpnClient::Xbee || connectionType==VrpnClient::VrpnLite) {
+  } else if(connectionType==VrpnClient::Xbee ) {
     // on fait une copie car le delete touche a xbee_objects_copy via
     // RemoveTrackable
-    vector<liteObject_t> liteObjects_copy = liteObjects;
-    for (unsigned int i = 0; i < liteObjects_copy.size(); i++)
-      delete liteObjects_copy.at(i).vrpnobject->self;
+    vector<xbeeObject_t> xbeeObjects_copy = xbeeObjects;
+    for (unsigned int i = 0; i < xbeeObjects_copy.size(); i++)
+      delete xbeeObjects_copy.at(i).vrpnobject->self;
   }
 
@@ -128,10 +128,8 @@
     mutex->ReleaseMutex();
   } else if (connectionType==VrpnClient::VrpnLite) {
-    if(liteObjects.size()<0xffff) {
-      liteObject_t tmp;
-      tmp.vrpnobject = obj;
-      uint16_t id=liteObjects.size();
+    if(trackables.size()<0xffff) {
+      uint16_t id=trackables.size();
       mutex->GetMutex();
-      liteObjects.push_back(tmp);
+      trackables.push_back(obj);
       mutex->ReleaseMutex();
       //Printf("%i %s\n",tmp.id,obj->self->ObjectName().c_str());
@@ -151,10 +149,10 @@
 
 void VrpnClient_impl::AddTrackable(VrpnObject_impl *obj, uint8_t id) {
-  if (connectionType==VrpnClient::VrpnLite || connectionType==VrpnClient::Xbee) {
-    liteObject_t tmp;
+  if (connectionType==VrpnClient::Xbee) {
+    xbeeObject_t tmp;
     tmp.vrpnobject = obj;
     tmp.id = id;
     mutex->GetMutex();
-    liteObjects.push_back(tmp);
+    xbeeObjects.push_back(tmp);
     mutex->ReleaseMutex();
   } else {
@@ -165,5 +163,5 @@
 void VrpnClient_impl::RemoveTrackable(VrpnObject_impl *obj) {
   mutex->GetMutex();
-  if (connectionType==VrpnClient::Vrpn) {
+  if (connectionType==VrpnClient::Vrpn || connectionType==VrpnClient::VrpnLite) {
     for (vector<VrpnObject_impl *>::iterator it = trackables.begin();it < trackables.end(); it++) {
       if (*it == obj) {
@@ -173,8 +171,8 @@
     }
   }
-  if (connectionType==VrpnClient::VrpnLite || connectionType==VrpnClient::Xbee) {
-    for (vector<liteObject_t>::iterator it = liteObjects.begin();it < liteObjects.end(); it++) {
+  if ( connectionType==VrpnClient::Xbee) {
+    for (vector<xbeeObject_t>::iterator it = xbeeObjects.begin();it < xbeeObjects.end(); it++) {
       if ((*it).vrpnobject == obj) {
-        liteObjects.erase(it);
+        xbeeObjects.erase(it);
         break;
       }
@@ -219,5 +217,5 @@
 
           mutex->GetMutex();
-          if (id < liteObjects.size()) {
+          if (id < xbeeObjects.size()) {
             memcpy(pos, &response[9], sizeof(pos));
             memcpy(quat, &response[9] + sizeof(pos), sizeof(quat));
@@ -231,5 +229,5 @@
               // self->Printf("%i %f %f %f
               // %f\n",id,pos[0],pos[1],pos[2],(float)self->GetTime()/(1000*1000));
-              VrpnObject_impl::handle_pos(liteObjects.at(id).vrpnobject, t);
+              VrpnObject_impl::handle_pos(xbeeObjects.at(id).vrpnobject, t);
             }
           }
@@ -270,5 +268,5 @@
       int16_t quat[4];
       Time time;
-      char datas[liteObjects.size()*(sizeof(pos)+sizeof(quat))+ sizeof(time)];
+      char datas[trackables.size()*(sizeof(pos)+sizeof(quat))+ sizeof(time)];
       char *datasPtr=datas;
       
@@ -283,5 +281,5 @@
       dataSocket->NetworkToHost((char*)(&time),sizeof(time));
       
-      for (vector<liteObject_t>::iterator it = liteObjects.begin();it < liteObjects.end(); it++) {
+      for (vector<VrpnObject_impl*>::iterator it = trackables.begin();it < trackables.end(); it++) {
         memcpy(pos, datasPtr, sizeof(pos));
         datasPtr+=sizeof(pos);
@@ -303,5 +301,5 @@
         t.msg_time.tv_usec=(time%((Time)1000000000))/((Time)1000);
         //Printf("%i %lld %lld %lld\n",id,time,t.msg_time.tv_sec,t.msg_time.tv_usec);
-        VrpnObject_impl::handle_pos((void*)(it->vrpnobject), t);
+        VrpnObject_impl::handle_pos((void*)(*it), t);
       }
       
Index: trunk/lib/FlairSensorActuator/src/unexported/VrpnClient_impl.h
===================================================================
--- trunk/lib/FlairSensorActuator/src/unexported/VrpnClient_impl.h	(revision 331)
+++ trunk/lib/FlairSensorActuator/src/unexported/VrpnClient_impl.h	(revision 332)
@@ -72,10 +72,10 @@
   uint16_t us_period;
   std::vector<VrpnObject_impl *> trackables;
-  typedef struct liteObject_t {
+  typedef struct xbeeObject_t {
     VrpnObject_impl *vrpnobject;
     uint8_t id;
-  } liteObject_t;
+  } xbeeObject_t;
 
-  std::vector<liteObject_t> liteObjects;
+  std::vector<xbeeObject_t> xbeeObjects;
   flair::gui::Tab *main_tab;
   flair::core::OneAxisRotation *rotation_1, *rotation_2;
