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


Ignore:
Timestamp:
04/08/16 15:40:57 (8 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

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

    r10 r15  
    3232using namespace flair::actuator;
    3333
    34 namespace flair { namespace meta {
     34namespace flair {
     35namespace meta {
    3536
    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");
     37HdsX8::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");
    3942
    40     if(multiplex==NULL) SetMultiplex(new X4X8Multiplex(parent,"motors",X4X8Multiplex::X8));
     43  if (multiplex == NULL)
     44    SetMultiplex(new X4X8Multiplex(parent, "motors", X4X8Multiplex::X8));
    4145
    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());
    4652
    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");
    5158
    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));
    5765}
    5866
    59 HdsX8::~HdsX8() {
    60 
    61 }
     67HdsX8::~HdsX8() {}
    6268
    6369void HdsX8::StartSensors(void) {
    64     ((Gx3_25_ahrs*)GetAhrs())->Start();
    65     ((Srf08*)GetUsRangeFinder())->Start();
    66     ((Ps3Eye *)GetVerticalCamera())->Start();
    67     Uav::StartSensors();
     70  ((Gx3_25_ahrs *)GetAhrs())->Start();
     71  ((Srf08 *)GetUsRangeFinder())->Start();
     72  ((Ps3Eye *)GetVerticalCamera())->Start();
     73  Uav::StartSensors();
    6874}
    6975
Note: See TracChangeset for help on using the changeset viewer.