source: flair-src/trunk/lib/FlairFilter/src/LowPassFilter.cpp @ 157

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

iadded isready to iodevice:
avoid problem of imu not ready in ardrone2

File size: 1.4 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:    2011/05/01
6//  filename:   LowPassFilter.cpp
7//
8//  author:     Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Class defining a first order low pass filter
14//
15//
16/*********************************************************************/
17
18#include "LowPassFilter.h"
19#include "LowPassFilter_impl.h"
20#include <cvmatrix.h>
21#include <LayoutPosition.h>
22
23using std::string;
24using namespace flair::core;
25using namespace flair::gui;
26
27namespace flair {
28namespace filter {
29
30LowPassFilter::LowPassFilter(const IODevice *parent,
31                             const LayoutPosition *position, string name,
32                             const cvmatrix *init_value)
33    : IODevice(parent, name) {
34  pimpl_ = new LowPassFilter_impl(this, position, name, init_value);
35  AddDataToLog(pimpl_->output);
36 
37  SetIsReady(true);
38}
39
40LowPassFilter::~LowPassFilter() { delete pimpl_; }
41
42cvmatrix *LowPassFilter::Matrix(void) const { return pimpl_->output; }
43
44float LowPassFilter::Output(int row, int col) const {
45  return pimpl_->output->Value(row, col);
46}
47
48void LowPassFilter::UpdateFrom(const io_data *data) {
49  pimpl_->UpdateFrom(data);
50  ProcessUpdate(pimpl_->output);
51}
52
53} // end namespace filter
54} // end namespace flair
Note: See TracBrowser for help on using the repository browser.