mirror of https://github.com/arendst/Tasmota.git
don't touch AP_STA mode only if Rgx is up
This commit is contained in:
parent
4844209a3b
commit
4b52be6a5e
|
@ -218,7 +218,7 @@ void WifiBegin(uint8_t flag, uint8_t channel)
|
||||||
WifiSetMode(WIFI_STA); // Disable AP mode
|
WifiSetMode(WIFI_STA); // Disable AP mode
|
||||||
*/
|
*/
|
||||||
#ifdef USE_WIFI_RANGE_EXTENDER
|
#ifdef USE_WIFI_RANGE_EXTENDER
|
||||||
if (WiFi.getMode() != WIFI_AP_STA) { // Preserve range extender connections (#17103)
|
if (WiFi.getMode() != WIFI_AP_STA || !RgxApUp()) { // Preserve range extender connections (#17103)
|
||||||
WiFi.disconnect(true); // Delete SDK wifi config
|
WiFi.disconnect(true); // Delete SDK wifi config
|
||||||
delay(200);
|
delay(200);
|
||||||
WifiSetMode(WIFI_STA); // Disable AP mode
|
WifiSetMode(WIFI_STA); // Disable AP mode
|
||||||
|
|
|
@ -149,6 +149,12 @@ typedef struct
|
||||||
|
|
||||||
TRgxSettings RgxSettings;
|
TRgxSettings RgxSettings;
|
||||||
|
|
||||||
|
// externalize to be able to protect Rgx AP from teardown
|
||||||
|
bool RgxApUp()
|
||||||
|
{
|
||||||
|
return RgxSettings.status == RGX_CONFIGURED || RgxSettings.status == RGX_SETUP_NAPT;
|
||||||
|
}
|
||||||
|
|
||||||
// Check the current configuration is complete, updating RgxSettings.status
|
// Check the current configuration is complete, updating RgxSettings.status
|
||||||
void RgxCheckConfig(void)
|
void RgxCheckConfig(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue