![](/media/cache/group/nine_tails_kurama_by_zubair43-d4zyf5s.jpg.50x50_q85.jpg)
ACS completed fully. All cases to be tested
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of ACS_Flowchart_BAE by
Diff: EPS.cpp
- Revision:
- 6:036d08b62785
- Parent:
- 5:bb592f3185cc
- Child:
- 7:a46a1dee4497
--- a/EPS.cpp Thu Dec 31 17:12:52 2015 +0000 +++ b/EPS.cpp Fri Jan 22 19:51:50 2016 +0000 @@ -1,9 +1,11 @@ #include "EPS.h" #include "pin_config.h" +#include "iostream" /***********************************************global variable declaration***************************************************************/ extern uint32_t BAE_STATUS; extern uint32_t BAE_ENABLE; -extern uint8_t BAE_data[73]; +extern uint8_t BAE_data[74]; +extern char BAE_chardata[74]; //m_I2C.frequency(10000) const char RCOMP0= 0x97; @@ -193,10 +195,12 @@ for(Iteration=0;Iteration<3;Iteration++){ quant_data.AngularSpeed_quant[Iteration]=actual_data.AngularSpeed_actual[Iteration]; + printf("\n\r w value %f",quant_data.AngularSpeed_quant[Iteration]); } for(Iteration=0;Iteration<3;Iteration++){ quant_data.Bvalue_quant[Iteration]=actual_data.Bvalue_actual[Iteration]; + printf("\n\r b value %f",quant_data.Bvalue_quant[Iteration]); } quant_data.Batt_voltage_quant=quantiz(vstart,vstep,actual_data.Batt_voltage_actual); @@ -210,7 +214,7 @@ arch_data.faultPoll_status=actual_data.faultPoll_status; arch_data.faultIr_status=actual_data.faultIr_status; arch_data.Batt_voltage=quant_data.Batt_voltage_quant; - + printf("\n\r in hk"); } @@ -229,8 +233,14 @@ FCTN_CONVERT_FLOAT(quant_data.Batt_gauge_alerts,&BAE_data[33]); BAE_data[37] = quant_data.BAE_temp_quant; FCTN_CONVERT_FLOAT(quant_data.AngularSpeed_quant[0],&BAE_data[38]); + //printf("\n\r outside %d %d %d %d", BAE_data[38],BAE_data[39],BAE_data[40],BAE_data[41]); + //std:: cout << "\n\r uint8 outside " << BAE_data[38] << '\t' << BAE_data[39] << '\t' << BAE_data[40] << '\t' << BAE_data[41] <<std::endl; FCTN_CONVERT_FLOAT(quant_data.AngularSpeed_quant[1],&BAE_data[42]); + //std:: cout << "\n\r uint8 outside " << BAE_data[42] << '\t' << BAE_data[43] << '\t' << BAE_data[44] << '\t' << BAE_data[45] <<std::endl; + // printf("\n\r outside %d %d %d %d", BAE_data[42],BAE_data[43],BAE_data[44],BAE_data[45]); FCTN_CONVERT_FLOAT(quant_data.AngularSpeed_quant[2],&BAE_data[46]); + //printf("\n\r outside %d %d %d %d", BAE_data[46],BAE_data[47],BAE_data[48],BAE_data[49]); + //std:: cout << "\n\r uint8 outside " << BAE_data[46] << '\t' << BAE_data[47] << '\t' << BAE_data[48] << '\t' << BAE_data[49] <<std::endl; FCTN_CONVERT_FLOAT(quant_data.Bvalue_quant[0],&BAE_data[50]); FCTN_CONVERT_FLOAT(quant_data.Bvalue_quant[1],&BAE_data[54]); FCTN_CONVERT_FLOAT(quant_data.Bvalue_quant[2],&BAE_data[58]); @@ -247,6 +257,11 @@ BAE_data[71] = arch_data.faultPoll_status; BAE_data[72] = arch_data.faultIr_status; BAE_data[73] = arch_data.Batt_voltage; + for(int i=0; i<73;i++) + BAE_chardata[i] = (char)BAE_data[i]; + BAE_chardata[73] = '\0'; + printf("\n\r bae ats data %c %c %c %c", BAE_chardata[38],BAE_chardata[39],BAE_chardata[40],BAE_chardata[41]); + printf("\n\r BAE data is %s", BAE_chardata); }