Cube_Mini_Solution
Dependencies: mbed QEI MPU6050 BLE_API nRF51822 MCP4725 eMPL_MPU6050
Diff: LinearCharacteristics.h
- Revision:
- 0:8e87cdf07037
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LinearCharacteristics.h Fri Jan 31 17:59:21 2020 +0000 @@ -0,0 +1,33 @@ +// 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_