Ignore:
Timestamp:
07/12/21 08:37:29 (7 months ago)
Author:
Sanahuja Guillaume
Message:

add vrpn connection type per uav

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp

    r318 r431  
    5353    Uav* uav=GetUav();
    5454               
    55         VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80);
    56         uavVrpn = new MetaVrpnObject(uav->ObjectName());
     55        VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80,uav->GetDefaultVrpnConnectionType());
     56    if(vrpnclient->ConnectionType()==VrpnClient::Xbee) {
     57        uavVrpn = new MetaVrpnObject(uav->ObjectName(),(uint8_t)0);
     58    } else if (vrpnclient->ConnectionType()==VrpnClient::Vrpn) {
     59        uavVrpn = new MetaVrpnObject(uav->ObjectName());
     60    } else if (vrpnclient->ConnectionType()==VrpnClient::VrpnLite) {
     61        uavVrpn = new MetaVrpnObject(uav->ObjectName());
     62    }
    5763        getFrameworkManager()->AddDeviceToLog(uavVrpn);
    5864        uav->GetAhrs()->YawPlot()->AddCurve(uavVrpn->State()->Element(2),DataPlot::Green);
Note: See TracChangeset for help on using the changeset viewer.