Miscellaneous Library, read Encoder etc.

Dependents:   My_Libraries

Committer:
altb
Date:
Wed Mar 06 14:38:04 2019 +0000
Revision:
2:1c5c71a6fac9
Parent:
0:3312872854c4
.....

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb 0:3312872854c4 1 // Linear Characteristics for different purposes (map Voltage to acc etc.)
altb 0:3312872854c4 2
altb 0:3312872854c4 3
altb 0:3312872854c4 4 #ifndef LINEAR_CHARACTERISTICS_H_
altb 0:3312872854c4 5 #define LINEAR_CHARACTERISTICS_H_
altb 0:3312872854c4 6
altb 0:3312872854c4 7
altb 0:3312872854c4 8 class LinearCharacteristics{
altb 0:3312872854c4 9 public:
altb 0:3312872854c4 10 LinearCharacteristics(){};
altb 0:3312872854c4 11 LinearCharacteristics(float, float);
altb 0:3312872854c4 12 LinearCharacteristics(float, float, float, float);
altb 0:3312872854c4 13 LinearCharacteristics(float, float, float, float, float, float);
altb 0:3312872854c4 14 float evaluate(float);
altb 0:3312872854c4 15 void setup(float, float, float, float);
altb 0:3312872854c4 16 void setup(float, float, float, float, float, float);
altb 0:3312872854c4 17 float operator()(float x){
altb 0:3312872854c4 18 return evaluate(x);
altb 0:3312872854c4 19 }
altb 0:3312872854c4 20 //...
altb 0:3312872854c4 21 virtual ~LinearCharacteristics();
altb 0:3312872854c4 22 // here: the calculation function
altb 0:3312872854c4 23
altb 0:3312872854c4 24 private:
altb 0:3312872854c4 25 // here: private functions and values...
altb 0:3312872854c4 26 float gain;
altb 0:3312872854c4 27 float offset;
altb 0:3312872854c4 28 float ulim;
altb 0:3312872854c4 29 float llim;
altb 0:3312872854c4 30 };
altb 0:3312872854c4 31
altb 0:3312872854c4 32
altb 0:3312872854c4 33 #endif // LINEAR_CHARACTERISTICS_H_