Pacemaker code Implementation for SFWRENG 3K04
Dependencies: FXOS8700Q Queue mbed-rtos mbed
Fork of Pacemaker by
voor.cpp@30:0cb4890910cd, 2016-11-29 (annotated)
- Committer:
- FiveDollar
- Date:
- Tue Nov 29 21:30:19 2016 +0000
- Revision:
- 30:0cb4890910cd
- Parent:
- 21:fc6c33206152
this is the messed up code that i tried to fix
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
trane3 | 7:4eb590c7e064 | 1 | #pragma once |
trane3 | 7:4eb590c7e064 | 2 | #include "mbed.h" |
trane3 | 7:4eb590c7e064 | 3 | #include "voor.h" |
trane3 | 8:75c1dd8b0d61 | 4 | #include "pulse.h" |
trane3 | 7:4eb590c7e064 | 5 | |
trane3 | 8:75c1dd8b0d61 | 6 | voor::voor(){} |
trane3 | 8:75c1dd8b0d61 | 7 | |
trane3 | 8:75c1dd8b0d61 | 8 | voor::voor(pulse* p){ |
trane3 | 8:75c1dd8b0d61 | 9 | voorPulse = p; |
trane3 | 7:4eb590c7e064 | 10 | } |
trane3 | 7:4eb590c7e064 | 11 | |
trane3 | 19:d58e1e1a9a24 | 12 | voor::voor(pulse* p, chamberData* c){ |
trane3 | 19:d58e1e1a9a24 | 13 | voorPulse = p; |
trane3 | 19:d58e1e1a9a24 | 14 | voorChamber = c; |
trane3 | 19:d58e1e1a9a24 | 15 | |
trane3 | 19:d58e1e1a9a24 | 16 | } |
trane3 | 8:75c1dd8b0d61 | 17 | voor::~voor(){}; |
trane3 | 8:75c1dd8b0d61 | 18 | |
trane3 | 8:75c1dd8b0d61 | 19 | void voor::startPace(){ |
trane3 | 11:35b259e70c9a | 20 | while (true){ |
trane3 | 11:35b259e70c9a | 21 | voorPulse->startPulse(); |
trane3 | 19:d58e1e1a9a24 | 22 | wait(voorChamber->getPaceWidth()); |
trane3 | 11:35b259e70c9a | 23 | } |
trane3 | 8:75c1dd8b0d61 | 24 | } |
trane3 | 11:35b259e70c9a | 25 |