forked from espressif/arduino-esp32
Update main.cpp
This commit is contained in:
@ -10,9 +10,9 @@ TaskHandle_t loopTaskHandle = NULL;
|
|||||||
void yieldIfNecessary(void){
|
void yieldIfNecessary(void){
|
||||||
static uint64_t lastYield = 0;
|
static uint64_t lastYield = 0;
|
||||||
uint64_t now = millis();
|
uint64_t now = millis();
|
||||||
if((now - lastYield) > 4000) {
|
if((now - lastYield) > 2000) {
|
||||||
lastYield = now;
|
lastYield = now;
|
||||||
vTaskDelay(1); //delay 1 RTOS tick
|
vTaskDelay(5); //delay 1 RTOS tick
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user