mirror of https://github.com/arendst/Tasmota.git
Make driver boot delay configurable
This commit is contained in:
parent
b9717f8e9d
commit
1000cb836f
|
@ -269,6 +269,10 @@
|
|||
// -- Internal Analog input -----------------------
|
||||
#define USE_ADC_VCC // Display Vcc in Power status. Disable for use as Analog input on selected devices
|
||||
|
||||
// -- BOOT Delay for drivers ----------------------
|
||||
|
||||
#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
|
||||
|
||||
// -- One wire sensors ----------------------------
|
||||
// WARNING: Select none for default one DS18B20 sensor or enable one of the following two options for multiple sensors
|
||||
//#define USE_DS18x20_LEGACY // Optional for more than one DS18x20 sensors with dynamic scan using library OneWire (+1k5 code)
|
||||
|
|
|
@ -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…
Reference in New Issue