Latest FM Code with EEPROM
Dependencies: FreescaleIAP SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
Diff: COM_MNG_TMTC.h
- Revision:
- 79:aa2d0f67b693
- Parent:
- 78:8501118c428f
--- a/COM_MNG_TMTC.h Tue Jan 19 05:58:08 2016 +0000 +++ b/COM_MNG_TMTC.h Tue Jan 19 05:59:02 2016 +0000 @@ -1407,47 +1407,13 @@ /*read_TC(current_TC);*/\ uint8_t tempExec = TC_STATE_SUCCESSFULLY_EXECUTED;\ PUTexec_status(current_TC, tempExec);\ - /*PENDING: ABORT ON NACK CHECK, gMASTER_STATE VERIFICATION WITH SD CARD, session timeout, last executed ack l234*/\ + /*PENDING: ABORT ON NACK CHECK, gMASTER_STATE VERIFICATION WITH SD CARD,PA hot and session timeout, last executed ack l234*/\ if( (GETexec_status(current_TC) == TC_STATE_EXECUTION_FAILED) && (GETabort_on_nack(current_TC) == 1) ){\ gMASTER_STATE = TCL_STATE_ABORTED;\ }\ else if( execute_psc == (gTOTAL_VALID_TC-1) ){\ gMASTER_STATE = TCL_STATE_COMPLETED;\ }\ - else{\ - uint8_t check1 = 1;\ - for( uint8_t test_psc = execute_psc+1 ; test_psc < gTOTAL_VALID_TC ; ++test_psc ){\ - Base_tc* test_TC = gHEAD_NODE_TCL;\ - while(test_TC != NULL){\ - if( GETpacket_seq_count(test_TC) == test_psc ){\ - uint8_t checkval;\ - isit_obosc(test_TC, checkval);\ - if( checkval == 0 ){\ - check1 = 0;\ - }\ - }\ - test_TC = test_TC->next_TC;\ - }\ - }\ - if( check1 == 0x01 ){\ - gMASTER_STATE = TCL_STATE_COMPLETED;\ - }\ - }\ - /*update last executed L1_ack*/\ - if( put_tm_here != NULL ){\ - if( GETshort_or_long_tm(put_tm_here->fields) == SHORT_TM_CODE ){\ - for(int i = 0 ; i < TM_SHORT_SIZE ; ++i){\ - gLAST_TM[i] = put_tm_here->TM_string[i];\ - gLAST_TM_SHORT_OR_LONG = SHORT_TM_CODE;\ - }\ - }\ - else{\ - for( int i = 0 ; i < TM_LONG_SIZE ; ++i ){\ - gLAST_TM[i] = put_tm_here->TM_string[i];\ - gLAST_TM_SHORT_OR_LONG = LONG_TM_CODE;\ - }\ - }\ - }\ /*PENDING: APPEND ACK L1*/\ Base_tm *tm_ptr = tm_ptr_head;\ get_ack_l1(tm_ptr->next_TM);\ @@ -1469,39 +1435,10 @@ if( tempPAhot == 0x00 ){\ gFLAGS = gFLAGS | COM_PA_HOT_FLAG;\ }\ - tm_ptr = tm_ptr_head;\ - while( tm_ptr != NULL ){\ - int length = TM_SHORT_SIZE;\ - if( GETshort_or_long_tm(tm_ptr->fields) == SHORT_TM_CODE ){\ - length = TM_SHORT_SIZE;\ - }\ - else{\ - length = TM_LONG_SIZE;\ - }\ - /*gPC.puts("Printing Call Sign, ACK_L1, TM list");*/\ - for(int i = 0 ; i < length ; ++i){\ - /*gPC.putc(tm_ptr->TM_string[i]);*/\ - }\ - tm_ptr = tm_ptr->next_TM;\ - }\ - /*SEND DATA TO GS*/\ - /*snd_tm.head_pointer(tm_ptr_head);*/\ - /*adf_SDcard();*/\ - /*DELETE THE TM AFTER USE*/\ - tm_ptr = tm_ptr_head;\ - overflowCountExecute = 0;\ - while(tm_ptr != NULL){\ - if( overflowCountExecute < TM_OVERFLOW_CONSTANT ){\ - Base_tm *temp = tm_ptr->next_TM;\ - delete tm_ptr;\ - tm_ptr = temp;\ - ++overflowCountExecute;\ - }\ - else{\ - /*PENDING: RESET CDMS*/\ - break;\ - }\ - }\ + /*Send only call sign, ACK_L1, OBSRS TM*/\ + snd_tm.head_pointer(tm_ptr_head);\ + adf_not_SDcard;\ + delete_all_tm(tm_ptr_head);\ }\ }\ break;\