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:
Wed Jan 06 21:23:42 2016 +0000
Parent:
33:8f5a4ce4ba4a
Child:
35:3beac900a034
Commit message:
Integrated recent changes from COM_MNG_TMTC with latest snd_tmand adf.h added.

Changed in this revision

COM_MNG_TMTC.h Show annotated file Show diff for this revision Revisions of this file
COM_POWER_ON_TX.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
Structures.h Show annotated file Show diff for this revision Revisions of this file
ThreadsAndFunctions.h Show annotated file Show diff for this revision Revisions of this file
--- a/COM_MNG_TMTC.h	Wed Jan 06 14:52:12 2016 +0000
+++ b/COM_MNG_TMTC.h	Wed Jan 06 21:23:42 2016 +0000
@@ -81,7 +81,7 @@
 
 #define isit_obosc(tc_ptr, temp_obosc) {\
     temp_obosc = 0x00;\
-    if( GETapid(tc_ptr) == 2 ){\
+    if( GETapid(tc_ptr) == 0 ){\
         if( ((tc_ptr->TC_string[2]) >> 4) == 0xB ){\
             switch( (tc_ptr->TC_string[2]) & 0xf ){\
                 case 1:\
@@ -97,7 +97,7 @@
 
 #define isit_sdcard(tc_ptr, temp_sdcard) {\
     temp_sdcard = 0x00;\
-    if( GETapid(tc_ptr) == 2 ){\
+    if( GETapid(tc_ptr) == 0 ){\
         if( ( (tc_ptr->TC_string[2]) >> 4) == 0xF ){\
             switch( (tc_ptr->TC_string[2]) & 0xf ){\
                 case 0:\
@@ -613,7 +613,7 @@
         obosc_tm_current = obosc_tm_current->next_TM;\
     }\
     /*snd_tm.head_pointer(obosc_tm_head);*/\
-    /*adf_not_SDcard;*/\
+    /*adf_not_SDcard();*/\
     /*DELETE THE TM AFTER USE*/\
     obosc_tm_current = obosc_tm_head;\
     int overCount = 0;\
@@ -633,8 +633,9 @@
 
 #define EXECUTE_TC {\
     gMASTER_STATE = TCL_STATE_EXECUTING;\
+    /*gPC.printf("%u\r\n", gTOTAL_VALID_TC);*/\
     for(uint8_t execute_psc = PSC_START_VALUE ; execute_psc < gTOTAL_VALID_TC ; ++execute_psc ){\
-        gPC.printf("executing normal %u\r\n", execute_psc);\
+        /*gPC.printf("executing normal %u\r\n", execute_psc);*/\
         /*gLEDG = !gLEDG;*/\
         /*gLEDR = !gLEDR;*/\
         Base_tc* current_TC = gHEAD_NODE_TCL;\
@@ -684,6 +685,7 @@
                                 PUTexec_status(current_TC, temp16);\
                             }\
                             else{\
+                                /*gPC.puts("TC_STATE_EXECUTION_FAILED");*/\
                                 uint16_t temp16 = TC_STATE_EXECUTION_FAILED;\
                                 PUTexec_status(current_TC, temp16);\
                             }\
@@ -739,6 +741,7 @@
                                 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]);\
                                 }\
@@ -746,7 +749,7 @@
                             }\
                             /*SEND DATA TO GS*/\
                             /*snd_tm.head_pointer(tm_ptr_head);*/\
-                            /*adf_not_SDcard;*/\
+                            /*adf_not_SDcard();*/\
                             /*DELETE THE TM AFTER USE*/\
                             tm_ptr = tm_ptr_head;\
                             overflowCountExecute = 0;\
--- a/COM_POWER_ON_TX.h	Wed Jan 06 14:52:12 2016 +0000
+++ b/COM_POWER_ON_TX.h	Wed Jan 06 21:23:42 2016 +0000
@@ -71,7 +71,6 @@
         }\
         get_tc_list(power_on_tm->next_TM, 0x00);\
         power_on_tm = power_on_tm_head;\
-        gPC.printf("\n");\
         while(power_on_tm != NULL){\
             int length = TM_SHORT_SIZE;\
             if( GETshort_or_long_tm(power_on_tm->fields) == SHORT_TM_CODE ){\
@@ -80,14 +79,12 @@
             else{\
                 length = TM_LONG_SIZE;\
             }\
+            /*gPC.puts("Printing Call Sign, ACK_L1, TC_LIST inside COM_POWER_ON\r\n");*/\
             for(int i = 0 ; i < length ; ++i){\
-                gPC.printf("0x%X,",power_on_tm->TM_string[i]);\
+                gPC.putc(power_on_tm->TM_string[i]);\
             }\
             power_on_tm = power_on_tm->next_TM;\
         }\
-        gPC.printf("\n");\
-        snd_tm.head_pointer(power_on_tm_head);\
-        adf_not_SDcard;\
         /*PENDING: TRANSMIT ABOVE TM*/\
         /*deleting the telemetry*/\
         power_on_tm = power_on_tm_head;\
--- a/DefinitionsAndGlobals.h	Wed Jan 06 14:52:12 2016 +0000
+++ b/DefinitionsAndGlobals.h	Wed Jan 06 21:23:42 2016 +0000
@@ -14,7 +14,6 @@
     
 // COM_TX
     #define COM_TX_CONFIG_LIMIT 3
-    #define COM_TX_TICKER_LIMIT 32
 
 // ADF INTERRUPUT
     #define ADF_IRQ PTA14
--- a/Structures.h	Wed Jan 06 14:52:12 2016 +0000
+++ b/Structures.h	Wed Jan 06 21:23:42 2016 +0000
@@ -33,8 +33,8 @@
 #define TC_STATE_UNEXECUTED 0x00
 #define TC_STATE_SUCCESSFULLY_EXECUTED 0x01
 #define TC_STATE_EXECUTION_FAILED 0x02
-#define TC_STATE_DISABLED 0x03
-#define TC_STATE_MARKED_RETRY 0x04
+#define TC_STATE_DISABLED 0x04
+#define TC_STATE_MARKED_RETRY 0x05
 
 //MASKS
 #define SHORT_LONG_TC_MASK 0x10
--- a/ThreadsAndFunctions.h	Wed Jan 06 14:52:12 2016 +0000
+++ b/ThreadsAndFunctions.h	Wed Jan 06 21:23:42 2016 +0000
@@ -70,7 +70,7 @@
 
 void COM_MNG_TMTC_FUN(void const *args){
     if( !(gFLAGS & COM_SESSION_FLAG) ){
-        //gLEDR = 1;
+        gLEDR = 1;
         gLEDG = 1;
     }
     while(true){
@@ -85,17 +85,17 @@
                 PUT_RAW_BYTE;
                 // PENDING : MEASURE RSSI
                 if( gFLAGS & COM_SESSION_FLAG ){
-                    //gLEDR = 0;
+                    gLEDR = 0;
                     gLEDG = 0;
                 }
             }
             else if( gFLAGS & COM_RX_FLAG ){
-                //gLEDR = 0;
+                gLEDR = 0;
                 gLEDG = 1;
                 PUT_RAW_BYTE;
             }
             else{
-                //gLEDR = 1;
+                gLEDR = 1;
                 gLEDG = 0;
                 gFLAGS = gFLAGS | COM_RX_FLAG;
                 PUT_RAW_BYTE;