Removed Yields

This commit is contained in:
choelzl 2022-04-27 02:31:29 +02:00
parent 9f6e80ff95
commit 6aa4899a91
Signed by: sora
GPG Key ID: A362EA0491E2EEA0
2 changed files with 1 additions and 5 deletions

View File

@ -132,7 +132,7 @@ void setup_TIMER(){
#define REGISTER_TIMEDFUN_CALL(name,min) tf->registerFun(name,min) #define REGISTER_TIMEDFUN_CALL(name,min) tf->registerFun(name,min)
REGISTER_TIMEDFUN(SENSOR_MEASURE_TF, sensor->measure()); 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_LOCAL_TF, iflx->record_local());
REGISTER_TIMEDFUN(RECORD_WEATHER_TF, iflx->record_weather()); REGISTER_TIMEDFUN(RECORD_WEATHER_TF, iflx->record_weather());
REGISTER_TIMEDFUN(NTP_TF, ntp->updateNTPtime()); REGISTER_TIMEDFUN(NTP_TF, ntp->updateNTPtime());
@ -177,7 +177,6 @@ void setup(){
/* The main loop -------------------------------------------------------------*/ /* The main loop -------------------------------------------------------------*/
void loop(){ void loop(){
delay(5000); delay(5000);
yield();
} }
void loop_DRAW(void * pvParameters ){ void loop_DRAW(void * pvParameters ){
@ -197,7 +196,6 @@ void loop_DRAW(void * pvParameters ){
view_refresh = false; view_refresh = false;
view_update = false; view_update = false;
time_update = false; time_update = false;
yield();
vTaskDelay(10); vTaskDelay(10);
} }
} }
@ -206,7 +204,6 @@ void loop_DRAW(void * pvParameters ){
void loop_MEASURE(void * pvParameters ){ void loop_MEASURE(void * pvParameters ){
for(;;){ for(;;){
tf->update(); tf->update();
yield();
vTaskDelay(10); vTaskDelay(10);
} }
} }

View File

@ -31,7 +31,6 @@ class TimedFun {
((counter-old_counter) >= e.second) || ((counter-old_counter) >= e.second) ||
((counter%e.second) < (old_counter%e.second))){ ((counter%e.second) < (old_counter%e.second))){
e.first(); e.first();
yield();
} }
} }
old_counter = counter; old_counter = counter;