Changeset 15 in flair-src for trunk/lib/FlairMeta/src/HdsX8.cpp
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/HdsX8.cpp
r10 r15 32 32 using namespace flair::actuator; 33 33 34 namespace flair { namespace meta { 34 namespace flair { 35 namespace meta { 35 36 36 HdsX8::HdsX8(FrameworkManager* parent,string uav_name,filter::UavMultiplex *multiplex) : Uav(parent,uav_name,multiplex) { 37 RTDM_I2cPort* i2cport=new RTDM_I2cPort(parent,"rtdm_i2c","rti2c3"); 38 RTDM_SerialPort* imu_port=new RTDM_SerialPort(parent,"imu_port","rtser1"); 37 HdsX8::HdsX8(FrameworkManager *parent, string uav_name, 38 filter::UavMultiplex *multiplex) 39 : Uav(parent, uav_name, multiplex) { 40 RTDM_I2cPort *i2cport = new RTDM_I2cPort(parent, "rtdm_i2c", "rti2c3"); 41 RTDM_SerialPort *imu_port = new RTDM_SerialPort(parent, "imu_port", "rtser1"); 39 42 40 if(multiplex==NULL) SetMultiplex(new X4X8Multiplex(parent,"motors",X4X8Multiplex::X8)); 43 if (multiplex == NULL) 44 SetMultiplex(new X4X8Multiplex(parent, "motors", X4X8Multiplex::X8)); 41 45 42 SetBldc(new BlCtrlV2(GetUavMultiplex(),GetUavMultiplex()->GetLayout(),"motors",GetUavMultiplex()->MotorsCount(),i2cport)); 43 SetUsRangeFinder(new Srf08(parent,"SRF08",i2cport,0x70,60)); 44 SetAhrs(new Gx3_25_ahrs(parent,"imu",imu_port,Gx3_25_imu::EulerAnglesAndAngularRates,70)); 45 SetBatteryMonitor(((BlCtrlV2*)GetBldc())->GetBatteryMonitor()); 46 SetBldc(new BlCtrlV2(GetUavMultiplex(), GetUavMultiplex()->GetLayout(), 47 "motors", GetUavMultiplex()->MotorsCount(), i2cport)); 48 SetUsRangeFinder(new Srf08(parent, "SRF08", i2cport, 0x70, 60)); 49 SetAhrs(new Gx3_25_ahrs(parent, "imu", imu_port, 50 Gx3_25_imu::EulerAnglesAndAngularRates, 70)); 51 SetBatteryMonitor(((BlCtrlV2 *)GetBldc())->GetBatteryMonitor()); 46 52 47 /* 48 if(VRPNType==Auto || VRPNType==AutoSerialPort) 49 { 50 RTDM_SerialPort* vrpn_port=new RTDM_SerialPort(parent,"vrpn_port","rtser3"); 53 /* 54 if(VRPNType==Auto || VRPNType==AutoSerialPort) 55 { 56 RTDM_SerialPort* vrpn_port=new 57 RTDM_SerialPort(parent,"vrpn_port","rtser3"); 51 58 52 vrpnclient=new VrpnClient(parent,"vrpn",vrpn_port,10000,80); 53 uav_vrpn=new MetaVrpnObject(vrpnclient,uav_name,VRPNSerialObjectId); 54 } 55 */ 56 SetVerticalCamera(new Ps3Eye(parent,"camv",0,50)); 59 vrpnclient=new VrpnClient(parent,"vrpn",vrpn_port,10000,80); 60 uav_vrpn=new 61 MetaVrpnObject(vrpnclient,uav_name,VRPNSerialObjectId); 62 } 63 */ 64 SetVerticalCamera(new Ps3Eye(parent, "camv", 0, 50)); 57 65 } 58 66 59 HdsX8::~HdsX8() { 60 61 } 67 HdsX8::~HdsX8() {} 62 68 63 69 void HdsX8::StartSensors(void) { 64 ((Gx3_25_ahrs*)GetAhrs())->Start();65 ((Srf08*)GetUsRangeFinder())->Start();66 67 70 ((Gx3_25_ahrs *)GetAhrs())->Start(); 71 ((Srf08 *)GetUsRangeFinder())->Start(); 72 ((Ps3Eye *)GetVerticalCamera())->Start(); 73 Uav::StartSensors(); 68 74 } 69 75
Note:
See TracChangeset
for help on using the changeset viewer.