Merge pull request #4240 from andrethomas/development

Changes to driver boot delay
This commit is contained in:
Theo Arends 2018-11-01 18:42:33 +01:00 committed by GitHub
commit 23e18425c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View File

@ -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
\*********************************************************************************************/

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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