mirror of https://github.com/arendst/Tasmota.git
Reduce CPU usage at boot time
If many drivers has been enabled, there is a peak of CPU usage at boot time that it is translated as a peak in power consumption. This address to a wifi connection issue in poor power regulated devices like Sonoff Basic R2. This fix reduces cpu usage making the wifi connection to establish faster.
This commit is contained in:
parent
9e2df8f38c
commit
5d1f5a40a1
|
@ -249,6 +249,9 @@ boolean XdrvCall(byte Function)
|
|||
boolean result = false;
|
||||
|
||||
for (byte x = 0; x < xdrv_present; x++) {
|
||||
if (!((WL_CONNECTED == WiFi.status()) && (static_cast<uint32_t>(WiFi.localIP()) != 0))) {
|
||||
delay(1);
|
||||
}
|
||||
result = xdrv_func_ptr[x](Function);
|
||||
if (result) break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue