git-svn-id: svn://db.shs.com.ru/pip@705 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-02-06 21:51:25 +00:00
parent b6ed7bf12e
commit 3523b7a2d0
2 changed files with 5 additions and 1 deletions

View File

@@ -466,5 +466,9 @@ PICout operator <<(PICout s, const PIDateTime & v) {
#ifdef WINDOWS #ifdef WINDOWS
void msleep(int msecs) {Sleep(msecs);} void msleep(int msecs) {Sleep(msecs);}
#else #else
# ifdef FREERTOS
vTaskDelay(msecs / portTICK_PERIOD_MS);
# else
void msleep(int msecs) {usleep(msecs * 1000);} void msleep(int msecs) {usleep(msecs * 1000);}
# endif
#endif #endif

View File

@@ -517,7 +517,7 @@ void PITimer::init() {
void PITimer::destroy() { void PITimer::destroy() {
//piCout << "destroy" << this << imp; //piCout << "destroy" << this << imp;
if (imp == 0) return; if (imp == 0) return;
//imp->stop(true); //imp->stop(true); ///BUG: WTF FreeRTOS segfault on this!
delete imp; delete imp;
imp = 0; imp = 0;
} }