Template for group 4

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

Committer:
altb
Date:
Mon Apr 09 08:01:29 2018 +0000
Revision:
2:769ce5f06d3e
Parent:
1:a30512c3ac73
Child:
4:2cc56521aa16
Changes from pmic

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 2:769ce5f06d3e 10 LinearCharacteristics(float,float);
altb 2:769ce5f06d3e 11 LinearCharacteristics(float,float,float,float);
altb 2:769ce5f06d3e 12 float operator()(float u){
altb 2:769ce5f06d3e 13 return eval(u);
altb 2:769ce5f06d3e 14 }
altb 0:78ca29b4c49e 15 //...
altb 2:769ce5f06d3e 16 virtual ~LinearCharacteristics();
altb 2:769ce5f06d3e 17 float eval(float);
altb 2:769ce5f06d3e 18
altb 0:78ca29b4c49e 19 // here: the calculation function
altb 0:78ca29b4c49e 20
altb 0:78ca29b4c49e 21 private:
altb 0:78ca29b4c49e 22 // here: private functions and values...
altb 2:769ce5f06d3e 23 float gain;
altb 2:769ce5f06d3e 24 float offset;
altb 1:a30512c3ac73 25 };
altb 1:a30512c3ac73 26
altb 1:a30512c3ac73 27
altb 1:a30512c3ac73 28 #endif // LINEAR_CHARACTERISTICS_H_