1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | // created: 2014/07/22
|
---|
6 | // filename: LaserRangeFinder.cpp
|
---|
7 | //
|
---|
8 | // author: César RICHARD
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Classe generique des recepteurs LaserRangeFinder
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 |
|
---|
18 | #include "LaserRangeFinder.h"
|
---|
19 | #include <Matrix.h>
|
---|
20 | #include <Tab.h>
|
---|
21 | #include <TabWidget.h>
|
---|
22 | #include <GridLayout.h>
|
---|
23 | #include <GroupBox.h>
|
---|
24 | #include <PushButton.h>
|
---|
25 | #include <FrameworkManager.h>
|
---|
26 | #include <Label.h>
|
---|
27 | #include <RangeFinderPlot.h>
|
---|
28 | #include <string.h>
|
---|
29 |
|
---|
30 | using std::string;
|
---|
31 | using namespace flair::core;
|
---|
32 | using namespace flair::gui;
|
---|
33 |
|
---|
34 | namespace flair {
|
---|
35 | namespace sensor {
|
---|
36 |
|
---|
37 | LaserRangeFinder::LaserRangeFinder(string name)
|
---|
38 | : IODevice(getFrameworkManager(), name) {
|
---|
39 | MatrixDescriptor *desc = new MatrixDescriptor(360, 1);
|
---|
40 | output = new Matrix(this, desc, floatType);
|
---|
41 | delete desc;
|
---|
42 | AddDataToLog(output);
|
---|
43 | Warn("output matrix is created in LaserRangeFinder and utm30lx\n");
|
---|
44 | // station sol
|
---|
45 | main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name);
|
---|
46 | tab = new TabWidget(main_tab->NewRow(), name);
|
---|
47 | sensor_tab = new Tab(tab, "Reglages");
|
---|
48 | setup_groupbox = new GroupBox(sensor_tab->NewRow(), name);
|
---|
49 | }
|
---|
50 |
|
---|
51 | LaserRangeFinder::~LaserRangeFinder() {}
|
---|
52 |
|
---|
53 | GroupBox *LaserRangeFinder::GetGroupBox(void) const { return setup_groupbox; }
|
---|
54 |
|
---|
55 | Layout *LaserRangeFinder::GetLayout(void) const { return sensor_tab; }
|
---|
56 |
|
---|
57 | RangeFinderPlot *LaserRangeFinder::GetPlot(void) const { return plot; }
|
---|
58 |
|
---|
59 | void LaserRangeFinder::UseDefaultPlot(void) {
|
---|
60 | plot_tab = new Tab(tab, "Mesures");
|
---|
61 | plot = new RangeFinderPlot(plot_tab->NewRow(), "plot", "x", -30, 30, "y", -30,
|
---|
62 | 30, output, 0, 359, output->Rows());
|
---|
63 | }
|
---|
64 | } // end namespace sensor
|
---|
65 | } // end namespace flair
|
---|