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


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (6 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

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

    r10 r15  
    3434using namespace flair::actuator;
    3535
    36 namespace flair { namespace meta {
     36namespace flair {
     37namespace meta {
    3738
    38 SimuX8::SimuX8(FrameworkManager* parent,string uav_name,int simu_id,filter::UavMultiplex *multiplex) : Uav(parent,uav_name,multiplex) {
     39SimuX8::SimuX8(FrameworkManager *parent, string uav_name, int simu_id,
     40               filter::UavMultiplex *multiplex)
     41    : Uav(parent, uav_name, multiplex) {
    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 SimuBldc(GetUavMultiplex(),GetUavMultiplex()->GetLayout(),"motors",GetUavMultiplex()->MotorsCount(),simu_id));
    43     SetUsRangeFinder(new SimuUs(parent,"us",simu_id,60));
    44     SetAhrs(new SimuAhrs(parent,"imu",simu_id,70));
    45     Tab* bat_tab=new Tab(parent->GetTabWidget(),"battery");
    46     SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(),"battery"));
    47     GetBatteryMonitor()->SetBatteryValue(12);
    48     SetVerticalCamera(new SimuCamera(parent, "simu_cam_v", 320, 240, 3, simu_id, 10));
     46  SetBldc(new SimuBldc(GetUavMultiplex(), GetUavMultiplex()->GetLayout(),
     47                       "motors", GetUavMultiplex()->MotorsCount(), simu_id));
     48  SetUsRangeFinder(new SimuUs(parent, "us", simu_id, 60));
     49  SetAhrs(new SimuAhrs(parent, "imu", simu_id, 70));
     50  Tab *bat_tab = new Tab(parent->GetTabWidget(), "battery");
     51  SetBatteryMonitor(new BatteryMonitor(bat_tab->NewRow(), "battery"));
     52  GetBatteryMonitor()->SetBatteryValue(12);
     53  SetVerticalCamera(
     54      new SimuCamera(parent, "simu_cam_v", 320, 240, 3, simu_id, 10));
    4955}
    5056
    51 SimuX8::~SimuX8() {
     57SimuX8::~SimuX8() {}
    5258
     59void SimuX8::StartSensors(void) {
     60  ((SimuAhrs *)GetAhrs())->Start();
     61  ((SimuUs *)GetUsRangeFinder())->Start();
     62  ((SimuCamera *)GetVerticalCamera())->Start();
     63  Uav::StartSensors();
    5364}
    5465
    55 void SimuX8::StartSensors(void) {
    56     ((SimuAhrs*)GetAhrs())->Start();
    57     ((SimuUs*)GetUsRangeFinder())->Start();
    58     ((SimuCamera *)GetVerticalCamera())->Start();
    59     Uav::StartSensors();
    60 }
    61 
    62 void SimuX8::SetupVRPNAutoIP(string name) {
    63     SetupVRPN("127.0.0.1:3883",name);
    64 }
     66void SimuX8::SetupVRPNAutoIP(string name) { SetupVRPN("127.0.0.1:3883", name); }
    6567
    6668} // end namespace meta
Note: See TracChangeset for help on using the changeset viewer.