Last change
on this file since 137 was 137, checked in by Sanahuja Guillaume, 8 years ago |
singleton manager
|
File size:
1.3 KB
|
Rev | Line | |
---|
[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[7] | 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 |
|
---|
[15] | 25 | namespace flair {
|
---|
| 26 | namespace filter {
|
---|
[7] | 27 |
|
---|
[137] | 28 | X4X8Multiplex::X4X8Multiplex(std::string name,UavType_t type)
|
---|
| 29 | : UavMultiplex( name) {
|
---|
[15] | 30 | int nb_mot;
|
---|
[7] | 31 |
|
---|
[15] | 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 | }
|
---|
[7] | 43 |
|
---|
[15] | 44 | pimpl_ = new X4X8Multiplex_impl(this, nb_mot);
|
---|
[7] | 45 |
|
---|
[15] | 46 | for (int i = 0; i < nb_mot; i++) {
|
---|
| 47 | SetMultiplexComboBox(pimpl_->MotorName(i), i);
|
---|
| 48 | }
|
---|
[7] | 49 | }
|
---|
| 50 |
|
---|
[15] | 51 | X4X8Multiplex::~X4X8Multiplex(void) { delete pimpl_; }
|
---|
[7] | 52 |
|
---|
[15] | 53 | uint8_t X4X8Multiplex::MotorsCount(void) const { return pimpl_->nb_mot; }
|
---|
[7] | 54 |
|
---|
[15] | 55 | void X4X8Multiplex::UseDefaultPlot(void) { pimpl_->UseDefaultPlot(); }
|
---|
[7] | 56 |
|
---|
[15] | 57 | void X4X8Multiplex::UpdateFrom(const io_data *data) {
|
---|
| 58 | pimpl_->UpdateFrom(data);
|
---|
[7] | 59 | }
|
---|
| 60 |
|
---|
| 61 | } // end namespace filter
|
---|
| 62 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.