publishing to check changes in cdms code

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE_samp_23SEP_DMA_flag by samp Srinivasan

Revision:
263:3b872778b8c7
Parent:
262:752c8689944a
Child:
264:f7d8f9f361e3
diff -r 752c8689944a -r 3b872778b8c7 ThreadsAndFunctions.h
--- a/ThreadsAndFunctions.h	Thu Jul 14 17:57:05 2016 +0000
+++ b/ThreadsAndFunctions.h	Thu Jul 14 19:54:27 2016 +0000
@@ -124,7 +124,7 @@
         if( gFLAGS & UART_INT_FLAG ){
             gFLAGS = gFLAGS & (~UART_INT_FLAG);
             if( !(gFLAGS & COM_SESSION_FLAG) ){
-                // PENDING : DISABLE THREADS
+                // DISABLE THREADS
                 HK_counter->stop();
                 gPAY_SPI->bulkRead_pause();
                 gFLAGS = gFLAGS | COM_SESSION_FLAG;
@@ -177,23 +177,23 @@
             gMutex.lock();
             
             if( gTOTAL_VALID_TC > 0 ){
-                /*gPC.printf("valid TC rx: %u\r\n", gTOTAL_VALID_TC);*/
+                gPC.printf("valid TC rx: %u\r\n", gTOTAL_VALID_TC);
                 if( gTOTAL_VALID_TC < COM_MAX_TC_LIMIT ){
                     // CHECK WEATHER TC LIST HAS MISSING TC OR WEATHER LAST FRAME BIT IS HIGH IN THE LAST PSC-TC
-                    /*gPC.puts("checking for tc list complete\r\n");*/
+                    gPC.puts("checking for tc list complete\r\n");
                     uint8_t tempContinue = 0xFF;
                     continueToExecute(tempContinue);
                     if(tempContinue == 0x00){
-                        /*gPC.puts("tc list is complete\r\n");*/
+                        gPC.puts("tc list is complete\r\n");
                         // CHECK WEATHER GS VERIFICATION CODE MATCHES
                         uint8_t tempGSver = 0x00;
                         GScodeVerification(tempGSver);
                         /*PENDING: INCLUDE GS VERIFICATION CODE*/
                         if( tempGSver == 0xFF ){
-                            /*gPC.puts("GS code match !!\r\n");*/
+                            gPC.puts("GS code match !!\r\n");
                             gFLAGS = gFLAGS | COM_SESSION_VALIDITY;
-                            sys_reset_cdms_timer->start(cdms_reset_timeout);
-                            COM_POWER_ON_TX;
+                            //sys_reset_cdms_timer->start(cdms_reset_timeout);
+                            COM_POWER_ON_TX();
                             P_COM_HK;
                             if( (gFLAGS & COM_PA_HOT_FLAG) || ( gFLAGS & COM_PA_OC_FLAG ) ){
                                 COM_TX_CNTRL = 0;
@@ -210,11 +210,11 @@
                             }
                         }
                         else{
-                            /*gPC.puts("GS code mismatch !!\r\n");*/
+                            gPC.puts("GS code mismatch !!\r\n");
                             RX1M.attach(&rx_read, Serial::RxIrq);
                             reset_all;
                             gFLAGS = gFLAGS & (~COM_SESSION_VALIDITY);
-                            // PENDING : ENABLE THREADS
+                            // ENABLE THREADS
                             HK_counter->start(10000);
                             gPAY_SPI->bulkRead_resume(&payload_isr_fun);
                             gSESSION_TIMEOUT.detach();
@@ -226,10 +226,10 @@
                     else{
                         gPC.puts("tc list is not complete\r\n");
                         if(tempContinue & 0x01){
-                            //gPC.puts("last packet bit not found\r\n");
+                            gPC.puts("last packet bit not found\r\n");
                         }
                         if( tempContinue & 0x02 ){
-                            //gPC.puts("missing psc found\r\n");
+                            gPC.puts("missing psc found\r\n");
                         }
                         //gPC.printf("crc fail tc = %u\r\n", gTOTAL_CRC_FAIL_TC);
                         //gPC.printf("incorrect size tc = %u\r\n", gTOTAL_INCORRECT_SIZE_TC);
@@ -250,7 +250,7 @@
                             test_tc = test_tc->next_TC;
                         }
                         //gPC.puts("\r\n");
-                        COM_POWER_ON_TX;
+                        COM_POWER_ON_TX();
                         // PENDING : POWER OFF TX
                         COM_TX_CNTRL = 0;
                         RX1M.attach(&rx_read, Serial::RxIrq);
@@ -258,7 +258,7 @@
                     }
                 }
                 else{
-                    COM_POWER_ON_TX;
+                    COM_POWER_ON_TX();
                     // POWER OFF TX transmitter only
                     // WARNING: reset_all ? clear com_session ?
                     COM_TX_CNTRL = 0;
@@ -273,7 +273,7 @@
                 RX1M.attach(&rx_read, Serial::RxIrq);
                 gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);
                 reset_all;
-                // PENDING : ENABLE THREADS
+                // ENABLE THREADS
                 HK_counter->start(10000);
                 gPAY_SPI->bulkRead_resume(&payload_isr_fun);
                 gSESSION_TIMEOUT.detach();
@@ -281,7 +281,7 @@
             }
         }
         else if( gFLAGS & COM_PA_HOT_FLAG ){
-            /*gPC.puts("checking for PA hot in main\r\n");*/
+            gPC.puts("checking for PA hot in main\r\n");
             P_COM_HK;
             if((gFLAGS & COM_PA_HOT_FLAG) || (gFLAGS & COM_PA_OC_FLAG)){
                 COM_TX_CNTRL = 0;
@@ -290,19 +290,19 @@
             else{
                 gCOM_PA_COOLING_TIMEOUT.detach();
                 if( !(gFLAGS & COM_RX_FLAG) ){
-                    /*gPC.puts("PA IS COOLED DOWN\r\n");*/
+                    gPC.puts("PA IS COOLED DOWN\r\n");
                     gFLAGS = gFLAGS | COM_MNG_TMTC_RUNNING_FLAG;
                     RX1M.attach(NULL);
-                    COM_POWER_ON_TX;
+                    COM_POWER_ON_TX();
                     EXECUTE_OBOSC_ONLY;
                     EXECUTE_TC;
                 }
             }
         }
         else if( gFLAGS & COM_SESSION_TIMEOUT_FLAG ){
-            /*gPC.puts("session timeout: resetting in main\r\n");*/
+            gPC.puts("session timeout: resetting in main\r\n");
             COM_POWER_OFF_TX;
-            /*PENDING : ENABLE THREADS*/
+            /*ENABLE THREADS*/
             HK_counter->start(10000);
             gPAY_SPI->bulkRead_resume(&payload_isr_fun);
             gSESSION_TIMEOUT.detach();
@@ -311,11 +311,11 @@
             reset_all;
         }
         else{
-            /*gPC.puts("INVALID SIGNAL RECEIVED IN MAIN\r\n");*/
+            gPC.puts("INVALID SIGNAL RECEIVED IN MAIN\r\n");
             // SOME INVALID SIGNAL RECEIVED
             COM_POWER_OFF_TX;
             reset_all;
-            // PENDING : ENABLE THREADS
+            // ENABLE THREADS
             HK_counter->start(10000);
             gPAY_SPI->bulkRead_resume(&payload_isr_fun);
             gSESSION_TIMEOUT.detach();