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

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

filter and meta

File size: 2.1 KB
Line 
1//  created:    2014/04/11
2//  filename:   UavMultiplex.cpp
3//
4//  author:     Guillaume Sanahuja
5//              Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7//  version:    $Id: $
8//
9//  purpose:    Class defining uav multiplexing
10//
11//
12/*********************************************************************/
13
14#include "UavMultiplex.h"
15#include "UavMultiplex_impl.h"
16#include <cvmatrix.h>
17#include <FrameworkManager.h>
18#include <Tab.h>
19#include <GridLayout.h>
20
21using std::string;
22using namespace flair::core;
23using namespace flair::gui;
24
25namespace flair
26{
27namespace filter
28{
29
30UavMultiplex::UavMultiplex(const core::FrameworkManager* parent,std::string name) : IODevice(parent,name)
31{
32    pimpl_=new UavMultiplex_impl(parent,this,name);
33}
34
35UavMultiplex::~UavMultiplex(void)
36{
37    delete pimpl_;
38}
39
40void UavMultiplex::Update(core::Time time)
41{
42    pimpl_->input->SetDataTime(time);
43    UpdateFrom(pimpl_->input);
44}
45
46void UavMultiplex::SetMultiplexComboBox(string name,int index)
47{
48    pimpl_->SetMultiplexComboBox(name,index);
49}
50
51int UavMultiplex::MultiplexValue(int index) const
52{
53    return pimpl_->MultiplexValue(index);
54}
55
56TabWidget* UavMultiplex::GetTabWidget(void) const
57{
58    return pimpl_->tabwidget;
59}
60
61Layout* UavMultiplex::GetLayout(void) const
62{
63    return pimpl_->setup_tab;
64}
65
66void UavMultiplex::LockUserInterface(void) const
67{
68    pimpl_->setup_tab->setEnabled(false);
69}
70
71void UavMultiplex::UnlockUserInterface(void) const
72{
73    pimpl_->setup_tab->setEnabled(true);
74}
75
76void UavMultiplex::SetRoll(float value)
77{
78    pimpl_->input->SetValue(0,0,value);
79}
80
81void UavMultiplex::SetPitch(float value)
82{
83    pimpl_->input->SetValue(1,0,value);
84}
85
86void UavMultiplex::SetYaw(float value)
87{
88    pimpl_->input->SetValue(2,0,value);
89}
90
91void UavMultiplex::SetThrust(float value)
92{
93    pimpl_->input->SetValue(3,0,value);
94}
95
96void UavMultiplex::SetRollTrim(float value)
97{
98    pimpl_->input->SetValue(4,0,value);
99}
100
101void UavMultiplex::SetPitchTrim(float value)
102{
103    pimpl_->input->SetValue(5,0,value);
104}
105
106void UavMultiplex::SetYawTrim(float value)
107{
108    pimpl_->input->SetValue(6,0,value);
109}
110
111} // end namespace filter
112} // end namespace flair
Note: See TracBrowser for help on using the repository browser.