Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Files at this revision

API Documentation at this revision

Comitter:
ee12b079
Date:
Fri Jan 15 08:59:09 2016 +0000
Parent:
55:39e59903bc3a
Child:
59:29a37f943ba6
Child:
60:768056b558b2
Commit message:
Made changes for printing type1 and type0 tm frames in snd_tm. This is for bypassing adf and sending directly to APS.

Changed in this revision

COM_MNG_TMTC.h Show annotated file Show diff for this revision Revisions of this file
COM_SND_TM.h Show annotated file Show diff for this revision Revisions of this file
DefinitionsAndGlobals.h Show annotated file Show diff for this revision Revisions of this file
--- a/COM_MNG_TMTC.h	Thu Jan 14 15:00:25 2016 +0000
+++ b/COM_MNG_TMTC.h	Fri Jan 15 08:59:09 2016 +0000
@@ -10,6 +10,8 @@
 //added RLY_TMTC function
 //added included related files
 
+#define print_in_snd_tm 1
+
 #include "pinconfig.h"
 #include "i2c.h"
 #include "Flash.h"
@@ -1297,7 +1299,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.putc(tm_ptr->TM_string[i]);*/\
                             }\
                             tm_ptr = tm_ptr->next_TM;\
                         }\
@@ -1430,7 +1432,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.putc(tm_ptr->TM_string[i]);*/\
                                 }\
                                 tm_ptr = tm_ptr->next_TM;\
                             }\
@@ -1536,7 +1538,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.putc(tm_ptr->TM_string[i]);*/\
                                 }\
                                 tm_ptr = tm_ptr->next_TM;\
                             }\
--- a/COM_SND_TM.h	Thu Jan 14 15:00:25 2016 +0000
+++ b/COM_SND_TM.h	Fri Jan 15 08:59:09 2016 +0000
@@ -12,6 +12,8 @@
 const unsigned char FCCH80[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
 const unsigned char SCH40[] = {0x0a,0x3f,0x46,0xb4,0x00};
 const unsigned char EXOR_SEQ[] = {0x55,0xF1,0x51,0x3D,0xA7,0x42,0xAE,0x2E,0x2E,0x28,0x76,0x80,0x62,0x41,0xC4,0x75,0x4D,0x87,0xDB,0xE1,0x02,0x61,0x60,0x96,0x9C,0xCB,0x8A,0xBD,0x37,0xE4,0x72,0x5D,0xF2,0x19,0x62,0x06,0x9A,0xF9,0x38,0xB0,0x49,0x75,0xD0,0x17,0x1B,0xCC,0x0B,0xEB,0x1B,0x50,0xA2,0x2A,0x8E,0xFA,0x4D,0x6F,0x1B,0xF8,0x0F,0x97,0x39,0x25,0x60,0x55,0x9A,0xDF,0x1D,0x10,0x7F,0xBD,0x3E,0xBF,0xE5,0x68,0x02,0xD1,0x99,0x0D,0xDF,0x84,0x2E,0x15,0xE3,0x08,0xD7,0x44,0x10,0x41,0xCE,0x93,0xF6,0x59,0x71,0xD2,0xF7,0x1C,0x4A,0x44,0x2D,0xA9,0x44,0x98,0x3A,0x00,0x71,0xCC,0x2A,0x35,0xC1,0x81,0xCF,0x44,0xF7,0x6A,0x0E,0xE4,0xF2,0xFC,0xD6,0x0B,0xA8,0x95,0x7B,0x86,0xB5,0xF8,0x33,0xE9,0xBF,0x6A,0x0E,0xE6,0x53,0x82};
+
+#define print_tm(ptr) { for(int i=0 ; i<134; i++ ) gPC.putc(ptr[i]);}
  
 class SND_TM{
  
@@ -122,6 +124,7 @@
         return:     pointer of the first node having same type
     */
     #define exor(ptr) { for(int i=0 ; i<134; i++ ) ptr[i]=ptr[i]^EXOR_SEQ[i];}
+    
  
  
     #define first_type_structure( type,return_ptr) {\
@@ -228,6 +231,8 @@
         DS_state = !DS_state;\
         if (DS_f){\
             DS_f = false;\
+            if(print_in_snd_tm == 1);\
+            print_tm(ptr);\
             exor(ptr);\
             convolution(ptr);\
             interleave(convoluted_frame,interleave_data[0]);\
--- a/DefinitionsAndGlobals.h	Thu Jan 14 15:00:25 2016 +0000
+++ b/DefinitionsAndGlobals.h	Fri Jan 15 08:59:09 2016 +0000
@@ -3,6 +3,10 @@
     #define RX_TIMEOUT_LIMIT 0.5
     #define COM_RX_UART_TX PTE20
     #define COM_RX_UART_RX PTE21
+    
+    // For serial port printing(SET BAUD RATE 1200)
+//    #define COM_RX_UART_TX USBTX
+//    #define COM_RX_UART_RX USBRX
 
 // COMMON SPI
     #define SPI_MOSI PTE1