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


Ignore:
Timestamp:
Jan 6, 2017, 1:56:26 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modifs uav vrpn i686

File:
1 edited

Legend:

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

    r100 r122  
    3838namespace meta {
    3939
    40 XAir::XAir(FrameworkManager *parent, string uav_name,
     40XAir::XAir(string name,
    4141           filter::UavMultiplex *multiplex)
    42     : Uav(parent, uav_name, multiplex) {
    43   RTDM_I2cPort *i2cport = new RTDM_I2cPort(parent, "rtdm_i2c", "rti2c3");
    44   RTDM_SerialPort *imu_port = new RTDM_SerialPort(parent, "imu_port", "rtser1");
     42    : Uav(name, multiplex) {
     43  RTDM_I2cPort *i2cport = new RTDM_I2cPort(getFrameworkManager(), "rtdm_i2c", "rti2c3");
     44  RTDM_SerialPort *imu_port = new RTDM_SerialPort(getFrameworkManager(), "imu_port", "rtser1");
    4545
    4646  if (multiplex == NULL)
    47     SetMultiplex(new X4X8Multiplex(parent, "motors", X4X8Multiplex::X8));
     47    SetMultiplex(new X4X8Multiplex(getFrameworkManager(), "motors", X4X8Multiplex::X8));
    4848
    4949  SetBldc(new AfroBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
    5050                       "motors", GetUavMultiplex()->MotorsCount(), i2cport));
    51   SetUsRangeFinder(new Srf08(parent, "SRF08", i2cport, 0x70, 60));
    52   SetAhrs(new Gx3_25_ahrs(parent, "imu", imu_port,
     51  SetUsRangeFinder(new Srf08(getFrameworkManager(), "SRF08", i2cport, 0x70, 60));
     52  SetAhrs(new Gx3_25_ahrs(getFrameworkManager(), "imu", imu_port,
    5353                          Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70));
    54   Tab *bat_tab = new Tab(parent->GetTabWidget(), "battery");
     54  Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
    5555  SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
    5656  GetBatteryMonitor()->SetBatteryValue(12);
    57 
    58   /*
    59           if(VRPNType==Auto || VRPNType==AutoSerialPort)
    60           {
    61               RTDM_SerialPort* vrpn_port=new
    62      RTDM_SerialPort(parent,"vrpn_port","rtser3");
    63 
    64               vrpnclient=new VrpnClient(parent,"vrpn",vrpn_port,10000,80);
    65               uav_vrpn=new
    66      MetaVrpnObject(vrpnclient,uav_name,VRPNSerialObjectId);
    67           }
    68   */
    69   SetVerticalCamera(new Ps3Eye(parent, "camv", 0, 50));
     57  SetVerticalCamera(new Ps3Eye(getFrameworkManager(), "camv", 0, 50));
    7058}
    7159
     
    7664  ((Srf08 *)GetUsRangeFinder())->Start();
    7765  ((Ps3Eye *)GetVerticalCamera())->Start();
    78   Uav::StartSensors();
    7966}
    8067
Note: See TracChangeset for help on using the changeset viewer.