Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   mbed Queue mbed-rtos FXOS8700Q

Fork of Pacemaker by Eric dollar

SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.

The project uses the Freescale K64F Microcontroller and C++ mbed library.

Revision:
30:cc7586a259fd
Parent:
26:3b49e8c3793f
--- a/interface.cpp	Tue Nov 29 01:15:10 2016 +0000
+++ b/interface.cpp	Tue Nov 29 21:07:56 2016 +0000
@@ -3,6 +3,7 @@
 #include "interface.h"
 #include "hardware.h"
 #include "chamberData.h"
+#include "dataStruct.h"
 #include "genData.h"
 #include "pulse.h"
 #include "voor.h"
@@ -303,40 +304,43 @@
  }
  
 void interface::getEgram(){
+    pc->printf("\nPress 1 to stop streaming egram data\n");
     myDataStruct = new dataStruct(myHardware);
+//    nTemp = 'a';
     isEgram = true;
-    pc->printf("\nPress 1 to stop streaming egram data");
+ 
     while(isEgram){
-        if(pc->readable()){
-            char command = pc->getc();
-            if(command == '1'){
-                isEgram = false;
-                }
-            }
         
-        Thread::wait(40);
-        myQueue = myDataStruct->getData();
+//        if(pc->readable()){
+//            char command = pc->getc();
+//            if(command == '1'){
+//                isEgram = false;
+//                }
+//            }
+
+        Thread::wait(1000);
+//        myQueue = myDataStruct->getData();
         //I know below doesn't look neat, but it just will print values to the screen for now. One day we may do a graph. 
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 1 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 2 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 3 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 4 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 5 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 6 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 7 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 8 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 9 = %d\r", nTemp );
-        myQueue.Get( &nTemp );
-        pc->printf( "Item 10 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+        pc->printf( "Item 1 = %d\r\n", nTemp );
+        //myQueue.Get( &nTemp );
+//        pc->printf( "Item 2 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 3 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 4 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 5 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 6 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 7 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 8 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 9 = %d\r", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 10 = %d\r", nTemp );
     }
     delete myDataStruct;
 }