New calibration method
This commit is contained in:
parent
ec2fd8038b
commit
fbaeb54b60
|
@ -22,6 +22,9 @@ inline double k2f(double k) { return c2f(k2c(k)); } // Kelvin to Fahrenheit
|
|||
inline double a2d(int a) { return V_in * a / analog_max; }
|
||||
inline int d2a(double d) { return d * analog_max / V_in; }
|
||||
|
||||
// Voltage to resistance conversion
|
||||
inline double v2r(double V_out) { return R_k * (V_in / V_out - 1); }
|
||||
|
||||
// Utility functions
|
||||
// No C++ standard library :(
|
||||
void sort(double a[], int n) {
|
||||
|
|
|
@ -19,6 +19,8 @@ inline double k2f(double k);
|
|||
inline double a2d(int a);
|
||||
inline int d2a(double d);
|
||||
|
||||
inline double v2r(double V_out);
|
||||
|
||||
void sort(double a[], int n);
|
||||
|
||||
void calculate();
|
||||
|
|
|
@ -6,5 +6,6 @@ f2k KEYWORD2
|
|||
k2f KEYWORD2
|
||||
a2d KEYWORD2
|
||||
d2a KEYWORD2
|
||||
v2r KEYWORD2
|
||||
sort KEYWORD2
|
||||
calculate KEYWORD2
|
Loading…
Reference in a new issue