working version

Dependencies:   mbed mbed-rtos SimpleDMA FreescaleIAP eeprom

Fork of CDMS_CODE_FM_28JAN2017 by samp Srinivasan

Revision:
318:978d72f191f9
Parent:
264:f7d8f9f361e3
Child:
321:42bdefc37270
--- a/common_functions.h	Thu Dec 08 07:12:16 2016 +0000
+++ b/common_functions.h	Thu Dec 08 13:12:34 2016 +0000
@@ -155,14 +155,13 @@
 
 #define isPAhot(returnHere){\
     uint8_t pa_temp = 0;\
-    uint8_t pa_temp_quant = 0;\
     SelectLinec0=0;\
     SelectLinec1=0;\
     SelectLinec2=0;\
     SelectLinec3=1;\
     pa_temp = TempInput.read();\
     pa_temp = pa_temp * 3.3;\
-    int resistance;\
+    float resistance;\
     resistance = 24000 * pa_temp/(3.3 - pa_temp);\
     if(pa_temp > 1.47) {\
         pa_temp = 3694/log(24.032242*resistance);\
@@ -170,9 +169,11 @@
     else{\
         pa_temp = 3365.4/log(7.60573*resistance);\
     }\
-    pa_temp_quant = quantiz(tstart_thermistor,tstep_thermistor,pa_temp);\
-    pa_temp_quant = 0;\
-    if (pa_temp_quant > COM_PA_TMP_HIGH){\
+    COM_PA_IC_TMP = quantiz(tstart_thermistor,tstep_thermistor,pa_temp);\
+    /*comment this ater*/\
+    COM_PA_IC_TMP = 0;\
+    /*COM_PA_TMP_HIGH to be found*/\
+    if (COM_PA_IC_TMP > COM_PA_TMP_HIGH){\
         returnHere = 0xFF;\
         gPC.puts("PA is measured HOT\r\n");\
     }\