for frequency correction testing

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
276:605dd29161ad
Parent:
264:f7d8f9f361e3
--- a/common_functions.h	Wed Jul 20 09:58:59 2016 +0000
+++ b/common_functions.h	Sat Jul 23 23:37:46 2016 +0000
@@ -154,15 +154,15 @@
 }
 
 #define isPAhot(returnHere){\
-    uint8_t pa_temp = 0;\
-    uint8_t pa_temp_quant = 0;\
+    float pa_temp = 0;\
+    float 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);\
@@ -171,7 +171,7 @@
         pa_temp = 3365.4/log(7.60573*resistance);\
     }\
     pa_temp_quant = quantiz(tstart_thermistor,tstep_thermistor,pa_temp);\
-    pa_temp_quant = 0;\
+    /*pa_temp_quant = 0;*/\
     if (pa_temp_quant > COM_PA_TMP_HIGH){\
         returnHere = 0xFF;\
         gPC.puts("PA is measured HOT\r\n");\
@@ -184,12 +184,14 @@
 
 #define isPAoc(returnHere){\
     if (COM_TX_OC_FAULT){\
-        returnHere = 0xFF;\
+        returnHere = 0;\
+        gPC.puts("PA is measured not OC\r\n");\
     }\
     else{\
-        returnHere = 0;\
+        returnHere = 0xFF;\
+        gPC.puts("PA is measured OC\r\n");\
     }\
-    returnHere = 0;\
+    /*returnHere = 0;*/\
 }
 
 #define get_call_sign(tm_ptr) {\