CDMS code for testing sbc

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
96:4ca92f9775e0
Parent:
95:42d6747900cb
Child:
97:717c7908c822
--- a/main.cpp	Mon Jan 25 06:22:29 2016 +0000
+++ b/main.cpp	Mon Jan 25 13:10:43 2016 +0000
@@ -18,11 +18,13 @@
 #include "COM_MNG_TMTC.h"
 #include "COM_POWER_ON_TX.h"
 #include "COM_POWER_OFF_TX.h"
-//#include "Compression.h"
+#include "Compression.h"
 #include "ThreadsAndFunctions.h"
 
 int main()
 {
+    gLEDR = 1;
+    
     // ******************INITIALISATIONS START******************
     // COM RX
     RX1M.baud(1200);
@@ -62,16 +64,30 @@
     gCOM_MNG_TMTC_THREAD = new Thread(COM_MNG_TMTC_FUN);
     gCOM_MNG_TMTC_THREAD->set_priority(osPriorityAboveNormal);
     gPC.puts("allocating threads\r\n");
-    //gSCIENCE_THREAD = new Thread(SCIENCE_FUN);
+    gSCIENCE_THREAD = new Thread(SCIENCE_FUN);
    // gPC.puts("step one complete\r\n");
-    //gSCIENCE_THREAD->set_priority(osPriorityAboveNormal);
+    gSCIENCE_THREAD->set_priority(osPriorityBelowNormal);
     gPC.puts("competed allocating threads\r\n");
     // *******************INITIALISATIONS END********************
     
     /*Calculating Stack used*/
     
-    int theAcount = 0;
+    int state;
+    /*while (true) { 
+    Thread::wait(500); 
+    state = gSCIENCE_THREAD->get_state(); 
+    //gPC.printf("Thread state %d\r\n", state); 
+    if(state == Thread::Inactive) 
+    {delete gSCIENCE_THREAD;
+    break;}
+    }*/
+    
+    
+    
     while(true){
-        Thread::wait(osWaitForever);
+        Thread::wait(500);
+        //state = gCOM_MNG_TMTC_THREAD->get_state() + '0';
+         gLEDG = !gLEDG;
+        //gPC.putc(state); 
     }
 }
\ No newline at end of file