To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: COM_MNG_TMTC.h
- Revision:
- 49:1103da5a87f5
- Parent:
- 43:4bc440bbad2f
diff -r 4bc440bbad2f -r 1103da5a87f5 COM_MNG_TMTC.h --- a/COM_MNG_TMTC.h Sat Jan 09 10:51:34 2016 +0000 +++ b/COM_MNG_TMTC.h Wed Jan 13 14:19:47 2016 +0000 @@ -423,6 +423,9 @@ // CDMS TEAM CODE START inline Base_tm* FCTN_CDMS_RLY_TMTC(Base_tc *tc_ptr){ +// CDMS TEAM CODE START ( + +inline Base_tm* FCTN_CDMS_RLY_TMTC(Base_tc *tc_ptr){ uint8_t ACKCODE = 0x00; printf("\rTC execution in progress\r\n"); Base_tm *tm_pointer = new Long_tm; @@ -462,12 +465,12 @@ tm_print = tm_print->next_TM; //for check } received = 0; - return tm_ptr; + tm_pointer->next_TM = NULL; return tm_ptr; } else { printf("Telemetry is not received from BAE\r\n"); - //tm_pointer = new Short_tm; + tm_pointer = new Short_tm; tm_pointer->TM_string[0] = 0xB0; tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); tm_pointer->TM_string[2] = 0x01; @@ -480,6 +483,7 @@ crc16 = crc16_gen(tm_ptr->TM_string,11); tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; } break; @@ -491,510 +495,509 @@ { case 0x60: { - printf("service:MMS\r\n"); - switch(GETservice_subtype(tc_ptr)) + printf("service:MMS\r\n"); + switch(GETservice_subtype(tc_ptr)) + { + case 0x1: { - case 0x1: - { printf("sub_service:Read from RAM_Memory\r\n"); mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); - - Data[0] = FCTN_CDMS_RD_FLASH(0); - Data[1] = FCTN_CDMS_RD_FLASH(1); - //tm_pointer = new Long_tm; - tm_pointer->TM_string[0] = 0x30; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = (uint8_t)(flash_counter); - for(uint8_t i=0;i<4;i++) - { - tm_pointer->TM_string[3+i] = (uint8_t)((Data[0]>>(8*i))&0x00FF); - } - for(uint8_t i=4;i<8;i++) - { - tm_pointer->TM_string[3+i] = (uint8_t)((Data[1]>>(8*i))&0x00FF); - } - crc16 = crc16_gen(tm_ptr->TM_string,9); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - } - case 0x2: + + Data[0] = FCTN_CDMS_RD_FLASH(0); + Data[1] = FCTN_CDMS_RD_FLASH(1); + tm_pointer = new Long_tm; + tm_pointer->TM_string[0] = 0x30; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = (uint8_t)(flash_counter); + for(uint8_t i=0;i<4;i++) { + tm_pointer->TM_string[3+i] = (uint8_t)((Data[0]>>(8*i))&0x00FF); + } + for(uint8_t i=4;i<8;i++) + { + tm_pointer->TM_string[3+i] = (uint8_t)((Data[1]>>(8*i))&0x00FF); + } + crc16 = crc16_gen(tm_ptr->TM_string,9); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + } + case 0x2: + { printf("sub_service:Read from Flash_Memory\r\n"); mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); - - Data[0] = FCTN_CDMS_RD_FLASH(0); - Data[1] = FCTN_CDMS_RD_FLASH(1); - //tm_pointer = new Long_tm; - tm_pointer->TM_string[0] = 0x30; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = (uint8_t)(flash_counter); - for(uint8_t i=0;i<4;i++) - { - tm_pointer->TM_string[3+i] = (uint8_t)((Data[0]>>(8*i))&0x00FF); - } - for(uint8_t i=4;i<8;i++) - { - tm_pointer->TM_string[3+i] = (uint8_t)((Data[1]>>(8*i))&0x00FF); - } - crc16 = crc16_gen(tm_ptr->TM_string,9); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - } - case 0x5: + + Data[0] = FCTN_CDMS_RD_FLASH(0); + Data[1] = FCTN_CDMS_RD_FLASH(1); + tm_pointer = new Long_tm; + //tm_pointer = new Long_tm; + tm_pointer->TM_string[0] = 0x30; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = (uint8_t)(flash_counter); + for(uint8_t i=0;i<4;i++) { + tm_pointer->TM_string[3+i] = (uint8_t)((Data[0]>>(8*i))&0x00FF); + } + for(uint8_t i=4;i<8;i++) + { + tm_pointer->TM_string[3+i] = (uint8_t)((Data[1]>>(8*i))&0x00FF); + } + crc16 = crc16_gen(tm_ptr->TM_string,9); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + } + case 0x5: + { printf("WRITE ON FLASH_MEMORY\r\n"); - mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); - block = (((uint32_t)(tc_ptr->TC_string[5])<<24)|((uint32_t)(tc_ptr->TC_string[5])<<16)|((uint32_t)(tc_ptr->TC_string[5])<<8)|((uint32_t)(tc_ptr->TC_string[5]))); - FCTN_CDMS_WR_FLASH(mid,block); - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = 0x01; - tm_pointer->TM_string[3] = ACKCODE; //ackcode to be decided - tm_pointer->TM_string[4] = 0x01; - for(uint8_t i=0;i<6;i++) - { - tm_pointer->TM_string[i+5] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - default: + mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); + block = (((uint32_t)(tc_ptr->TC_string[5])<<24)|((uint32_t)(tc_ptr->TC_string[5])<<16)|((uint32_t)(tc_ptr->TC_string[5])<<8)|((uint32_t)(tc_ptr->TC_string[5]))); + FCTN_CDMS_WR_FLASH(mid,block); + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = 0x01; + tm_pointer->TM_string[3] = ACKCODE; //ackcode to be decided + tm_pointer->TM_string[4] = 0x01; + for(uint8_t i=0;i<6;i++) + { + tm_pointer->TM_string[i+5] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + default: + { + printf("INVALID TC\r\n"); //Send Invalid TC Telemetry + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = 0x01; + tm_pointer->TM_string[3] = ACKCODE; //ackcode to be decided + tm_pointer->TM_string[4] = 0x01; + for(uint8_t i=0;i<6;i++) + { + tm_pointer->TM_string[i+5] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + } + break; + } + } + case 0x8: + { + printf("service:FUNCTION MANAGEMENT SERVICE\r\n"); + if(GETservice_subtype(tc_ptr)==0x1) + { + if(GETpid(tc_ptr)==0x01) + { + printf("TC_PL_INIT\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x02) + { + printf("TC_PL_MAIN\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x03) + { + printf("TC_COM_INIT\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) { - printf("INVALID TC\r\n"); //Send Invalid TC Telemetry - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = 0x01; - tm_pointer->TM_string[3] = ACKCODE; //ackcode to be decided - tm_pointer->TM_string[4] = 0x01; - for(uint8_t i=0;i<6;i++) - { - tm_pointer->TM_string[i+5] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x04) + { + printf("TC_CDMS_HK_MAIN\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x11) + { + printf("TC_SW_ON_SD\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x12) + { + printf("TC_SW_ON_RTC\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x13) + { + printf("TC_SW_ON_BAE\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x14) + { + printf("TC_SW_ON_PL_DL\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x15) + { + printf("TC_SW_ON_PL_AG_HV\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; break; - - } - case 0x8: - { - printf("service:FUNCTION MANAGEMENT SERVICE\r\n"); - if(GETservice_subtype(tc_ptr)==0x1) - { - if(GETpid(tc_ptr)==0x01) - { - printf("TC_PL_INIT\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x02) - { - printf("TC_PL_MAIN\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x03) - { - printf("TC_COM_INIT\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x04) - { - printf("TC_CDMS_HK_MAIN\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x11) - { - printf("TC_SW_ON_SD\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x12) - { - printf("TC_SW_ON_RTC\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x13) - { - printf("TC_SW_ON_BAE\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x14) - { - printf("TC_SW_ON_PL_DL\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x15) - { - printf("TC_SW_ON_PL_AG_HV\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x16) - { - printf("TC_SW_ON_V_A_EN\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x21) - { - printf("TC_SW_OFF_SD\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x22) - { - printf("TC_SW_OFF_RTC\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x23) - { - printf("TC_SW_OFF_BAE\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x24) - { - printf("TC_SW_OFF_PL_DL\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x25) - { - printf("TC_SW_OFF_PL_AG_HV\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x26) - { - printf("TC_SW_OFF_V_A_EN\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x31) - { - printf("TC_RST_SD\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x32) - { - printf("TC_RST_RTC\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x33) - { - printf("TC_RST_BAE\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0x34) - { - printf("TC_RST_PL_DL\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - break; - } - else if(GETpid(tc_ptr)==0xC1) - { - printf("RESET_HK_COUNTER\r\n"); // call PWR_SWCH_ON function - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = ACKCODE; - for(uint8_t i=3;i<11;i++) - { - tm_pointer->TM_string[i] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - break; - } - else if(GETpid(tc_ptr)==0xF1) - { - printf("RD_RTC\r\n"); //call RD_RTC - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xD0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = 0x01; - uint64_t time = FCTN_CDMS_RD_RTC(); - tm_pointer->TM_string[3] = (uint8_t)((time&0xFF00000000000000)>>56); - tm_pointer->TM_string[4] = (uint8_t)((time&0x00FF000000000000)>>48); - tm_pointer->TM_string[5] = (uint8_t)((time&0x0000FF0000000000)>>40); - tm_pointer->TM_string[6] = (uint8_t)((time&0x000000FF00000000)>>32); - tm_pointer->TM_string[7] = (uint8_t)((time&0x00000000FF000000)>>24); - tm_pointer->TM_string[8] = (uint8_t)((time&0x0000000000FF0000)>>16); - tm_pointer->TM_string[9] = (uint8_t)((time&0x000000000000FF00)>>8); - tm_pointer->TM_string[10] = (uint8_t)(time&0x00000000000000FF); - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - } - else - { - printf("INVALID TC\r\n"); - //tm_pointer = new Short_tm; - tm_pointer->TM_string[0] = 0xB0; - tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); - tm_pointer->TM_string[2] = 0x01; - tm_pointer->TM_string[3] = ACKCODE; //ackcode to be decided - tm_pointer->TM_string[4] = 0x01; - for(uint8_t i=0;i<6;i++) - { - tm_pointer->TM_string[i+5] = 0; - } - crc16 = crc16_gen(tm_ptr->TM_string,11); - tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); - tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; - } - } - } - } + } + else if(GETpid(tc_ptr)==0x16) + { + printf("TC_SW_ON_V_A_EN\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x21) + { + printf("TC_SW_OFF_SD\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x22) + { + printf("TC_SW_OFF_RTC\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x23) + { + printf("TC_SW_OFF_BAE\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x24) + { + printf("TC_SW_OFF_PL_DL\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x25) + { + printf("TC_SW_OFF_PL_AG_HV\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x26) + { + printf("TC_SW_OFF_V_A_EN\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x31) + { + printf("TC_RST_SD\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x32) + { + printf("TC_RST_RTC\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x33) + { + printf("TC_RST_BAE\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0x34) + { + printf("TC_RST_PL_DL\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + break; + } + else if(GETpid(tc_ptr)==0xC1) + { + printf("RESET_HK_COUNTER\r\n"); // call PWR_SWCH_ON function + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = ACKCODE; + for(uint8_t i=3;i<11;i++) + { + tm_pointer->TM_string[i] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + break; + } + else if(GETpid(tc_ptr)==0xF1) + { + printf("RD_RTC\r\n"); //call RD_RTC + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xD0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = 0x01; + uint64_t time = FCTN_CDMS_RD_RTC(); + tm_pointer->TM_string[3] = (uint8_t)((time&0xFF00000000000000)>>56); + tm_pointer->TM_string[4] = (uint8_t)((time&0x00FF000000000000)>>48); + tm_pointer->TM_string[5] = (uint8_t)((time&0x0000FF0000000000)>>40); + tm_pointer->TM_string[6] = (uint8_t)((time&0x000000FF00000000)>>32); + tm_pointer->TM_string[7] = (uint8_t)((time&0x00000000FF000000)>>24); + tm_pointer->TM_string[8] = (uint8_t)((time&0x0000000000FF0000)>>16); + tm_pointer->TM_string[9] = (uint8_t)((time&0x000000000000FF00)>>8); + tm_pointer->TM_string[10] = (uint8_t)(time&0x00000000000000FF); + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + } + else + { + printf("INVALID TC\r\n"); + tm_pointer = new Short_tm; + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = 0x01; + tm_pointer->TM_string[3] = ACKCODE; //ackcode to be decided + tm_pointer->TM_string[4] = 0x01; + for(uint8_t i=0;i<6;i++) + { + tm_pointer->TM_string[i+5] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; return tm_ptr; + } + } } default: { printf("INVALID TC"); //send invalid TC TM - //tm_pointer = new Short_tm; + tm_pointer = new Short_tm; tm_pointer->TM_string[0] = 0xB0; tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); tm_pointer->TM_string[2] = 0x01; @@ -1007,7 +1010,7 @@ crc16 = crc16_gen(tm_ptr->TM_string,11); tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; + tm_pointer->next_TM = NULL; return tm_ptr; break; } } @@ -1035,7 +1038,7 @@ default: //invalid TC { printf("INVALID TC\r\n"); - //tm_pointer = new Short_tm; + tm_pointer = new Short_tm; tm_pointer->TM_string[0] = 0xB0; tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); tm_pointer->TM_string[2] = 0x01; @@ -1048,12 +1051,13 @@ crc16 = crc16_gen(tm_ptr->TM_string,11); tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); - return tm_ptr; + tm_pointer->next_TM = NULL; return tm_ptr; break; } - } + } } // CDMS TEAM CODE END +// CDMS TEAM CODE END // EXECUTE OBOSC #define execute_obosc_core(tc_ptr, tm_ptr) {\ @@ -1326,6 +1330,7 @@ else{\ gPC.printf("cdms relay tmtc at %u\r\n", execute_psc);\ put_tm_here = FCTN_CDMS_RLY_TMTC(current_TC);\ + gPC.printf("first : %02X\n",put_tm_here->TM_string[0]);\ }\ /*DETECT ACK OR NACK*/\ uint8_t temp83 = 0x00;\ @@ -1392,13 +1397,18 @@ else{\ length = TM_LONG_SIZE;\ }\ + gPC.printf("\ndata: \n");\ /*gPC.puts("Printing Call Sign, ACK_L1, TM list");*/\ for(int i = 0 ; i < length ; ++i){\ + gPC.putc(tm_ptr->TM_string[i]);\ + /*gPC.putc(tm_ptr->TM_string[i]);*/\ gPC.printf("%02X",tm_ptr->TM_string[i]);\ }\ tm_ptr = tm_ptr->next_TM;\ }\ /*SEND DATA TO GS*/\ + /*snd_tm.head_pointer(tm_ptr_head);*/\ + /*adf_not_SDcard();*/\ snd_tm.head_pointer(tm_ptr_head);\ adf_not_SDcard;\ /*DELETE THE TM AFTER USE*/\ @@ -1480,4 +1490,4 @@ gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);\ gFLAGS = gFLAGS & (~COM_SESSION_FLAG);\ }\ -} \ No newline at end of file +}