Eric Tran
/
PacemakerVOORforkTest
eric's fork test
Fork of Pacemaker by
Revision 8:75c1dd8b0d61, committed 2016-11-15
- Comitter:
- trane3
- Date:
- Tue Nov 15 00:52:39 2016 +0000
- Parent:
- 7:4eb590c7e064
- Commit message:
- added voor functionality including preliminary pacing
Changed in this revision
diff -r 4eb590c7e064 -r 75c1dd8b0d61 hardware.cpp --- a/hardware.cpp Mon Nov 14 02:22:40 2016 +0000 +++ b/hardware.cpp Tue Nov 15 00:52:39 2016 +0000 @@ -27,4 +27,4 @@ PwmOut* v = &ventricle; return v; } -} +} \ No newline at end of file
diff -r 4eb590c7e064 -r 75c1dd8b0d61 interface.cpp --- a/interface.cpp Mon Nov 14 02:22:40 2016 +0000 +++ b/interface.cpp Tue Nov 15 00:52:39 2016 +0000 @@ -5,6 +5,7 @@ #include "chamberData.h" #include "genData.h" #include "pulse.h" +#include "voor.h" #include <stdlib.h> #include <stdio.h> #include <string> @@ -34,15 +35,18 @@ void interface::startScreen(){ (*pc).printf("\nWelcome to the PACEMAKER DCM.\n"); (*pc).printf("Options:\n"); - (*pc).printf("1. Start pulse\n"); + (*pc).printf("1. Start VOOR Pulse\n"); // temporary test to get VOOR working (*pc).printf("2. View/Change data\n"); (*pc).printf("Please enter a command:"); char command = getChar(); switch (command) { - case '1': - interfacePulse->startPulse(); //problems with this method: you create the pc output twice, once in UI and once in pulse. + case '1':{ + voor v(interfacePulse); //creates new instance of voor + v.startPace(); //starts pacing voor the same way as it used to pace in the user interface + //interfacePulse->startPulse(); //problems with this method: you create the pc output twice, once in UI and once in pulse. startScreen(); //realistically we'll never need to call the serial output in pulse, it should all be done in UI break; + } case '2': interface::dataScreen(); break;
diff -r 4eb590c7e064 -r 75c1dd8b0d61 pulse.cpp --- a/pulse.cpp Mon Nov 14 02:22:40 2016 +0000 +++ b/pulse.cpp Tue Nov 15 00:52:39 2016 +0000 @@ -23,7 +23,10 @@ delete aOut; } - +void pulse::setChamber(chamberData* c){ + myChamber = c; + } + void pulse::startPulse(){ // while(true){
diff -r 4eb590c7e064 -r 75c1dd8b0d61 pulse.h --- a/pulse.h Mon Nov 14 02:22:40 2016 +0000 +++ b/pulse.h Tue Nov 15 00:52:39 2016 +0000 @@ -9,6 +9,7 @@ pulse(chamberData*, hardware*); ~pulse(); void startPulse(); + void setChamber(chamberData*); //used in VOOR (for now, might change) - eric private: double myPaceWidth; //mSec, width of ventricular pace
diff -r 4eb590c7e064 -r 75c1dd8b0d61 voor.cpp --- a/voor.cpp Mon Nov 14 02:22:40 2016 +0000 +++ b/voor.cpp Tue Nov 15 00:52:39 2016 +0000 @@ -1,8 +1,20 @@ #pragma once #include "mbed.h" #include "voor.h" +#include "pulse.h" -voor::voor(){ +voor::voor(){} + +voor::voor(pulse* p){ + voorPulse = p; } -voor::~voor(){}; \ No newline at end of file +voor::~voor(){}; + +void voor::startPace(){ + voorPulse->startPulse(); + } + +void voor::setPacingMode(int i){ + y_pacingMode = i; + } \ No newline at end of file
diff -r 4eb590c7e064 -r 75c1dd8b0d61 voor.h --- a/voor.h Mon Nov 14 02:22:40 2016 +0000 +++ b/voor.h Tue Nov 15 00:52:39 2016 +0000 @@ -1,10 +1,16 @@ #pragma once #include "mbed.h" +#include "pulse.h" class voor { public: voor(); ~voor(); + voor(pulse*); void startPace(); - + void setPacingMode(int); + private: + int y_pacingMode; + pulse* voorPulse; + }; \ No newline at end of file