![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Repo for COM_MNG_TMTC_SIMPLE for integration with adf
Fork of COM_MNG_TMTC_SIMPLE by
COM_POWER_ON_TX.h
- Committer:
- shekhar
- Date:
- 2015-12-31
- Revision:
- 9:9dbd59a6cc30
- Parent:
- 5:ab276a17ca07
File content as of revision 9:9dbd59a6cc30:
#define COM_POWER_ON_TX {\ gPC.puts("Inside COM_POWER_ON_TX\r\n");\ if( !(gFLAGS & COM_TX_FLAG) ){\ gFLAGS = gFLAGS | COM_TX_FLAG;\ /*WARNING: INFINITE WHILE LOOP POSSIBLE: if standby ack received and bcn tx main status = 0*/\ bool retryFlag = true;\ while( retryFlag == true ){\ uint8_t standbyAck = 0xFF;\ /*PENDING: SET BEACON TO STANDBY*/\ if( standbyAck == 0xFF ){\ /*ACK RECCEIVED*/\ /*PENDING: BEACON TX MAIN STATUS*/\ if( true ){\ retryFlag = false;\ /*PENDING: SWITCH RELAY TO COM_TX*/\ /*PENDING: RF_SW_STATUS = RF_COM_TX*/\ }\ else{\ gCOM_MNG_TMTC_THREAD->wait(5000);\ }\ }\ else{\ /*PENDING: RESET BAE*/\ uint8_t standbyAck2 = 0x00;\ /*PENDING: SET BEACON TO STANDBY*/\ if( standbyAck2 == 0xFF ){\ /*PENDING: BEACON TX MAIN STAUTS*/\ if( true ){\ retryFlag = false;\ /*PENDING: SWITCH RF RELAY TO COM TX*/\ /*PENDING: RF_SW_STATUS = RF_COM_TX*/\ }\ }\ else{\ retryFlag = false;\ /*PENDING: POWER OFF BEACON*/\ /*PENDING: CLEAR BAE SW_EN*/\ /*PENDING: SWITCH RF RELAY TO COM TX*/\ /*PENDING: RF_SW_STATUS = RF_COM_TX*/\ }\ }\ }\ }\ /*PENDING: POWER ON COM_TX*/\ uint8_t adfConfigPass = 0xFF;\ for( int i = 0 ; i < COM_TX_CONFIG_LIMIT ; ++i ){\ /*PENDING: CONFIGURE ADF*/\ if( adfConfigPass == 0xFF ){\ break;\ }\ }\ if( adfConfigPass == 0xFF ){\ /*adf successfully configured*/\ /*CALL SIGN*/\ Base_tm *power_on_tm = NULL;\ Base_tm *power_on_tm_head = NULL;\ get_call_sign( power_on_tm_head );\ power_on_tm = power_on_tm_head;\ /*ACK L1*/\ get_ack_l1(power_on_tm->next_TM);\ int overFlowCountADF = 0;\ while( power_on_tm->next_TM != NULL ){\ if( overFlowCountADF < TM_OVERFLOW_CONSTANT ){\ power_on_tm = power_on_tm->next_TM;\ ++overFlowCountADF;\ }\ else{\ /*PENDING: RESET CDMS*/\ break;\ }\ }\ 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 ){\ if( overFlowCountADF < TM_OVERFLOW_CONSTANT ){\ Base_tm *temp = power_on_tm->next_TM;\ delete power_on_tm;\ power_on_tm = temp;\ ++overFlowCountADF;\ }\ else{\ /*PENDING: RESET CDMS*/\ break;\ }\ }\ }\ else{\ /*PENDING: COM_POWER OFF TX*/\ /*PENDING: CDMS HK MAIN*/\ uint8_t ackReceived = 0x00;\ /*PENDING: BCN TX MAIN*/\ if( ackReceived == 0xFF ){\ gCOM_MNG_TMTC_THREAD->wait(5000);\ /*PENDING: RESET CDMS*/\ }\ else{\ /*PENDING: RESET CDMS*/\ }\ }\ gPC.puts("COMPLETED COM_POWER_ON_TX\r\n");\ }