Changeset 309 in flair-src for trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp
- Timestamp:
- 03/13/19 16:40:18 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp
r286 r309 48 48 return; 49 49 } 50 if (id == -1 && parent->UseXbee()) {50 if (id == -1 && GetVrpnClient()->ConnectionType()==VrpnClient::Xbee) { 51 51 self->Err("erreur aucun identifiant specifie pour la connexion Xbee\n"); 52 52 } 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"); 56 58 } 57 59 … … 84 86 z_plot->AddCurve(output->Element(6)); 85 87 86 if (parent->UseXbee()) { 87 tracker = NULL; 88 if (GetVrpnClient()->ConnectionType()==VrpnClient::Xbee) { 88 89 parent->pimpl_->AddTrackable(this, id); 89 } else {90 } else if(GetVrpnClient()->ConnectionType()==VrpnClient::Vrpn){ 90 91 tracker = new vrpn_Tracker_Remote(name.c_str(), parent->pimpl_->connection); 91 92 tracker->register_change_handler(this, handle_pos); 92 93 tracker->shutup = true; 93 94 parent->pimpl_->AddTrackable(this); 95 } else if(GetVrpnClient()->ConnectionType()==VrpnClient::VrpnLite){ 96 parent->pimpl_->AddTrackable(this, id); 94 97 } 95 98 … … 99 102 VrpnObject_impl::~VrpnObject_impl(void) { 100 103 parent->pimpl_->RemoveTrackable(this); 101 if ( tracker != NULL) {// normal104 if (GetVrpnClient()->ConnectionType()==VrpnClient::Vrpn) { 102 105 tracker->unregister_change_handler(this, handle_pos); 103 106 delete tracker;
Note:
See TracChangeset
for help on using the changeset viewer.