Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TextLCD mbed-rtos mbed
Fork of heart by
Revision 3:5941bb3c4fc2, committed 2016-11-30
- Comitter:
- shengtiz
- Date:
- Wed Nov 30 04:16:42 2016 +0000
- Parent:
- 2:b4551e56cd1c
- Child:
- 4:453a2f967f52
- Commit message:
- fourth commit
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 30 03:45:47 2016 +0000 +++ b/main.cpp Wed Nov 30 04:16:42 2016 +0000 @@ -158,16 +158,32 @@ } } -void Random(){ - //TODO: heart behaviour in random mode +//The following two modules random_sensing and random_pacing are two components of the random mode. +void random_sensing(){ while(1){ if(mode == 0){ performModeDelay(); - //natApaceBlink(); - } + } + } +} + +void random_pacing(){ + while(1){ + if(mode == 0){ + performModeDelay(); + } } } + +//Heart Modes: Random, Manual, Test +void Random(){ + //TODO: heart behaviour in random mode + Thread s(random_sensing); + Thread p(random_pacing); + while(1); +} + void Manual(){ //TODO: heart behaviour in manual mode while(1){