Changeset 431 in flair-src for trunk/demos
- Timestamp:
- Jul 12, 2021, 8:37:29 AM (3 years ago)
- Location:
- trunk/demos
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r342 r431 40 40 Uav* uav=GetUav(); 41 41 42 VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80 );42 VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80,uav->GetDefaultVrpnConnectionType()); 43 43 44 44 if(vrpnclient->ConnectionType()==VrpnClient::Xbee) { … … 49 49 targetVrpn=new MetaVrpnObject("target"); 50 50 } else if (vrpnclient->ConnectionType()==VrpnClient::VrpnLite) { 51 uavVrpn = new MetaVrpnObject(uav->ObjectName() ,(uint8_t)0);52 targetVrpn=new MetaVrpnObject("target" ,1);51 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 52 targetVrpn=new MetaVrpnObject("target"); 53 53 } 54 54 -
trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp
r318 r431 41 41 Uav* uav=GetUav(); 42 42 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 } 45 51 getFrameworkManager()->AddDeviceToLog(uavVrpn); 46 52 uav->GetAhrs()->YawPlot()->AddCurve(uavVrpn->State()->Element(2),DataPlot::Green); … … 52 58 VrpnClient* simuVrpnClient=new VrpnClient("simu_vrpn", vrpn,80);//simu_simu vrpn server 53 59 targetVrpn=new MetaVrpnObject("Drone_1",simuVrpnClient); 54 55 60 simuVrpnClient->Start(); 61 realVrpnClient->Start(); 56 62 57 63 getFrameworkManager()->AddDeviceToLog(targetVrpn); -
trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp
r318 r431 53 53 Uav* uav=GetUav(); 54 54 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 } 57 63 getFrameworkManager()->AddDeviceToLog(uavVrpn); 58 64 uav->GetAhrs()->YawPlot()->AddCurve(uavVrpn->State()->Element(2),DataPlot::Green);
Note:
See TracChangeset
for help on using the changeset viewer.