Merge pull request #17147 from joba-1/rgx-fix-wifimanager-handling

don't touch AP_STA mode only if Rgx is up
This commit is contained in:
Theo Arends 2022-11-21 10:33:19 +01:00 committed by GitHub
commit 06b6e31cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -211,7 +211,7 @@ void WifiBegin(uint8_t flag, uint8_t channel) {
WiFi.persistent(false); // Solve possible wifi init errors (re-add at 6.2.1.16 #4044, #4083)
#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
delay(200);
WifiSetMode(WIFI_STA); // Disable AP mode

View File

@ -149,6 +149,12 @@ typedef struct
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
void RgxCheckConfig(void)
{