Ignore:
Timestamp:
Feb 15, 2017, 2:41:36 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

improved vprnobject added to vrpnclient

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp

    r139 r140  
    5555        "identifiant pour la connexion Xbee ignore car pas en mode Xbee\n");
    5656  }
    57 
     57 
    5858  // state
    5959  cvmatrix_descriptor *desc = new cvmatrix_descriptor(7, 1);
     
    8282  z_plot->AddCurve(output->Element(6));
    8383 
    84   if(parent->IsRunning()) {
    85     self->Warn("adding VrpnObject on running VrpnClient can crash\n");
    86   }
    87  
    8884  if (parent->UseXbee()) {
    8985    tracker = NULL;
     
    9389    tracker->register_change_handler(this, handle_pos);
    9490    tracker->shutup = true;
    95     parent->pimpl_->AddTrackable(self);
     91    parent->pimpl_->AddTrackable(this);
    9692  }
     93 
    9794}
    9895
    9996VrpnObject_impl::~VrpnObject_impl(void) {
    100   if (tracker != NULL) // normal
    101   {
    102     parent->pimpl_->RemoveTrackable(self);
     97  parent->pimpl_->RemoveTrackable(this);
     98  if (tracker != NULL) {// normal
    10399    tracker->unregister_change_handler(this, handle_pos);
    104100    delete tracker;
    105   } else // xbee
    106   {
    107     parent->pimpl_->RemoveTrackable(this);
    108101  }
    109102  delete plot_tab;
    110 }
    111 
    112 void VrpnObject_impl::mainloop(void) {
    113      tracker->mainloop();
    114103}
    115104
Note: See TracChangeset for help on using the changeset viewer.