Test program with the RT black boxes

Dependencies:   mbed

Committer:
pmic
Date:
Wed May 15 13:58:10 2019 +0000
Revision:
43:a577f752dd7a
Parent:
22:cef093edb441
Add new instantiation option to surpress the printout for rt mbed

Who changed what in which revision?

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