Clean up
This commit is contained in:
Theo Arends 2018-11-24 17:22:06 +01:00
parent b061f8d135
commit 164db4e12b
4 changed files with 11 additions and 12 deletions

View File

@ -767,15 +767,6 @@ uint8_t ValidGPIO(uint8_t pin, uint8_t gpio)
return result;
}
void AppDelay(void)
{
if (APP_BAUDRATE == baudrate) { // When baudrate too low it will fail on Sonoff Pow R2 and S31 serial interface initialization
if (global_state.wifi_down) {
delay(DRIVER_BOOT_DELAY);
}
}
}
/*********************************************************************************************\
* Sleep aware time scheduler functions borrowed from ESPEasy
\*********************************************************************************************/

View File

@ -584,3 +584,11 @@ void EspRestart(void)
}
*/
void WifiAddDelayWhenDisconnected(void)
{
if (APP_BAUDRATE == baudrate) { // When baudrate too low it will fail on Sonoff Pow R2 and S31 serial interface initialization
if (global_state.wifi_down) {
delay(DRIVER_BOOT_DELAY);
}
}
}

View File

@ -238,7 +238,7 @@ boolean XdrvCall(byte Function)
boolean result = false;
for (byte x = 0; x < xdrv_present; x++) {
// AppDelay();
// WifiAddDelayWhenDisconnected();
result = xdrv_func_ptr[x](Function);
if (result) break;
}

View File

@ -278,7 +278,7 @@ boolean XsnsNextCall(byte Function, uint8_t &xsns_index)
if (xsns_index == xsns_present) { xsns_index = 0; }
}
#endif
// AppDelay();
// WifiAddDelayWhenDisconnected();
return xsns_func_ptr[xsns_index](Function);
}
@ -298,7 +298,7 @@ boolean XsnsCall(byte Function)
#ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND
uint32_t profile_start_millis = millis();
#endif // PROFILE_XSNS_SENSOR_EVERY_SECOND
// AppDelay();
// WifiAddDelayWhenDisconnected();
result = xsns_func_ptr[x](Function);
#ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND