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:
31:5e55042e025a
Parent:
28:4f36e100ccbe
Child:
32:69cd1390bc21
diff -r c0d63940b0c7 -r 5e55042e025a interface.cpp
--- a/interface.cpp	Tue Nov 29 21:03:33 2016 +0000
+++ b/interface.cpp	Tue Nov 29 22:01:54 2016 +0000
@@ -305,7 +305,7 @@
 void interface::getEgram(){
     myDataStruct = new dataStruct(myHardware);
     isEgram = true;
-    pc->printf("\nPress 1 to stop streaming egram data");
+    pc->printf("\nPress 1 to stop streaming egram data\n");
     while(isEgram){
         if(pc->readable()){
             char command = pc->getc();
@@ -314,31 +314,34 @@
                 }
             }
         
-        Thread::wait(40);
-        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 );
+        Thread::wait(4);
+        pc->printf("Item = %f\n", myDataStruct->getData());
+        
+//        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\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 2 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 3 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 4 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 5 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 6 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 7 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 8 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 9 = %d\r\n", nTemp );
+//        myQueue.Get( &nTemp );
+//        pc->printf( "Item 10 = %d\r\n", nTemp );
     }
     delete myDataStruct;
+    interface::dataScreen();
 }