Changeset 137 in flair-src for trunk/lib/FlairMeta


Ignore:
Timestamp:
Feb 14, 2017, 3:06:20 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

singleton manager

Location:
trunk/lib/FlairMeta/src
Files:
7 edited

Legend:

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

    r122 r137  
    4242
    4343  if (multiplex == NULL)
    44     SetMultiplex(new X4X8Multiplex(getFrameworkManager(), "motors", X4X8Multiplex::X8));
     44    SetMultiplex(new X4X8Multiplex( "motors", X4X8Multiplex::X8));
    4545
    4646  SetBldc(new BlCtrlV2(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
    4747                       "motors", GetUavMultiplex()->MotorsCount(), i2cport));
    48   SetUsRangeFinder(new Srf08(getFrameworkManager(), "SRF08", i2cport, 0x70, 60));
    49   SetAhrs(new Gx3_25_ahrs(getFrameworkManager(), "imu", imu_port,
     48  SetUsRangeFinder(new Srf08("SRF08", i2cport, 0x70, 60));
     49  SetAhrs(new Gx3_25_ahrs("imu", imu_port,
    5050                          Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70));
    5151  SetBatteryMonitor(((BlCtrlV2 *)GetBldc())->GetBatteryMonitor());
    52   SetVerticalCamera(new Ps3Eye(getFrameworkManager(), "camv", 0, 50));
     52  SetVerticalCamera(new Ps3Eye("camv", 0, 50));
    5353}
    5454
  • trunk/lib/FlairMeta/src/MetaDualShock3.cpp

    r38 r137  
    3636namespace meta {
    3737
    38 MetaDualShock3::MetaDualShock3(FrameworkManager *parent, string name,
     38MetaDualShock3::MetaDualShock3(string name,
    3939                               TargetController *controller)
    4040    : controller(controller),IODevice((IODevice*)controller, name) {
    4141  pimpl_ = new MetaDualShock3_impl(this, name);
    42   parent->AddDeviceToLog(pimpl_->joy_ref);
     42  getFrameworkManager()->AddDeviceToLog(pimpl_->joy_ref);
    4343  controller->Start();
    4444}
  • trunk/lib/FlairMeta/src/MetaDualShock3.h

    r38 r137  
    4040
    4141public:
    42   MetaDualShock3(core::FrameworkManager *parent, std::string name,
     42  MetaDualShock3(std::string name,
    4343                 sensor::TargetController *controller);
    4444  ~MetaDualShock3();
  • trunk/lib/FlairMeta/src/SimuX4.cpp

    r122 r137  
    4242
    4343  if (multiplex == NULL)
    44     SetMultiplex(new X4X8Multiplex(getFrameworkManager(), "motors", X4X8Multiplex::X4));
     44    SetMultiplex(new X4X8Multiplex("motors", X4X8Multiplex::X4));
    4545
    4646  SetBldc(new SimuBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
    4747                       "motors", GetUavMultiplex()->MotorsCount(), simu_id));
    48   SetUsRangeFinder(new SimuUs(getFrameworkManager(), "us", simu_id, 60));
    49   SetAhrs(new SimuAhrs(getFrameworkManager(), "imu", simu_id, 70));
     48  SetUsRangeFinder(new SimuUs("us", simu_id, 60));
     49  SetAhrs(new SimuAhrs("imu", simu_id, 70));
    5050  Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
    5151  SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
    5252  GetBatteryMonitor()->SetBatteryValue(12);
    5353  SetVerticalCamera(
    54       new SimuCamera(getFrameworkManager(), "simu_cam_v", 320, 240, 3, simu_id, 10));
     54      new SimuCamera("simu_cam_v", 320, 240, 3, simu_id, 10));
    5555}
    5656
  • trunk/lib/FlairMeta/src/SimuX8.cpp

    r122 r137  
    4242
    4343  if (multiplex == NULL)
    44     SetMultiplex(new X4X8Multiplex(getFrameworkManager(), "motors", X4X8Multiplex::X8));
     44    SetMultiplex(new X4X8Multiplex("motors", X4X8Multiplex::X8));
    4545
    4646  SetBldc(new SimuBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
    4747                       "motors", GetUavMultiplex()->MotorsCount(), simu_id));
    48   SetUsRangeFinder(new SimuUs(getFrameworkManager(), "us", simu_id, 60));
    49   SetAhrs(new SimuAhrs(getFrameworkManager(), "imu", simu_id, 70));
     48  SetUsRangeFinder(new SimuUs("us", simu_id, 60));
     49  SetAhrs(new SimuAhrs("imu", simu_id, 70));
    5050  Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
    5151  SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
    5252  GetBatteryMonitor()->SetBatteryValue(12);
    5353  SetVerticalCamera(
    54       new SimuCamera(getFrameworkManager(), "simu_cam_v", 320, 240, 3, simu_id, 10));
     54      new SimuCamera("simu_cam_v", 320, 240, 3, simu_id, 10));
    5555}
    5656
  • trunk/lib/FlairMeta/src/UavStateMachine.cpp

    r129 r137  
    9090  uZ->AddDeviceToLog(uYaw);
    9191
    92     joy=new MetaDualShock3(getFrameworkManager(),"uav high level controller",controller);
     92    joy=new MetaDualShock3("uav high level controller",controller);
    9393    uav->GetAhrs()->AddPlot(joy->GetReferenceOrientation(),DataPlot::Blue);
    9494
  • trunk/lib/FlairMeta/src/XAir.cpp

    r122 r137  
    4545
    4646  if (multiplex == NULL)
    47     SetMultiplex(new X4X8Multiplex(getFrameworkManager(), "motors", X4X8Multiplex::X8));
     47    SetMultiplex(new X4X8Multiplex("motors", X4X8Multiplex::X8));
    4848
    4949  SetBldc(new AfroBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
    5050                       "motors", GetUavMultiplex()->MotorsCount(), i2cport));
    51   SetUsRangeFinder(new Srf08(getFrameworkManager(), "SRF08", i2cport, 0x70, 60));
    52   SetAhrs(new Gx3_25_ahrs(getFrameworkManager(), "imu", imu_port,
     51  SetUsRangeFinder(new Srf08("SRF08", i2cport, 0x70, 60));
     52  SetAhrs(new Gx3_25_ahrs("imu", imu_port,
    5353                          Gx3_25_imu::AccelerationAngularRateAndOrientationMatrix, 70));
    5454  Tab *bat_tab = new Tab(getFrameworkManager()->GetTabWidget(), "battery");
    5555  SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
    5656  GetBatteryMonitor()->SetBatteryValue(12);
    57   SetVerticalCamera(new Ps3Eye(getFrameworkManager(), "camv", 0, 50));
     57  SetVerticalCamera(new Ps3Eye("camv", 0, 50));
    5858}
    5959
Note: See TracChangeset for help on using the changeset viewer.