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

Last change on this file since 45 was 15, checked in by Bayard Gildas, 8 years ago

sources reformatted with flair-format-dir script

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