Pathfindr / Mbed OS mbed-os-PF-UWBBEACON_v1_dev

Dependencies:   aconno_I2C Lis2dh12 WatchdogTimer

Revision:
9:b0a1535b8ef2
Parent:
7:e9a19750700d
Child:
33:760005331b4c
--- a/common.cpp	Tue Dec 11 22:38:25 2018 +0000
+++ b/common.cpp	Sat Dec 15 13:45:28 2018 +0000
@@ -8,7 +8,8 @@
 void LED1on(long milliseconds = 0) {
     led1 = 0;
     if (milliseconds > 0) {
-        ThisThread::sleep_for(milliseconds);
+        //ThisThread::sleep_for(milliseconds);
+        Thread::wait(milliseconds);
         led1 = 1;
     }
 }
@@ -16,9 +17,11 @@
     for (int i = 0; i < (count*2); i++) {
         led1 = !led1;
         if (milliseconds > 0) {
-            ThisThread::sleep_for(milliseconds);
+            Thread::wait(milliseconds);
+            //ThisThread::sleep_for(milliseconds);
         } else { 
-            ThisThread::sleep_for(100); //default if 0 provided
+            Thread::wait(100);
+            //ThisThread::sleep_for(100); //default if 0 provided
         }
     }
     led1 = 1;