Part of the Pacemaker Project; this models the Pacemaker.
Dependencies: mbed TextLCD mbed-rtos
Diff: PacemakerController.cpp
- Revision:
- 37:4573d0f2ae23
- Parent:
- 34:b4b50ca26e8c
diff -r b4b50ca26e8c -r 4573d0f2ae23 PacemakerController.cpp --- a/PacemakerController.cpp Wed Dec 02 04:43:10 2015 +0000 +++ b/PacemakerController.cpp Wed Dec 02 04:58:35 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; @@ -276,18 +276,21 @@ // 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"); beats = 2; @@ -295,6 +298,7 @@ } else if (a == 'M') { curr_mode = MANUAL; upper_bound = 175; + LRI = 175; lower_bound = 30; beats = 300; pc.printf("MODE IS MANUAL\n");