source: flair-src/trunk/lib/FlairFilter/src/NestedSat.cpp @ 15

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

sources reformatted with flair-format-dir script

File size: 1.3 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:    2013/04/15
6//  filename:   NestedSat.cpp
7//
8//  author:     Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Class defining a PID with saturations
14//
15//
16/*********************************************************************/
17
18#include "NestedSat.h"
19#include "NestedSat_impl.h"
20#include <cvmatrix.h>
21#include <Layout.h>
22#include <LayoutPosition.h>
23#include <Euler.h>
24
25using std::string;
26using namespace flair::core;
27using namespace flair::gui;
28
29namespace flair {
30namespace filter {
31
32NestedSat::NestedSat(const LayoutPosition *position, string name)
33    : ControlLaw(position->getLayout(), name) {
34  pimpl_ = new NestedSat_impl(this, position, name);
35}
36
37NestedSat::~NestedSat(void) { delete pimpl_; }
38
39void NestedSat::UpdateFrom(const io_data *data) {
40  pimpl_->UpdateFrom(data);
41  ProcessUpdate(output);
42}
43
44void NestedSat::SetValues(float p_ref, float p, float d) {
45  input->SetValue(0, 0, p_ref);
46  input->SetValue(1, 0, p);
47  input->SetValue(2, 0, d);
48}
49// TODO: add a combobox to choose between rad and deg
50void NestedSat::ConvertSatFromDegToRad(void) { pimpl_->k = Euler::ToRadian(1); }
51
52} // end namespace filter
53} // end namespace flair
Note: See TracBrowser for help on using the repository browser.