Ignore:
Timestamp:
01/09/19 15:38:32 (5 years ago)
Author:
Sanahuja Guillaume
Message:

vrpn modifs

File:
1 edited

Legend:

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

    r232 r294  
    4141                                 std::string address) {
    4242  this->self = self;
     43  this->address = address;
    4344  serialport = NULL;
    4445        isConnected=false;
     
    5556  rotation_1 = new OneAxisRotation(setup_tab->NewRow(), "post rotation 1",OneAxisRotation::PreRotation);
    5657  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());
    5760}
    5861
     
    7578  rotation_1 = new OneAxisRotation(setup_tab->NewRow(), "post rotation 1",OneAxisRotation::PreRotation);
    7679  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());
    7782}
    7883
     
    172177        // self->Warn("erreur rt_dev_read (%s)\n",strerror(-read));
    173178      } 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));
    175180      } else {
    176181        // for(ssize_t i=0;i<read;i++) printf("%x ",response[i]);
     
    209214        if(connection->connected()==vrpn_true && !isConnected) {
    210215            isConnected=true;
    211             Printf("VRPN connected\n");
     216            Printf("VRPN connected to %s\n",address.c_str());
    212217        }
    213218        if(connection->connected()==vrpn_false && isConnected) {
    214219            isConnected=false;
    215             Printf("VRPN disconnected\n");
     220            Printf("VRPN disconnected to %s\n",address.c_str());
    216221        }
    217222        //timeout in mainloop is not well handled if not connected...
     
    219224            //this is when trackables callbacks are called:
    220225            if(connection->mainloop(&timeout)!=0) {
    221                 self->Warn("connection dropped\n");
     226                self->Warn("connection dropped from\n",address.c_str());
    222227            }
    223228            //printf("%lld\n",GetTime()/(1000*1000));
Note: See TracChangeset for help on using the changeset viewer.