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 RAJANGAM_REVIEW_BAE_CODE by
Diff: EPS.cpp
- Revision:
- 76:293693fb7949
- Parent:
- 75:d05b0005ca50
- Child:
- 77:6a5f6e1c7a35
--- a/EPS.cpp Sat Dec 10 10:51:46 2016 +0000 +++ b/EPS.cpp Sat Dec 10 11:28:22 2016 +0000 @@ -162,7 +162,7 @@ //eps cdms fault extern uint8_t CDMS_SW_STATUS; extern DigitalIn CDMS_OC_FAULT; -extern bool CDMS_SW_ENABLE; +extern bool CDMS_SW_ENABLE; //Temp name for CDMS_RESET pin extern int CDMS_FAULT_COUNTER; extern uint8_t EPS_BTRY_HTR_AUTO; @@ -194,8 +194,9 @@ extern int ACS_ATS2_FAULT_COUNTER; /********* EXTERN BCN VAR ********************/ +extern DigitalOut BCN_SW; //Beacon switch extern uint8_t BCN_TX_SW_STATUS; -extern bool BCN_TX_ENABLE; +//extern bool BCN_TX_ENABLE; //Temp variable in place of BCN_SW extern DigitalIn BCN_TX_OC_FAULT; extern int BCN_TX_FAULT_COUNTER; extern uint8_t BCN_TMP; @@ -252,7 +253,7 @@ /*now if this solves the problem then turn it back and observe if it works if doesn't then chane at other places also */ - if(CDMS_SW_STATUS == 0b11)/*changed to just hex representation see if this solve the purpose->earlier 0b11)*/ //powered on and oc fault + if(CDMS_SW_STATUS == 0b11)/*changed to just hex representation see if this solve the purpose->earlier 0b11*/ //powered on and oc fault if(CDMS_OC_FAULT) // !CDMS_OC_FAULT 0 means badman, 1 means good man // changed CDMS_SW_STATUS = 0b01;//chaged from 0b01; //powered on and working else @@ -271,7 +272,7 @@ CDMS_SW_STATUS = 0b11; //changed->0b11; //powered on and oc fault else { - CDMS_SW_ENABLE = 0; //power OFF switch + CDMS_SW_ENABLE = 0; //Temp name //power OFF switch CDMS_SW_STATUS = 0b10; //chaged->0b10; //powered off and oc fault } } @@ -330,7 +331,7 @@ ACS_TR_XY_FAULT_COUNTER = 0; } } -/* + //--------ACS_ATS1--------// //Same as ACS_ATS2 //if(ACS_ATS1_SW_STATUS & 0b1100 != 0b1100) //!disabled @@ -338,7 +339,7 @@ { //if(ACS_ATS1_SW_STATUS & 0b1100 == 0b1000) //oc fault and powered off if(ACS_ATS_STATUS&0xC0!=0x80) - ATS1_SW_ENABLE = 1; //Temp name + ATS1_SW_ENABLE = 1; //if(ACS_ATS1_OC_FAULT) if(0) { @@ -373,7 +374,7 @@ { //if(ACS_ATS2_SW_STATUS & 0b1100 == 0b1000) //oc fault and powered off if(ACS_ATS_STATUS&0x0C!=0x08) - ATS2_SW_ENABLE = 0; //Temp name + ATS2_SW_ENABLE = 0; //if(ACS_ATS2_OC_FAULT) if(0) { @@ -402,20 +403,20 @@ } } - */ + printf(""); //--------BCN_TX----------// - /* Commented out to test BCN TC + if(BCN_TX_SW_STATUS != 0b11) //!disabled { if(BCN_TX_SW_STATUS == 0b10) //oc fault and powered off - BCN_TX_ENABLE = 1; //Temp name + BCN_SW = 1; if(BCN_TX_OC_FAULT==0) { - BCN_TX_ENABLE = 0; + BCN_SW = 0; BCN_TX_FAULT_COUNTER++; //Temp name if(BCN_TX_FAULT_COUNTER == 3) BCN_TX_SW_STATUS = 0b11; //disabled @@ -430,7 +431,7 @@ BCN_TX_FAULT_COUNTER = 0; } } - */ + } //----------------------------------------------------Power algo code--------------------------------------------------------------------//