Ignore:
Timestamp:
03/13/19 16:40:18 (5 years ago)
Author:
Sanahuja Guillaume
Message:

vrpnlite support

File:
1 edited

Legend:

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

    r286 r309  
    4848                return;
    4949        }
    50   if (id == -1 && parent->UseXbee()) {
     50  if (id == -1 && GetVrpnClient()->ConnectionType()==VrpnClient::Xbee) {
    5151    self->Err("erreur aucun identifiant specifie pour la connexion Xbee\n");
    5252  }
    53   if (id != -1 && !parent->UseXbee()) {
    54     self->Warn(
    55         "identifiant pour la connexion Xbee ignore car pas en mode Xbee\n");
     53  if (id == -1 && GetVrpnClient()->ConnectionType()==VrpnClient::VrpnLite) {
     54    self->Err("erreur aucun identifiant specifie pour la connexion VrpnLite\n");
     55  }
     56  if (id != -1 && GetVrpnClient()->ConnectionType()==VrpnClient::Vrpn) {
     57    self->Warn("identifiant pour la connexion ignore car inutile en mode Vrpn\n");
    5658  }
    5759 
     
    8486  z_plot->AddCurve(output->Element(6));
    8587 
    86   if (parent->UseXbee()) {
    87     tracker = NULL;
     88  if (GetVrpnClient()->ConnectionType()==VrpnClient::Xbee) {
    8889    parent->pimpl_->AddTrackable(this, id);
    89   } else {
     90  } else if(GetVrpnClient()->ConnectionType()==VrpnClient::Vrpn){
    9091    tracker = new vrpn_Tracker_Remote(name.c_str(), parent->pimpl_->connection);
    9192    tracker->register_change_handler(this, handle_pos);
    9293    tracker->shutup = true;
    9394    parent->pimpl_->AddTrackable(this);
     95  } else if(GetVrpnClient()->ConnectionType()==VrpnClient::VrpnLite){
     96    parent->pimpl_->AddTrackable(this, id);
    9497  }
    9598 
     
    99102VrpnObject_impl::~VrpnObject_impl(void) {
    100103  parent->pimpl_->RemoveTrackable(this);
    101   if (tracker != NULL) {// normal
     104  if (GetVrpnClient()->ConnectionType()==VrpnClient::Vrpn) {
    102105    tracker->unregister_change_handler(this, handle_pos);
    103106    delete tracker;
Note: See TracChangeset for help on using the changeset viewer.