-data logging revision

Dependencies:   FastPWM

Lib_Misc/LinearCharacteristics.h

Committer:
ernstpre
Date:
2021-08-24
Revision:
2:92c25cb669f4
Parent:
0:d2e117716219

File content as of revision 2:92c25cb669f4:

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


#ifndef LINEAR_CHARACTERISTICS_H_
#define LINEAR_CHARACTERISTICS_H_   


class LinearCharacteristics{
     public:
            LinearCharacteristics(){};
            LinearCharacteristics(float, float);
            LinearCharacteristics(float, float, float, float);
            LinearCharacteristics(float, float, float, float, float, float);
            float evaluate(float);
            void setup(float, float, float, float);
            void setup(float, float, float, float, float, float);
            float operator()(float x){
                return evaluate(x);
                } 
                //...
                virtual     ~LinearCharacteristics();
                // here: the calculation function
    
    private:
        // here: private functions and values...
        float gain;
        float offset;
        float ulim;
        float llim;
};


#endif      // LINEAR_CHARACTERISTICS_H_