Changeset 294 in flair-src for trunk/lib/FlairSensorActuator/src/VrpnClient_impl.cpp
- Timestamp:
- 01/09/19 15:38:32 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/VrpnClient_impl.cpp
r232 r294 41 41 std::string address) { 42 42 this->self = self; 43 this->address = address; 43 44 serialport = NULL; 44 45 isConnected=false; … … 55 56 rotation_1 = new OneAxisRotation(setup_tab->NewRow(), "post rotation 1",OneAxisRotation::PreRotation); 56 57 rotation_2 = new OneAxisRotation(setup_tab->NewRow(), "post rotation 2",OneAxisRotation::PreRotation); 58 59 Printf("Connecting to VRPN server on %s\n",address.c_str()); 57 60 } 58 61 … … 75 78 rotation_1 = new OneAxisRotation(setup_tab->NewRow(), "post rotation 1",OneAxisRotation::PreRotation); 76 79 rotation_2 = new OneAxisRotation(setup_tab->NewRow(), "post rotation 2",OneAxisRotation::PreRotation); 80 81 Printf("Connecting to VRPN server on %s\n",serialport->ObjectName().c_str()); 77 82 } 78 83 … … 172 177 // self->Warn("erreur rt_dev_read (%s)\n",strerror(-read)); 173 178 } else if (read != sizeof(response)) { 174 self->Warn(" erreur rt_dev_read%i/%i\n", read, sizeof(response));179 self->Warn("serial read error %i/%i\n", read, sizeof(response)); 175 180 } else { 176 181 // for(ssize_t i=0;i<read;i++) printf("%x ",response[i]); … … 209 214 if(connection->connected()==vrpn_true && !isConnected) { 210 215 isConnected=true; 211 Printf("VRPN connected \n");216 Printf("VRPN connected to %s\n",address.c_str()); 212 217 } 213 218 if(connection->connected()==vrpn_false && isConnected) { 214 219 isConnected=false; 215 Printf("VRPN disconnected \n");220 Printf("VRPN disconnected to %s\n",address.c_str()); 216 221 } 217 222 //timeout in mainloop is not well handled if not connected... … … 219 224 //this is when trackables callbacks are called: 220 225 if(connection->mainloop(&timeout)!=0) { 221 self->Warn("connection dropped \n");226 self->Warn("connection dropped from\n",address.c_str()); 222 227 } 223 228 //printf("%lld\n",GetTime()/(1000*1000));
Note:
See TracChangeset
for help on using the changeset viewer.