Simple program for introduction of mirror actuator.

Committer:
altb2
Date:
Thu Mar 07 06:52:26 2019 +0000
Revision:
0:a56e9c932891
Redesign, no Libs

Who changed what in which revision?

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