Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   FXOS8700Q Queue mbed-rtos mbed

Fork of Pacemaker by Eric dollar

Revision:
30:0cb4890910cd
Parent:
29:c0d63940b0c7
--- a/dataStruct.cpp	Tue Nov 29 21:03:33 2016 +0000
+++ b/dataStruct.cpp	Tue Nov 29 21:30:19 2016 +0000
@@ -3,23 +3,22 @@
 #include "rtos.h"
 #include "mbed.h"
 
-dataStruct::dataStruct(hardware* hWare): myQueue(1,N){//,thread(&dataStruct::threadStarter){
+void dataStruct(hardware* hWare){
+    //,thread(&dataStruct::threadStarter){
     myHardware = hWare; 
 //    thread.signal_set(START_THREAD);
     }
-    
-dataStruct::~dataStruct(){
-    }
+
 
-void dataStruct::threadStarter(void const *p){
-    dataStruct *instance = (dataStruct*)p;
-    instance->storeData();
-    }
+//void threadStarter(void const *p){
+//    dataStruct *instance = (dataStruct*)p;
+//    instance->storeData();
+//    }
 
-void dataStruct::storeData(){
+void storeData(){
 //    thread.signal_wait(START_THREAD);
     while(true){
-        streamValue = myHardware->getSense();
+        streamValue = io->getSense();
         if(myQueue.GetNumberOfItems() <= N){
             myQueue.Put(&streamValue);
             }
@@ -27,7 +26,7 @@
     }
 }
 
-queue dataStruct::getData(){
+queue getData(){
     queue temp = myQueue;
     myQueue.Flush();
     return temp;