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 pacemaker_FINAL_v1 by
Diff: main.cpp
- Revision:
- 6:704de3abb5e9
- Parent:
- 5:8cd62e3c3c3a
diff -r 8cd62e3c3c3a -r 704de3abb5e9 main.cpp
--- a/main.cpp Thu Dec 04 03:26:06 2014 +0000
+++ b/main.cpp Thu Dec 04 03:47:04 2014 +0000
@@ -70,14 +70,9 @@
while (1) {
Thread::signal_wait(RUN, osWaitForever);
int done = 0;
- ta.reset();
while (!done) {
- if (AGet == 1 && !isPVARP) {
- V_thread->signal_set(RUN);
- flashLED(4);
- done = 1;
- }
if (ta.read_ms() >= LRI-AVI) {
+ tv.reset();
V_thread->signal_set(RUN);
APace = 1;
Thread::wait(2);
@@ -85,6 +80,12 @@
flashLED(2);
done = 1;
}
+ if (AGet == 1 && !isPVARP) {
+ tv.reset();
+ V_thread->signal_set(RUN);
+ flashLED(4);
+ done = 1;
+ }
}
}
}
@@ -93,15 +94,9 @@
while (1) {
Thread::signal_wait(RUN, osWaitForever);
int done = 0;
- tv.reset();
while (!done) {
- if (VGet == 1 && !isVRP) {
- A_thread->signal_set(RUN);
- blind();
- flashLED(3);
- done = 1;
- }
if (tv.read_ms() >= AVI) {
+ ta.reset();
A_thread->signal_set(RUN);
VPace = 1;
Thread::wait(2);
@@ -110,6 +105,13 @@
flashLED(1);
done = 1;
}
+ if (VGet == 1 && !isVRP) {
+ ta.reset();
+ A_thread->signal_set(RUN);
+ blind();
+ flashLED(3);
+ done = 1;
+ }
}
}
}
