TeamSurface / Mbed 2 deprecated RT2_P3

Dependencies:   mbed

Fork of RT2_P3_students_G4 by RT2_P3_students

LinearCharacteristics.h

Committer:
sipru
Date:
2018-05-15
Revision:
12:e18fdd404660
Parent:
10:85840c065e00

File content as of revision 12:e18fdd404660:

// Linear Characteristics for different purposes (map Voltage to acc etc.)


#ifndef LINEAR_CHARACTERISTICS_H_
#define LINEAR_CHARACTERISTICS_H_   


class LinearCharacteristics{
     public:
                // here: the calculation function
    LinearCharacteristics(float gain, float offset);
    LinearCharacteristics(float xmin, float xmax,float ymin,float ymax);
    
    float eval(float x);
    virtual ~LinearCharacteristics();
    
    float operator () (float x){
        return eval(x);
        } 
    private:
        // here: private functions and values...

        float gain;
        float offset;
        

};


#endif      // LINEAR_CHARACTERISTICS_H_