mbed heart
Dependencies: TextLCD mbed-rtos mbed
Diff: PMTest.cpp
- Revision:
- 1:c0fdd901d5d5
- Parent:
- 0:54ec65701097
--- a/PMTest.cpp Wed Dec 02 00:50:28 2015 +0000 +++ b/PMTest.cpp Wed Dec 02 00:56:35 2015 +0000 @@ -23,10 +23,6 @@ mode test_curr_mode = RANDOM; Timer t; - - - - void random_heart(){ t.reset(); t.start(); @@ -40,21 +36,19 @@ Thread::wait(10); asense = 0; } - }else{ + } else { + if(t.read() > minwaitV){ vsense = 1; Thread::wait(10); vsense = 0; } } - - + t.reset(); - } } - void kbd_intrp(){ char a = serial_in.getc(); @@ -83,14 +77,9 @@ Thread::wait(10); vsense = 0; } - - - } - - // interrupt function void interrupt_and_run_test(){ // zero timer, set for 1ms interrupt