Template for group 4

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

Committer:
altb
Date:
Sun Apr 22 19:54:59 2018 +0000
Revision:
7:01a7363583b2
Parent:
5:72982ede2ff6
Child:
10:85840c065e00
P3_2

Who changed what in which revision?

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