From 3523b7a2d035787616a4fdb775d062ca2af72844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Wed, 6 Feb 2019 21:51:25 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@705 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/core/pitime.cpp | 4 ++++ src_main/thread/pitimer.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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; }