mirror of https://github.com/arendst/Tasmota.git
Fix Sonoff Pow R2 and Sonoff S31
Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug)
This commit is contained in:
parent
0868c72140
commit
c0cfdde8ac
|
@ -1,6 +1,6 @@
|
|||
/* 6.3.0.7 20181111
|
||||
* Fix wifi connection errors using wifi disconnect and ESP.reset instead of ESP.restart
|
||||
* Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by MP3 driver
|
||||
* Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug)
|
||||
*
|
||||
* 6.3.0.6 20181110
|
||||
* Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%
|
||||
|
|
|
@ -765,6 +765,15 @@ uint8_t ValidGPIO(uint8_t pin, uint8_t gpio)
|
|||
return result;
|
||||
}
|
||||
|
||||
void AppDelay()
|
||||
{
|
||||
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
|
||||
\*********************************************************************************************/
|
||||
|
|
|
@ -238,7 +238,7 @@ boolean XdrvCall(byte Function)
|
|||
boolean result = false;
|
||||
|
||||
for (byte x = 0; x < xdrv_present; x++) {
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
AppDelay();
|
||||
result = xdrv_func_ptr[x](Function);
|
||||
if (result) break;
|
||||
}
|
||||
|
|
|
@ -568,7 +568,7 @@ boolean XsnsNextCall(byte Function)
|
|||
xsns_index++;
|
||||
if (xsns_index == xsns_present) { xsns_index = 0; }
|
||||
}
|
||||
if (global_state.wifi_down) { delay(DRIVER_BOOT_DELAY); }
|
||||
AppDelay();
|
||||
return xsns_func_ptr[xsns_index](Function);
|
||||
}
|
||||
|
||||
|
@ -586,7 +586,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(DRIVER_BOOT_DELAY); }
|
||||
AppDelay();
|
||||
result = xsns_func_ptr[x](Function);
|
||||
|
||||
#ifdef PROFILE_XSNS_SENSOR_EVERY_SECOND
|
||||
|
|
Loading…
Reference in New Issue