source: flair-src/trunk/lib/FlairFilter/src/X4X8Multiplex.cpp@ 7

Last change on this file since 7 was 7, checked in by Sanahuja Guillaume, 8 years ago

filter and meta

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