Jim Patterson / Mbed 2 deprecated MultiSensor_00

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Decimator Class Reference

Decimator Class Reference

Decimator class to implement simple low-pass filtering on uC Unsigned integer decimator. More...

#include <daq.h>

Public Member Functions

 Decimator (uint8_t)
 Decimator class to implement simple low-pass filtering on uC.
void write (uint16_t)
 Data input function Write a new value into the decimator.
uint16_t read ()
 Data output function Read the decimated signal.

Detailed Description

Decimator class to implement simple low-pass filtering on uC Unsigned integer decimator.

Depth up to 32 samples. Currently just behaves as a uniform weighted FIR

Definition at line 37 of file daq.h.


Constructor & Destructor Documentation

Decimator ( uint8_t  order )

Decimator class to implement simple low-pass filtering on uC.

Decimator constructor. Constructor to zero circular decimation buffer and pointers. As init state is zero accumulator is safe from underflow on subtraction.

Definition at line 105 of file daq.cpp.


Member Function Documentation

uint16_t read (  )

Data output function Read the decimated signal.

Definition at line 138 of file daq.cpp.

void write ( uint16_t  in_sample )

Data input function Write a new value into the decimator.

Input is unsigned 16bits, max decimation length is 32 (5bits) so 32 bit accumulator is safe from overflow

Definition at line 122 of file daq.cpp.