mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-03 05:20:39 +08:00
Fix wait not using delay for esp32 for tasks
This commit is contained in:
parent
5d6b9f6fb2
commit
b646799599
@ -220,14 +220,15 @@ void Hal::wdtFeed()
|
||||
//wait function
|
||||
void Hal::wait (uint32_t milliseconds)
|
||||
{
|
||||
#if defined(ASYNCWEBSERVER) || defined(ARDUINO_ARCH_ESP32)
|
||||
#if defined(ASYNCWEBSERVER)
|
||||
uint32_t timeout = millis();
|
||||
while ( (millis() - timeout) < milliseconds) {
|
||||
wdtFeed();
|
||||
}
|
||||
#else // !(ASYNCWEBSERVER + ARDUINO_ARCH_ESP32)
|
||||
#else // !(ASYNCWEBSERVER
|
||||
wdtFeed();
|
||||
delay(milliseconds);
|
||||
#endif // !ASYNCWEBSERVER & !ARDUINO_ARCH_ESP32
|
||||
#endif // !ASYNCWEBSERVER
|
||||
}
|
||||
|
||||
uint16_t Hal::getChipID()
|
||||
|
Loading…
x
Reference in New Issue
Block a user