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.
Diff: main.cpp
- Revision:
- 7:e49685bca7c7
- Parent:
- 6:8b0ca28c88a4
- Child:
- 8:041c4841cd96
--- a/main.cpp Wed Feb 27 15:54:07 2019 +0000
+++ b/main.cpp Wed Mar 11 08:46:57 2020 +0000
@@ -70,9 +70,9 @@
// -----------------------------------------------
void timer_thread() { // method to run in thread
while (true) {
- wait(1.0) ;
+ ThisThread::sleep_for(1000) ;
signals.set(ON1 | ON2) ;
- wait(1.0) ;
+ ThisThread::sleep_for(1000) ;
signals.set(OFF1 | OFF2) ;
// waitButton() ; // POSSIBLE FAULT HERE
}
@@ -98,7 +98,11 @@
// show start-up
led_red = OFF;
- wait(5.0) ;
+ ThisThread::sleep_for(5000) ;
led_red = ON;
- // main thread terminates
+
+ // main thread does nothing more
+ while (true) {
+ ThisThread::sleep_for(10000) ;
+ }
}
\ No newline at end of file