diff --git a/src_main/core/pitime.cpp b/src_main/core/pitime.cpp index cc4fed1f..f8bc3b16 100755 --- a/src_main/core/pitime.cpp +++ b/src_main/core/pitime.cpp @@ -466,5 +466,9 @@ PICout operator <<(PICout s, const PIDateTime & v) { #ifdef WINDOWS void msleep(int msecs) {Sleep(msecs);} #else +# ifdef FREERTOS + vTaskDelay(msecs / portTICK_PERIOD_MS); +# else void msleep(int msecs) {usleep(msecs * 1000);} +# endif #endif diff --git a/src_main/thread/pitimer.cpp b/src_main/thread/pitimer.cpp index af479830..40a7040f 100755 --- a/src_main/thread/pitimer.cpp +++ b/src_main/thread/pitimer.cpp @@ -517,7 +517,7 @@ void PITimer::init() { void PITimer::destroy() { //piCout << "destroy" << this << imp; if (imp == 0) return; - //imp->stop(true); + //imp->stop(true); ///BUG: WTF FreeRTOS segfault on this! delete imp; imp = 0; }