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 mbed-rtos mbed
Fork of workinQM_10thDec by
Diff: EPS.cpp
- Revision:
- 17:fc782f7548c6
- Parent:
- 15:e09aaaccf134
- Child:
- 19:79e69017c855
diff -r f9e484dc505e -r fc782f7548c6 EPS.cpp --- a/EPS.cpp Thu May 12 10:56:44 2016 +0000 +++ b/EPS.cpp Fri May 13 11:56:49 2016 +0000 @@ -134,12 +134,22 @@ SelectLinea3=!(SelectLinea3); int s0,s1,s2,s3; s0=SelectLineb0=SelectLinea0; - s1=SelectLineb1=SelectLinea2; + s1=SelectLineb1=SelectLinea1;// changed to s2=SelectLineb2=SelectLinea2; s3=SelectLineb3=SelectLinea3; printf("\n\r %d %d %d %d", s0,s1,s2,s3); } + + + //_____________________________________________________________________________________________ + +/// for(Iteration=0; Iteration<16; Iteration++) + { +/// printf("\n\rRaw data is for voltage %f",actual_data.voltage_actual[Iteration]); + } + //_____________________________________________________________________________________________ + for(Iteration=0; Iteration<16; Iteration++){ if(Iteration==14) @@ -147,6 +157,24 @@ else actual_data.voltage_actual[Iteration]= actual_data.voltage_actual[Iteration]*3.3*5.63; } + + //_____________________________________________________________________________________________ + +/// for(Iteration=0; Iteration<16; Iteration++) + { +/// printf("\n\ractual data is for voltage %f",actual_data.voltage_actual[Iteration]); + } + //_____________________________________________________________________________________________ + + + + //_____________________________________________________________________________________________ + +/// for(Iteration=0; Iteration<16; Iteration++) + { +/// printf("\n\rRAW data is for current %f",actual_data.current_actual[Iteration]); + } + //_____________________________________________________________________________________________ for(Iteration=0;Iteration<12;Iteration++){ if(Iteration<8) @@ -165,6 +193,17 @@ actual_data.current_actual[Iteration]=3365.4/log(7.60573*resistance); } } + + + //_____________________________________________________________________________________________ + +/// for(Iteration=0; Iteration<16; Iteration++) + { +/// printf("\n\ractual data is for current %f",actual_data.current_actual[Iteration]); + } + //_____________________________________________________________________________________________ + + actual_data.BAE_temp_actual=(-90.7*3.3*actual_data.BAE_temp_actual)+190.1543; actual_data.Batt_voltage_actual=Batt_voltage.read()*3.3*5.63;