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

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

lic

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