To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: COM_POWER_ON_TX.h
- Revision:
- 5:ab276a17ca07
- Parent:
- 4:104dd82c99b8
- Child:
- 12:ffdb29353058
--- a/COM_POWER_ON_TX.h Tue Dec 29 06:50:19 2015 +0000 +++ b/COM_POWER_ON_TX.h Wed Dec 30 06:36:38 2015 +0000 @@ -2,12 +2,13 @@ gPC.puts("Inside COM_POWER_ON_TX\r\n");\ if( !(gFLAGS & COM_TX_FLAG) ){\ gFLAGS = gFLAGS | COM_TX_FLAG;\ - /*WARNING: INFINITE WHILE LOOP POSSIBLE*/\ - bool retryFlag = false;\ + /*WARNING: INFINITE WHILE LOOP POSSIBLE: if standby ack received and bcn tx main status = 0*/\ + bool retryFlag = true;\ while( retryFlag == true ){\ - uint8_t standbyAck = 0x00;\ + uint8_t standbyAck = 0xFF;\ /*PENDING: SET BEACON TO STANDBY*/\ if( standbyAck == 0xFF ){\ + /*ACK RECCEIVED*/\ /*PENDING: BEACON TX MAIN STATUS*/\ if( true ){\ retryFlag = false;\ @@ -41,7 +42,7 @@ }\ }\ /*PENDING: POWER ON COM_TX*/\ - uint8_t adfConfigPass = 0x00;\ + uint8_t adfConfigPass = 0xFF;\ for( int i = 0 ; i < COM_TX_CONFIG_LIMIT ; ++i ){\ /*PENDING: CONFIGURE ADF*/\ if( adfConfigPass == 0xFF ){\ @@ -70,6 +71,7 @@ }\ get_tc_list(power_on_tm->next_TM, 0x00);\ /*PENDING: TRANSMIT ABOVE TM*/\ + /*deleting the telemetry*/\ power_on_tm = power_on_tm_head;\ overFlowCountADF = 0;\ while( power_on_tm != NULL ){\