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

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

lic

File size: 1.5 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
21using std::string;
22using namespace flair::core;
23using namespace flair::gui;
24
25namespace flair
26{
27namespace filter
28{
29
30X4X8Multiplex::X4X8Multiplex(const FrameworkManager* parent,std::string name,UavType_t type) : UavMultiplex(parent,name)
31{
32 int nb_mot;
33
34 switch(type)
35 {
36 case X4:
37 nb_mot=4;
38 break;
39 case X8:
40 nb_mot=8;
41 break;
42 default:
43 Err("uav type not supported\n");
44 break;
45 }
46
47 pimpl_=new X4X8Multiplex_impl(this,nb_mot);
48
49 for(int i=0;i<nb_mot;i++)
50 {
51 SetMultiplexComboBox(pimpl_->MotorName(i),i);
52 }
53}
54
55X4X8Multiplex::~X4X8Multiplex(void)
56{
57 delete pimpl_;
58}
59
60uint8_t X4X8Multiplex::MotorsCount(void) const
61{
62 return pimpl_->nb_mot;
63}
64
65void X4X8Multiplex::UseDefaultPlot(void)
66{
67 pimpl_->UseDefaultPlot();
68}
69
70void X4X8Multiplex::UpdateFrom(const io_data *data)
71{
72 pimpl_->UpdateFrom(data);
73}
74
75} // end namespace filter
76} // end namespace flair
Note: See TracBrowser for help on using the repository browser.