This lib is supposed to be used as a sensor's calibration or control program. This makes Cubic Spline Model from some sample plots(sets of (value, voltage)), and then discretize the model (dividing the range of voltage into some steps) in order to use the calibrated model data without getting the INVERSE function.

Revision:
1:2053662b1167
Parent:
0:e85788b14028
Child:
3:b56e933bebc2
--- a/TRP105F_Spline.cpp	Fri Feb 12 11:02:15 2016 +0000
+++ b/TRP105F_Spline.cpp	Tue Feb 16 07:52:38 2016 +0000
@@ -65,7 +65,7 @@
     int idx;
     unsigned short pv = 0;
 
-    //low pass filter
+    //  low-pass filter
     for(int i = 0; i < 10; i++)
         pv += g_Sensor_Voltage.read_u16() / 10;
 
@@ -117,8 +117,9 @@
     unsigned short tmp_vol;
     VDset tmp_set[_ENUM];   // for bucket sort
 
-    //  Evry set, first get dst data via serai com,
-    //  next, get vol data,
+    //  For evry set, 
+    //  1, get dst data via serai com,
+    //  2, get vol data,
     //  and then do same for next index set.
     for(int i = 0; i < _Sample_Num; i++) {
         //