Changeset 431 in flair-src for trunk/demos/MixedReality/real/uav


Ignore:
Timestamp:
Jul 12, 2021, 8:37:29 AM (3 years ago)
Author:
Sanahuja Guillaume
Message:

add vrpn connection type per uav

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp

    r318 r431  
    4141    Uav* uav=GetUav();
    4242
    43     VrpnClient* realVrpnClient=new VrpnClient("real_vrpn", uav->GetDefaultVrpnAddress(),80);
    44     uavVrpn = new MetaVrpnObject(uav->ObjectName());
     43    VrpnClient* realVrpnClient=new VrpnClient("real_vrpn", uav->GetDefaultVrpnAddress(),80,uav->GetDefaultVrpnConnectionType());
     44    if(realVrpnClient->ConnectionType()==VrpnClient::Xbee) {
     45        uavVrpn = new MetaVrpnObject(uav->ObjectName(),(uint8_t)0);
     46    } else if (realVrpnClient->ConnectionType()==VrpnClient::Vrpn) {
     47        uavVrpn = new MetaVrpnObject(uav->ObjectName());
     48    } else if (realVrpnClient->ConnectionType()==VrpnClient::VrpnLite) {
     49        uavVrpn = new MetaVrpnObject(uav->ObjectName());
     50    }
    4551    getFrameworkManager()->AddDeviceToLog(uavVrpn);
    4652    uav->GetAhrs()->YawPlot()->AddCurve(uavVrpn->State()->Element(2),DataPlot::Green);
     
    5258    VrpnClient* simuVrpnClient=new VrpnClient("simu_vrpn", vrpn,80);//simu_simu vrpn server
    5359    targetVrpn=new MetaVrpnObject("Drone_1",simuVrpnClient);
    54                 simuVrpnClient->Start();
    55                 realVrpnClient->Start();
     60        simuVrpnClient->Start();
     61        realVrpnClient->Start();
    5662
    5763    getFrameworkManager()->AddDeviceToLog(targetVrpn);
Note: See TracChangeset for help on using the changeset viewer.