BA / Mbed 2 deprecated RT2_P3_DAC_test

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LinearCharacteristics.h Source File

LinearCharacteristics.h

00001 #ifndef LINEAR_CHARACTERISTICS_H_
00002 #define LINEAR_CHARACTERISTICS_H_
00003 
00004 #include <cstdlib>
00005 #include <mbed.h>
00006 
00007 // Linear Characteristics for different purposes (map Voltage to acc etc.)
00008 class LinearCharacteristics
00009 {
00010 public:
00011 
00012     LinearCharacteristics(float k, float offset, float min, float max);
00013     float trans(float input);
00014 
00015 //    float operator()(float input) {
00016 //        return trans(input);
00017 //    }
00018     //...
00019     //...
00020     virtual     ~LinearCharacteristics();
00021     // here: the calculation function
00022 
00023 
00024 private:
00025     // here: private functions and values...
00026     float k;
00027     float offset;
00028     float output;
00029     float min;
00030     float max;
00031 
00032 };
00033 
00034 #endif