Last change
on this file since 137 was 137, checked in by Sanahuja Guillaume, 8 years ago |
singleton manager
|
File size:
1.3 KB
|
Line | |
---|
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/04/10
|
---|
6 | // filename: X4X8Multiplex.cpp
|
---|
7 | //
|
---|
8 | // author: Guillaume Sanahuja
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Class defining X4 and X8 multiplexing
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 |
|
---|
18 | #include "X4X8Multiplex.h"
|
---|
19 | #include "X4X8Multiplex_impl.h"
|
---|
20 |
|
---|
21 | using std::string;
|
---|
22 | using namespace flair::core;
|
---|
23 | using namespace flair::gui;
|
---|
24 |
|
---|
25 | namespace flair {
|
---|
26 | namespace filter {
|
---|
27 |
|
---|
28 | X4X8Multiplex::X4X8Multiplex(std::string name,UavType_t type)
|
---|
29 | : UavMultiplex( name) {
|
---|
30 | int nb_mot;
|
---|
31 |
|
---|
32 | switch (type) {
|
---|
33 | case X4:
|
---|
34 | nb_mot = 4;
|
---|
35 | break;
|
---|
36 | case X8:
|
---|
37 | nb_mot = 8;
|
---|
38 | break;
|
---|
39 | default:
|
---|
40 | Err("uav type not supported\n");
|
---|
41 | break;
|
---|
42 | }
|
---|
43 |
|
---|
44 | pimpl_ = new X4X8Multiplex_impl(this, nb_mot);
|
---|
45 |
|
---|
46 | for (int i = 0; i < nb_mot; i++) {
|
---|
47 | SetMultiplexComboBox(pimpl_->MotorName(i), i);
|
---|
48 | }
|
---|
49 | }
|
---|
50 |
|
---|
51 | X4X8Multiplex::~X4X8Multiplex(void) { delete pimpl_; }
|
---|
52 |
|
---|
53 | uint8_t X4X8Multiplex::MotorsCount(void) const { return pimpl_->nb_mot; }
|
---|
54 |
|
---|
55 | void X4X8Multiplex::UseDefaultPlot(void) { pimpl_->UseDefaultPlot(); }
|
---|
56 |
|
---|
57 | void X4X8Multiplex::UpdateFrom(const io_data *data) {
|
---|
58 | pimpl_->UpdateFrom(data);
|
---|
59 | }
|
---|
60 |
|
---|
61 | } // end namespace filter
|
---|
62 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.