weeb grammers
/
Assignment2
something
Fork of HelloWorld by
Revision 5:45d58f8a5912, committed 2016-11-14
- Comitter:
- weebgrammers
- Date:
- Mon Nov 14 21:36:01 2016 +0000
- Parent:
- 4:f0a11480f39f
- Commit message:
- anything;
Changed in this revision
PaceHeart.cpp | Show annotated file Show diff for this revision Revisions of this file |
PaceHeart.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r f0a11480f39f -r 45d58f8a5912 PaceHeart.cpp --- a/PaceHeart.cpp Mon Nov 14 19:59:54 2016 +0000 +++ b/PaceHeart.cpp Mon Nov 14 21:36:01 2016 +0000 @@ -6,6 +6,7 @@ PaceHeart::PaceHeart(){ + p_pacingState = 0; p_pacingMode = 0; int p_hysteresis = 0; @@ -22,6 +23,22 @@ int p_ARP = 320; } +PaceHeart::PaceHeart(int mode){ + p_pacingState = 0; + p_pacingMode = mode; + int lowrateInterval = 1000; //30-50->5 50-90->1 90-175->5 ppm + int uprateInterval = 500; //upper rate limit 50-175->5 ppm + int maxSensorRate = 500; //50-175->5 ppm + +//Ventricle + double p_vPaceAmp = 3750.0; //3750 can change to 0, 1250, 2500, 3750, 5000 + double p_vPaceWidth = 0.4; //0.05->no change 0.1-1.9 0.1 + + int p_activityThresh = 4; //1-7 print out string with level ie. Med + int p_reactionTime = 30; //10-50->10 + int p_responseFactor = 8; //1-16->1 + int p_recoveryTime = 5; //2-16->1 +} int PaceHeart::get_p_pacingState() { return p_pacingState; @@ -184,3 +201,39 @@ pace(mode); return; } +int PaceHeart::get_activityThresh() +{ + return p_activityThresh; +} +int PaceHeart::get_reactionTime() +{ + return p_reactionTime; +} +int PaceHeart::get_responseFactor() +{ + return p_responseFactor; +} +int PaceHeart::get_recoveryTime() +{ + return p_recoveryTime; +} +void PaceHeart::set_activityThresh(int x) +{ + p_activityThresh=x; + return; +} +void PaceHeart::set_reactionTime(int x) +{ + p_reactionTime=x; + return; +} +void PaceHeart::set_responseFactor(int x) +{ + p_responseFactor=x; + return; +} +void PaceHeart::set_recoveryTime(int x) +{ + p_recoveryTime=x; + return; +} \ No newline at end of file
diff -r f0a11480f39f -r 45d58f8a5912 PaceHeart.h --- a/PaceHeart.h Mon Nov 14 19:59:54 2016 +0000 +++ b/PaceHeart.h Mon Nov 14 21:36:01 2016 +0000 @@ -20,8 +20,13 @@ double p_aPaceAmp; double p_aPaceWidth; int p_ARP; + int activityThresh; + int reactionTime; + int responseFactor; + int recoveryTime; public: PaceHeart(); +PaceHeart(int mode); void pace_A(); void pace_A(double amp, double wid,int pin); void pace_V(double amp, double wid,int pin); @@ -50,5 +55,13 @@ void set_p_aPaceWidth(double x); int get_p_ARP(); void set_p_ARP(int x); +int get_activityThresh(); +int get_reactionTime(); +int get_responseFactor(); +int get_recoveryTime(); +void set_activityThresh(); +void set_reactionTime(); +void set_responseFactor(); +void set_recoveryTime(); }; #endif \ No newline at end of file