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/FlairSensorActuator/src/LaserRangeFinder.cpp

    r3 r15  
    3232using namespace flair::gui;
    3333
    34 namespace flair { namespace sensor {
     34namespace flair {
     35namespace sensor {
    3536
    36 LaserRangeFinder::LaserRangeFinder(const FrameworkManager* parent,string name) : IODevice(parent,name) {
    37     cvmatrix_descriptor* desc=new cvmatrix_descriptor(360,1);
    38     output=new cvmatrix(this,desc,floatType);
    39     AddDataToLog(output);
     37LaserRangeFinder::LaserRangeFinder(const FrameworkManager *parent, string name)
     38    : IODevice(parent, name) {
     39  cvmatrix_descriptor *desc = new cvmatrix_descriptor(360, 1);
     40  output = new cvmatrix(this, desc, floatType);
     41  AddDataToLog(output);
    4042
    41     //station sol
    42     main_tab=new Tab(parent->GetTabWidget(),name);
    43     tab=new TabWidget(main_tab->NewRow(),name);
    44     sensor_tab=new Tab(tab,"Reglages");
    45     setup_groupbox=new GroupBox(sensor_tab->NewRow(),name);
    46 
     43  // station sol
     44  main_tab = new Tab(parent->GetTabWidget(), name);
     45  tab = new TabWidget(main_tab->NewRow(), name);
     46  sensor_tab = new Tab(tab, "Reglages");
     47  setup_groupbox = new GroupBox(sensor_tab->NewRow(), name);
    4748}
    4849
    49 LaserRangeFinder::LaserRangeFinder(const IODevice* parent,std::string name) : IODevice(parent,name)
    50 {
    51     plot_tab=NULL;
    52     main_tab=NULL;
    53     tab=NULL;
    54     sensor_tab=NULL;
    55     setup_groupbox=NULL;
     50LaserRangeFinder::LaserRangeFinder(const IODevice *parent, std::string name)
     51    : IODevice(parent, name) {
     52  plot_tab = NULL;
     53  main_tab = NULL;
     54  tab = NULL;
     55  sensor_tab = NULL;
     56  setup_groupbox = NULL;
    5657
    57     output=NULL;
     58  output = NULL;
    5859}
    5960
    60 LaserRangeFinder::~LaserRangeFinder()
    61 {
     61LaserRangeFinder::~LaserRangeFinder() {}
    6262
    63 }
     63GroupBox *LaserRangeFinder::GetGroupBox(void) const { return setup_groupbox; }
    6464
     65Layout *LaserRangeFinder::GetLayout(void) const { return sensor_tab; }
    6566
    66 GroupBox* LaserRangeFinder::GetGroupBox(void) const
    67 {
    68 return setup_groupbox;
    69 }
     67RangeFinderPlot *LaserRangeFinder::GetPlot(void) const { return plot; }
    7068
    71 Layout* LaserRangeFinder::GetLayout(void) const
    72 {
    73 return sensor_tab;
    74 }
     69void LaserRangeFinder::UseDefaultPlot(void) {
     70  if (tab == NULL) {
     71    Err("not applicable for simulation part.\n");
     72    return;
     73  }
    7574
    76 
    77 RangeFinderPlot* LaserRangeFinder::GetPlot(void) const
    78 {
    79 return plot;
    80 }
    81 
    82 void LaserRangeFinder::UseDefaultPlot(void)
    83 {
    84     if(tab==NULL)
    85     {
    86         Err("not applicable for simulation part.\n");
    87         return;
    88     }
    89 
    90     plot_tab=new Tab(tab,"Mesures");
    91     plot=new RangeFinderPlot(plot_tab->NewRow(),"plot","x",-30,30,"y",-30,30,output,0,359,output->Rows());
     75  plot_tab = new Tab(tab, "Mesures");
     76  plot = new RangeFinderPlot(plot_tab->NewRow(), "plot", "x", -30, 30, "y", -30,
     77                             30, output, 0, 359, output->Rows());
    9278}
    9379} // end namespace sensor
Note: See TracChangeset for help on using the changeset viewer.