a

Dependencies:   mbed

Fork of HelloWorld by Vincent Cheung

Files at this revision

API Documentation at this revision

Comitter:
kevinmadethis
Date:
Sat Oct 29 22:51:31 2016 +0000
Parent:
4:fb75731983cd
Commit message:
z;

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 fb75731983cd -r 402ac8c92d76 PaceHeart.cpp
--- a/PaceHeart.cpp	Sat Oct 29 21:12:09 2016 +0000
+++ b/PaceHeart.cpp	Sat Oct 29 22:51:31 2016 +0000
@@ -11,7 +11,6 @@
     int p_hysteresis = 0;
     int p_hysteresisInterval = 300;
     int lowrateInterval = 1000;
-    int uprateInterval = 500; //upper rate limit
 //Ventricle
     double p_vPaceAmp = 3500.0;
     double p_vPaceWidth = 0.4;
@@ -30,40 +29,36 @@
 {
     return p_pacingMode;
 }
+void Pace::set_p_pacingMode(int mode)
+{
+    p_pacingMode = mode;
+    return;
+}
 int PaceHeart::get_p_hysteresis()
 {
     return p_hysteresis;
 }
-void PaceHeart::set_p_hysteresis(int x)
+void PaceHeart::set_p_hysteresis(int hysteresis)
 {
-    p_hysteresis = x;
+    p_hysteresis = hysteresis;
     return;
 }
 int PaceHeart::get_p_hysteresisInterval()
 {
     return p_hysteresisInterval;
 }
-void PaceHeart::set_p_hysteresisInterval(int x)
+void PaceHeart::set_p_hysteresisInterval(int hysteresisInterval)
 {
-    p_hysteresisInterval = x;
+    p_hysteresisInterval = hysteresisInterval;
     return;
 }
 int PaceHeart::get_lowrateInterval()
 {
     return lowrateInterval;
 }
-void PaceHeart::set_lowrateInterval(int x)
+void PaceHeart::set_lowrateInterval(int lowrateInterval)
 {
-    lowrateInterval = x;
-    return;
-}
-int PaceHeart::get_uprateInterval()
-{
-    return uprateInterval;
-}
-void PaceHeart::set_uprateInterval(int x)
-{
-    uprateInterval = x;
+    lowrateInterval = lowrateInterval;
     return;
 }
 //Ventricle
@@ -71,9 +66,9 @@
 {
     return p_vPaceAmp;
 }
-void PaceHeart::set_p_vPaceAmp(double x)
+void PaceHeart::set_p_vPaceAmp(double vPaceAmp)
 {
-    p_vPaceAmp = x;
+    p_vPaceAmp = vPaceAmp;
     return;
 }
 
@@ -81,9 +76,9 @@
 {
     return p_vPaceWidth;
 }
-void PaceHeart::set_p_vPaceWidth(double x)
+void PaceHeart::set_p_vPaceWidth(double vPaceWidth)
 {
-    p_vPaceWidth = x;
+    p_vPaceWidth = vPaceWidth;
     return;
 }
 
@@ -91,9 +86,9 @@
 {
     return p_VRP;
 }
-void PaceHeart::set_p_VRP(int x)
+void PaceHeart::set_p_VRP(int VRP)
 {
-    p_VRP = x;
+    p_VRP = VRP;
     return;
 }
 //Atrium
@@ -101,9 +96,9 @@
 {
     return p_aPaceAmp;
 }
-void PaceHeart::set_p_aPaceAmp(double x)
+void PaceHeart::set_p_aPaceAmp(double aPaceAmp)
 {
-    p_aPaceAmp = x;
+    p_aPaceAmp = aPaceAmp;
     return;
 }
 
@@ -111,9 +106,9 @@
 {
     return p_aPaceWidth;
 }
-void PaceHeart::set_p_aPaceWidth(double x)
+void PaceHeart::set_p_aPaceWidth(double aPaceWidth)
 {
-    p_aPaceWidth = x;
+    p_aPaceWidth = aPaceWidth;
     return;
 }
 
@@ -121,9 +116,9 @@
 {
     return p_ARP;
 }
-void PaceHeart::set_p_ARP(int x)
+void PaceHeart::set_p_ARP(int ARP)
 {
-    p_ARP = x;
+    p_ARP = ARP;
     return;
 }
 
@@ -149,7 +144,7 @@
 }
 
 
-void PaceHeart::pace_V(double amp, double wid, int pin)
+void PaceHeart::pace_V(double amp, double wid, int output_pin_V)
 {
     output_pin_V = !output_pin_V ;
     wait(2);
@@ -169,6 +164,7 @@
 
 void PaceHeart::pace(int mode)
 {
+    set_p_pacingMode(mode);
     switch(mode){
     case 1:  //AOO
            pace_A();
diff -r fb75731983cd -r 402ac8c92d76 PaceHeart.h
--- a/PaceHeart.h	Sat Oct 29 21:12:09 2016 +0000
+++ b/PaceHeart.h	Sat Oct 29 22:51:31 2016 +0000
@@ -11,7 +11,7 @@
     int p_hysteresis;
     int p_hysteresisInterval;
     int lowrateInterval;
-    int uprateInterval; //upper rate limit
+    
     //Ventricle
     double p_vPaceAmp;
     double p_vPaceWidth;
@@ -31,25 +31,23 @@
 int get_p_pacingState();
 int get_p_pacingMode();
 int get_p_hysteresis();
-void set_p_hysteresis(int x);
+void set_p_hysteresis(int hysteresis);
 int get_p_hysteresisInterval();
-void set_p_hysteresisInterval(int x);
+void set_p_hysteresisInterval(int hysteresisInterval);
 int get_lowrateInterval();
-void set_lowrateInterval(int x);
-int get_uprateInterval();
-void set_uprateInterval(int x);
+void set_lowrateInterval(int lowrateInterval);
 double get_p_vPaceAmp();
-void set_p_vPaceAmp(double x);
+void set_p_vPaceAmp(double vPaceAmp);
 double get_p_vPaceWidth();
-void set_p_vPaceWidth(double x);
+void set_p_vPaceWidth(double vPaceWidth);
 int get_p_VRP();
-void set_p_VRP(int x);
+void set_p_VRP(int VRP);
 double get_p_aPaceAmp();
-void set_p_aPaceAmp(double x);
+void set_p_aPaceAmp(double aPaceAmp);
 double get_p_aPaceWidth();
-void set_p_aPaceWidth(double x);
+void set_p_aPaceWidth(double aPaceWidth);
 int get_p_ARP();
-void set_p_ARP(int x);
+void set_p_ARP(int ARP);
 
 bool amp_inRange(double x);
 bool width_inRange(double x);