mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-23 22:37:16 +00:00
Merge pull request #4240 from andrethomas/development
Changes to driver boot delay
This commit is contained in:
commit
23e18425c4
@ -173,6 +173,8 @@ typedef unsigned long power_t; // Power (Relay) type
|
||||
#define KNX_MAX_device_param 30
|
||||
#define MAX_KNXTX_CMNDS 5
|
||||
|
||||
#define DRIVER_BOOT_DELAY 1 // Number of milliseconds to retard driver cycles during boot-up time to reduce overall CPU load whilst Wifi is connecting
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Enumeration
|
||||
\*********************************************************************************************/
|
||||
|
@ -233,7 +233,7 @@ boolean XdrvCall(byte Function)
|
||||
boolean result = false;
|
||||
|
||||
for (byte x = 0; x < xdrv_present; x++) {
|
||||
if (global_state.wifi_down) { delay(1); }
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
result = xdrv_func_ptr[x](Function);
|
||||
if (result) break;
|
||||
}
|
||||
|
@ -117,6 +117,7 @@ boolean XdspCall(byte Function)
|
||||
boolean result = false;
|
||||
|
||||
for (byte x = 0; x < xdsp_present; x++) {
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
result = xdsp_func_ptr[x](Function);
|
||||
if (result) break;
|
||||
}
|
||||
|
@ -90,6 +90,7 @@ int XnrgCall(byte Function)
|
||||
int result = 0;
|
||||
|
||||
for (byte x = 0; x < xnrg_present; x++) {
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
result = xnrg_func_ptr[x](Function);
|
||||
if (result) break;
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ boolean XsnsNextCall(byte Function)
|
||||
{
|
||||
xsns_index++;
|
||||
if (xsns_index == xsns_present) xsns_index = 0;
|
||||
if (global_state.wifi_down) { delay(1); }
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
return xsns_func_ptr[xsns_index](Function);
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ boolean XsnsCall(byte Function)
|
||||
#ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND
|
||||
uint32_t profile_start_millis = millis();
|
||||
#endif // PROFILE_XSNS_SENSOR_EVERY_SECOND
|
||||
if (global_state.wifi_down) { delay(1); }
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
result = xsns_func_ptr[x](Function);
|
||||
|
||||
#ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND
|
||||
|
Loading…
x
Reference in New Issue
Block a user