To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: CDMS_HK.h
- Revision:
- 309:6ed5535ac465
- Parent:
- 308:7c3872365d58
- Child:
- 310:bd591ef82b76
- Child:
- 311:af5ab655ba00
--- a/CDMS_HK.h Sun Oct 09 07:08:34 2016 +0000 +++ b/CDMS_HK.h Tue Nov 01 07:18:59 2016 +0000 @@ -288,6 +288,7 @@ SelectLinec1=0; SelectLinec2=0; SelectLinec3=0; + wait_ms(1); //gPC.printf("\r%d %d %d %d\n",SelectLinec3.read(),SelectLinec2.read(),SelectLinec1.read(),SelectLinec0.read()); for(Iteration=0; Iteration<16; Iteration++) { @@ -300,18 +301,21 @@ SelectLinec2=!(SelectLinec2); if(Iteration%8==7) SelectLinec3=!(SelectLinec3); - //gPC.printf("\r%d %d %d %d\n",SelectLinec3.read(),SelectLinec2.read(),SelectLinec1.read(),SelectLinec0.read()); + wait_ms(1); + // gPC.printf("\r%d %d %d %d\n",SelectLinec3.read(),SelectLinec2.read(),SelectLinec1.read(),SelectLinec0.read()); } actual_data.CDMS_temp_actual=(-90.7*3.3*CDMS_temp_sensor.read())+190.1543; -// gPC.printf("\rRaw Temp = %f\n",actual_data.temp_actual[15]*3.3); + for(Iteration=0; Iteration<16; Iteration++) { if(Iteration<4) - actual_data.temp_actual[Iteration]=actual_data.temp_actual[Iteration]*3.3*20; - + {actual_data.temp_actual[Iteration]=actual_data.temp_actual[Iteration]*3.3*2; + // gPC.printf("\rVoltage reading, iteration = %f, %d \n",actual_data.temp_actual[Iteration], Iteration); + // wait_ms(1); + } else if(Iteration<14){ resistance=24300*actual_data.temp_actual[Iteration]*3.3/(3.3-actual_data.temp_actual[Iteration]*3.3);