eric's fork test

Dependencies:   mbed-rtos mbed

Fork of Pacemaker by 3k04 team

Files at this revision

API Documentation at this revision

Comitter:
trane3
Date:
Wed Nov 16 20:55:27 2016 +0000
Parent:
15:3b8acee3510d
Commit message:
test for threading and width setting - (eric)

Changed in this revision

interface.cpp Show annotated file Show diff for this revision Revisions of this file
interface.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
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
pulse.cpp Show annotated file Show diff for this revision Revisions of this file
pulse.h Show annotated file Show diff for this revision Revisions of this file
voor.cpp Show annotated file Show diff for this revision Revisions of this file
voor.h Show annotated file Show diff for this revision Revisions of this file
diff -r 3b8acee3510d -r aef2f75f216b interface.cpp
--- a/interface.cpp	Wed Nov 16 15:19:20 2016 +0000
+++ b/interface.cpp	Wed Nov 16 20:55:27 2016 +0000
@@ -6,6 +6,7 @@
 #include "genData.h"
 #include "pulse.h"
 #include "voor.h"
+#include "rtos.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string>
diff -r 3b8acee3510d -r aef2f75f216b interface.h
--- a/interface.h	Wed Nov 16 15:19:20 2016 +0000
+++ b/interface.h	Wed Nov 16 20:55:27 2016 +0000
@@ -4,6 +4,7 @@
 #include "chamberData.h"
 #include "genData.h"
 #include "pulse.h"
+#include "rtos.h"
 class interface{
 
 public:
diff -r 3b8acee3510d -r aef2f75f216b main.cpp
--- a/main.cpp	Wed Nov 16 15:19:20 2016 +0000
+++ b/main.cpp	Wed Nov 16 20:55:27 2016 +0000
@@ -7,6 +7,7 @@
 #include "interface.h"
 #include "voor.h"
 #include "sense.h"
+#include "rtos.h"
 
 int main(){
     hardware* io = new hardware();
diff -r 3b8acee3510d -r aef2f75f216b mbed-rtos.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Wed Nov 16 20:55:27 2016 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed-rtos/#b744dfee1cf2
diff -r 3b8acee3510d -r aef2f75f216b pulse.cpp
--- a/pulse.cpp	Wed Nov 16 15:19:20 2016 +0000
+++ b/pulse.cpp	Wed Nov 16 20:55:27 2016 +0000
@@ -1,6 +1,7 @@
 #pragma once
 #include "mbed.h"
 #include "pulse.h"
+#include "rtos.h"
 
 pulse::pulse(){}
     
diff -r 3b8acee3510d -r aef2f75f216b pulse.h
--- a/pulse.h	Wed Nov 16 15:19:20 2016 +0000
+++ b/pulse.h	Wed Nov 16 20:55:27 2016 +0000
@@ -9,12 +9,14 @@
     pulse(chamberData*, hardware*);
     ~pulse();
     void startPulse();
+    void setWaitTime(double);
     void setChamber(chamberData*); //used in VOOR (for now, might change) - eric
     
 private:
     double myPaceWidth; //mSec, width of ventricular pace
     double myPaceAmp; //mV, amplitude of ventricular pace
     double myRP; //mSec, duration of refractory period
+    double waitTime;
     float p_hysteresisInterval;
     float p_lowrateInterval;
     bool p_hysteresis;
diff -r 3b8acee3510d -r aef2f75f216b voor.cpp
--- a/voor.cpp	Wed Nov 16 15:19:20 2016 +0000
+++ b/voor.cpp	Wed Nov 16 20:55:27 2016 +0000
@@ -2,11 +2,13 @@
 #include "mbed.h"
 #include "voor.h"
 #include "pulse.h"
+#include "rtos.h"
 
 voor::voor(){}
 
 voor::voor(pulse* p){
     voorPulse = p;
+ //   Thread thread(voor_pace);
     }
 
 voor::~voor(){};
@@ -21,4 +23,7 @@
 void voor::setPacingMode(int i){
     y_pacingMode = i;
     }
-    
\ No newline at end of file
+    
+void voor::voor_pace(void const *args){
+    startPace();
+    }
\ No newline at end of file
diff -r 3b8acee3510d -r aef2f75f216b voor.h
--- a/voor.h	Wed Nov 16 15:19:20 2016 +0000
+++ b/voor.h	Wed Nov 16 20:55:27 2016 +0000
@@ -1,6 +1,7 @@
 #pragma once
 #include "mbed.h"
 #include "pulse.h"
+#include "rtos.h"
 
 class voor {
     public:
@@ -9,6 +10,7 @@
         voor(pulse*);
         void startPace();
         void setPacingMode(int);
+        void voor_pace(void const *args);
     private:
         int y_pacingMode;
         pulse* voorPulse;