Fertig
Dependencies: mbed
Fork of RT2_P3_students by
LinearCharacteristics.h@9:dc0eb7dd0d92, 2018-04-17 (annotated)
- Committer:
- Kiwicjam
- Date:
- Tue Apr 17 13:30:52 2018 +0000
- Revision:
- 9:dc0eb7dd0d92
- Parent:
- 7:72982ede2ff6
start p4 pi lauft
Who changed what in which revision?
User | Revision | Line number | New 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 | 7:72982ede2ff6 | 10 | LinearCharacteristics(float, float); |
Kiwicjam | 9:dc0eb7dd0d92 | 11 | LinearCharacteristics(float, float ,float ,float); |
altb | 7:72982ede2ff6 | 12 | float evaluate(float); |
altb | 7:72982ede2ff6 | 13 | float operator()(float x){ |
altb | 7:72982ede2ff6 | 14 | return evaluate(x); |
altb | 7:72982ede2ff6 | 15 | } |
altb | 6:2cc56521aa16 | 16 | //... |
altb | 3:769ce5f06d3e | 17 | virtual ~LinearCharacteristics(); |
altb | 6: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 | 7:72982ede2ff6 | 22 | float gain; |
altb | 7:72982ede2ff6 | 23 | float offset; |
altb | 1:a30512c3ac73 | 24 | }; |
altb | 1:a30512c3ac73 | 25 | |
altb | 1:a30512c3ac73 | 26 | |
altb | 1:a30512c3ac73 | 27 | #endif // LINEAR_CHARACTERISTICS_H_ |