From 6aa4899a91a257391e53739815fb89a2a27161ac Mon Sep 17 00:00:00 2001 From: choelzl Date: Wed, 27 Apr 2022 02:31:29 +0200 Subject: [PATCH] Removed Yields --- metesp.ino | 5 +---- src/timedfun/timedfun.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/metesp.ino b/metesp.ino index 510ee02..8b61d58 100644 --- a/metesp.ino +++ b/metesp.ino @@ -132,7 +132,7 @@ void setup_TIMER(){ #define REGISTER_TIMEDFUN_CALL(name,min) tf->registerFun(name,min) REGISTER_TIMEDFUN(SENSOR_MEASURE_TF, sensor->measure()); -REGISTER_TIMEDFUN(OWM_MEASURE_TF, do{uint8_t i = 0;while(owm && owm[i]){owm[i]->update(); ++i;yield();}}while(0)); +REGISTER_TIMEDFUN(OWM_MEASURE_TF, do{uint8_t i = 0;while(owm && owm[i]){owm[i]->update(); ++i;}}while(0)); REGISTER_TIMEDFUN(RECORD_LOCAL_TF, iflx->record_local()); REGISTER_TIMEDFUN(RECORD_WEATHER_TF, iflx->record_weather()); REGISTER_TIMEDFUN(NTP_TF, ntp->updateNTPtime()); @@ -177,7 +177,6 @@ void setup(){ /* The main loop -------------------------------------------------------------*/ void loop(){ delay(5000); - yield(); } void loop_DRAW(void * pvParameters ){ @@ -197,7 +196,6 @@ void loop_DRAW(void * pvParameters ){ view_refresh = false; view_update = false; time_update = false; - yield(); vTaskDelay(10); } } @@ -206,7 +204,6 @@ void loop_DRAW(void * pvParameters ){ void loop_MEASURE(void * pvParameters ){ for(;;){ tf->update(); - yield(); vTaskDelay(10); } } \ No newline at end of file diff --git a/src/timedfun/timedfun.h b/src/timedfun/timedfun.h index b104d60..03a5be8 100644 --- a/src/timedfun/timedfun.h +++ b/src/timedfun/timedfun.h @@ -31,7 +31,6 @@ class TimedFun { ((counter-old_counter) >= e.second) || ((counter%e.second) < (old_counter%e.second))){ e.first(); - yield(); } } old_counter = counter;