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