Changeset 431 in flair-src for trunk/demos/SimpleFleet


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/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.