Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
Diff: common_functions.h
- Revision:
- 354:eb6c863756a8
- Parent:
- 352:022c513aee03
- Child:
- 356:4484bf39526f
diff -r e1803e801e20 -r eb6c863756a8 common_functions.h
--- a/common_functions.h Tue Feb 21 06:30:56 2017 +0000
+++ b/common_functions.h Sat Mar 11 05:52:18 2017 +0000
@@ -156,26 +156,37 @@
gFLAGS = gFLAGS & ~(COM_PA_OC_FLAG);\
/*P_CDMS_HANDLE_HW_FAULTS*/\
}
-
#define isPAhot(returnHere){\
uint8_t pa_temp = 0;\
+ float pa_temp1 = 0;\
SelectLinec0=0;\
SelectLinec1=0;\
SelectLinec2=0;\
SelectLinec3=1;\
- pa_temp = TempInput.read();\
- pa_temp = pa_temp * 3.3;\
+ wait_ms(1);\
+ pa_temp1 = TempInput.read();\
+ pa_temp1 = pa_temp1 * 3.3;\
float resistance;\
- resistance = 24000 * pa_temp/(3.3 - pa_temp);\
- if(pa_temp > 1.47) {\
- pa_temp = 3694/log(24.032242*resistance);\
+ resistance = 24000 * pa_temp1/(3.3 - pa_temp1);\
+ if(pa_temp1 > 1.47) {\
+ pa_temp1 = (3694/log(24.032242*resistance))-273;\
}\
else{\
- pa_temp = 3365.4/log(7.60573*resistance);\
+ pa_temp1 = (3365.4/log(7.60573*resistance))-273;\
}\
- COM_PA_IC_TMP = quantiz(tstart_thermistor,tstep_thermistor,pa_temp);\
+ gPC.printf("PA Temp = %f \r\n",pa_temp1);\
+ float pa_volt = 0;\
+ SelectLinec0=0;\
+ SelectLinec1=0;\
+ SelectLinec2=0;\
+ SelectLinec3=0;\
+ wait_ms(1);\
+ pa_volt = 2*3.3*TempInput.read();\
+ gPC.printf("PA V = %f r\n",pa_volt);\
+ COM_PA_IC_TMP = quantiz(tstart_thermistor,tstep_thermistor,pa_temp1);\
+ COM_PA_TMP_IN_TX = COM_PA_IC_TMP;\
/*comment this ater*/\
- COM_PA_IC_TMP = 0;\
+ COM_PA_IC_TMP = 0;\
/*COM_PA_TMP_HIGH to be found*/\
if (COM_PA_IC_TMP > COM_PA_TMP_HIGH){\
returnHere = 0xFF;\
