TELECOMMAND MANAGER V1

Dependencies:   mbed SLCD mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
shreeshas95
Date:
Thu Sep 17 13:54:08 2015 +0000
Parent:
13:7b27a8e9cbb4
Commit message:
DUMMY program to demostrate the problems

Changed in this revision

COM_RCV_TC.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/COM_RCV_TC.h	Mon Aug 03 14:29:35 2015 +0000
+++ b/COM_RCV_TC.h	Thu Sep 17 13:54:08 2015 +0000
@@ -4,7 +4,7 @@
     unsigned char tempString[136];
     TC_list *return_this = NULL;
     
-    void inline attach_frame(unsigned int length){
+    void attach_frame(unsigned int length){
         // allocate new node
         // handle Head node
         if( tc_frames == 0 ){
--- a/main.cpp	Mon Aug 03 14:29:35 2015 +0000
+++ b/main.cpp	Thu Sep 17 13:54:08 2015 +0000
@@ -92,7 +92,7 @@
     PC.baud(9600);
     
     rx1m.baud(1200);
-    rx1m.attach(&rx_read, Serial::RxIrq);
+//    rx1m.attach(&rx_read, Serial::RxIrq);
     VAR_SPACE::head_data = new data_list;
     VAR_SPACE::head_data->next = NULL;
     VAR_SPACE::rx_new_node = VAR_SPACE::head_data;
@@ -104,12 +104,16 @@
     
     lcd.printf("0");
     
-    struct data_list *hehe = VAR_SPACE::head_data;
-    while( hehe != NULL ){
-        printf("%x ", hehe->val);
-        hehe = hehe->next;
+    
+//    DUMMY PROGRAM START
+    unsigned char dummy_tc[] = {0x7e, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x7e};
+    for(int i = 0 ; i < 13 ; ++i){
+        VAR_SPACE::rx_new_node->val = dummy_tc[i];
+        VAR_SPACE::COM_RCV_TC_thread->signal_set(0x01);
+        Thread::wait(0.01);
     }
-    printf("\r\n");
+//    DUMMY PROGRAM END
+
     
     while(true){
 //        ledg = !ledg;