-data logging revision

Dependencies:   FastPWM

Committer:
ernstpre
Date:
Tue Aug 24 08:51:13 2021 +0000
Revision:
2:92c25cb669f4
Parent:
0:d2e117716219
Publish Commit 24/8/21

Who changed what in which revision?

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