sd 32 update

Dependencies:   FreescaleIAP mbed-rtos mbed

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
39:a41468817921
Parent:
35:3beac900a034
Child:
40:51b9e5540992
--- a/COM_MNG_TMTC.h	Thu Jan 07 10:35:40 2016 +0000
+++ b/COM_MNG_TMTC.h	Sat Jan 09 06:16:49 2016 +0000
@@ -425,8 +425,8 @@
 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_ptr = new Long_tm;
-    Base_tm *tm_pointer = tm_ptr;
+    Base_tm *tm_pointer = new Long_tm;
+    Base_tm *tm_ptr = tm_pointer;
     received = 0;
     switch(GETapid(tc_ptr))
     {
@@ -501,7 +501,7 @@
                             {                                 
                                     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);
@@ -516,6 +516,7 @@
                                     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:
@@ -525,7 +526,7 @@
                             {                                                                 
                                     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);
@@ -1394,7 +1395,7 @@
                                 }\
                                 /*gPC.puts("Printing Call Sign, ACK_L1, TM list");*/\
                                 for(int i = 0 ; i < length ; ++i){\
-                                    gPC.putc(tm_ptr->TM_string[i]);\
+                                    gPC.printf("%02X",tm_ptr->TM_string[i]);\
                                 }\
                                 tm_ptr = tm_ptr->next_TM;\
                             }\