Changeset 122 in flair-src for trunk/lib/FlairMeta/src/HdsX8.cpp


Ignore:
Timestamp:
01/06/17 13:56:26 (5 years ago)
Author:
Sanahuja Guillaume
Message:

modifs uav vrpn i686

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairMeta/src/HdsX8.cpp

    r107 r122  
    3535namespace meta {
    3636
    37 HdsX8::HdsX8(FrameworkManager *parent, string uav_name,
     37HdsX8::HdsX8(string name,
    3838             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    : Uav(name, multiplex) {
     40  RTDM_I2cPort *i2cport = new RTDM_I2cPort(getFrameworkManager(), "rtdm_i2c", "rti2c3");
     41  RTDM_SerialPort *imu_port = new RTDM_SerialPort(getFrameworkManager(), "imu_port", "rtser1");
    4242
    4343  if (multiplex == NULL)
    44     SetMultiplex(new X4X8Multiplex(parent, "motors", X4X8Multiplex::X8));
     44    SetMultiplex(new X4X8Multiplex(getFrameworkManager(), "motors", X4X8Multiplex::X8));
    4545
    4646  SetBldc(new BlCtrlV2(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
    4747                       "motors", GetUavMultiplex()->MotorsCount(), i2cport));
    48   SetUsRangeFinder(new Srf08(parent, "SRF08", i2cport, 0x70, 60));
    49   SetAhrs(new Gx3_25_ahrs(parent, "imu", imu_port,
     48  SetUsRangeFinder(new Srf08(getFrameworkManager(), "SRF08", i2cport, 0x70, 60));
     49  SetAhrs(new Gx3_25_ahrs(getFrameworkManager(), "imu", imu_port,
    5050                          Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70));
    5151  SetBatteryMonitor(((BlCtrlV2 *)GetBldc())->GetBatteryMonitor());
    52 
    53   /*
    54           if(VRPNType==Auto || VRPNType==AutoSerialPort)
    55           {
    56               RTDM_SerialPort* vrpn_port=new
    57      RTDM_SerialPort(parent,"vrpn_port","rtser3");
    58 
    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));
     52  SetVerticalCamera(new Ps3Eye(getFrameworkManager(), "camv", 0, 50));
    6553}
    6654
     
    7159  ((Srf08 *)GetUsRangeFinder())->Start();
    7260  ((Ps3Eye *)GetVerticalCamera())->Start();
    73   Uav::StartSensors();
    7461}
    7562
Note: See TracChangeset for help on using the changeset viewer.