CDMS code for testing sbc

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
228:335da5b0d3e4
Parent:
224:3ac1f91e0ebc
Child:
230:e2bd2a990bfe
Child:
231:b1458c1e9199
Child:
234:3d52da8826d3
--- a/main.cpp	Mon Jul 04 14:48:16 2016 +0000
+++ b/main.cpp	Mon Jul 04 23:13:24 2016 +0000
@@ -37,15 +37,15 @@
 #include "TEST_PL.h"
 
 #define PL_TC(tm_ptr){\
-    Base_tc *beacon_tc = new Short_tc;\
+    Base_tc *beacon_tc = new Long_tc;\
     beacon_tc->next_TC = NULL;\
-    PUTshort_or_long(beacon_tc,SHORT_TC_CODE);\
+    PUTshort_or_long(beacon_tc,LONG_TC_CODE);\
     PUTcrc_pass(beacon_tc,0x1);\
     PUTexec_status(beacon_tc,0);\
     beacon_tc->TC_string[0] = 0x01;\
-    beacon_tc->TC_string[1] = 0xE0;\
+    beacon_tc->TC_string[1] = 0x60;\
     beacon_tc->TC_string[2] = 0x81;\
-    beacon_tc->TC_string[3] = 0xD0;\
+    beacon_tc->TC_string[3] = 0x21;\
     beacon_tc->TC_string[4] = 0x00;\
     beacon_tc->TC_string[5] = 0;\
     beacon_tc->TC_string[6] = 0;\
@@ -54,6 +54,7 @@
     uint16_t crc16 = crc16_gen(beacon_tc->TC_string, 9);\
     beacon_tc->TC_string[9]  = (crc16 & 0xFF00)>>8;\
     beacon_tc->TC_string[10] = (crc16 & 0x00FF);\
+    for(int i = 11; i<135;i++) beacon_tc->TC_string[i] = 0;\
     tm_ptr =  FCTN_CDMS_RLY_TMTC(beacon_tc);\
 }
 #define OBSRS_TC(tm_ptr){\
@@ -151,14 +152,15 @@
     
     
     
-    
-    /*gPC.printf("PL_TC sending\r\n");
+    while(1){
+    gPC.printf("PL_TC sending\r\n");
     
-    Base_tm *tm_ptr = new Short_tm;
-    OBSRS_TC(tm_ptr);
+    Base_tm *tm_ptr = new Long_tm;
+    PL_TC(tm_ptr);
+    wait(1);
+    }
+    gPC.printf("PL_TC sent");
     
-    gPC.printf("PL_TC sent");
-    */
     // *******************INITIALISATIONS END********************
     
     FCTN_CDMS_HK_MAIN((void *)NULL);