Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: LinearCharacteristics.h
- Revision:
- 21:cef093edb441
- Parent:
- 2:252a61a7e8f9
--- a/LinearCharacteristics.h Tue Apr 10 12:25:13 2018 +0000
+++ b/LinearCharacteristics.h Thu May 17 11:15:36 2018 +0000
@@ -1,18 +1,27 @@
+// Linear Characteristics for different purposes (map Voltage to acc etc.)
+
+
+#ifndef LINEAR_CHARACTERISTICS_H_
+#define LINEAR_CHARACTERISTICS_H_
+
+
class LinearCharacteristics{
public:
- LinearCharacteristics(float k,float offset);
- LinearCharacteristics(float k,float offset,float);
- LinearCharacteristics(float k,float offset,float,float);
- float operator()(float u){
- return eval(u);
- }
- virtual ~LinearCharacteristics();
- float eval(float);
+ LinearCharacteristics(float, float);
+ LinearCharacteristics(float, float, float, float);
+ float evaluate(float);
+ float operator()(float x){
+ return evaluate(x);
+ }
+ //...
+ virtual ~LinearCharacteristics();
+ // here: the calculation function
private:
-
- float k;
+ // here: private functions and values...
+ float gain;
float offset;
- float lower_limit;
- float upper_limit;
-};
\ No newline at end of file
+};
+
+
+#endif // LINEAR_CHARACTERISTICS_H_
\ No newline at end of file