CIS441 Controller

Dependencies:   TextLCD mbed-rtos mbed

Fork of PacemakerController by Chad Nachiappan

Revision:
38:ceabf8f1dfa0
Parent:
35:b5e8650a7669
Child:
40:e401b1cb71c0
--- a/PacemakerController.cpp	Wed Dec 02 04:54:53 2015 +0000
+++ b/PacemakerController.cpp	Wed Dec 02 05:04:33 2015 +0000
@@ -17,10 +17,10 @@
 Timer avi_clk;
 Timer t_count;
 
-int LRI = 1000;
-int AVI = 150;
-int PVARP = 300;
-int VRP = 200;
+int LRI = 100;
+int AVI = 30;
+int PVARP = 150;
+int VRP = 100;
 
 // constants
 int MAX_PM_RT = 180;
@@ -275,24 +275,28 @@
                 // if the char is N, update bounds to normal mode
                 curr_mode = NORMAL;
                 upper_bound = 100;
+                LRI = 100;
                 lower_bound = 40;
                 pc.printf("MODE IS N\n");
                 // if the char is S, set bounds to sleep
             } else if (a == 'S') {
                 curr_mode = SLEEP;
                 upper_bound = 60;
+                LRI = 60;
                 lower_bound = 30;
                 pc.printf("MODE IS S\n");
                 // if the char is E, set bounds to exercise
             } else if (a == 'E') {
                 curr_mode = EXERCISE;
                 upper_bound = 175;
+                LRI = 175;
                 lower_bound = 100;
                 pc.printf("MODE IS E\n");
                 // if the char is M, set to manual
             } else if (a == 'M') {
                 curr_mode = MANUAL;
                 upper_bound = 175;
+                LRI = 175;
                 lower_bound = 30;
                 pc.printf("MODE IS MANUAL\n");
                 // check for A if mode is manual