Skip to content

persistent inconsitancies and checks #3799

Closed
@tablatronix

Description

@tablatronix

All functions that use persistent and config equal or saves needs to have default/current conditional based on persistent. There are a few.
ESP8266WiFiAPClass::softAP
ESP8266WiFiSTAClass::begin

This also affects functions that check mode, but save persistent

ESP8266WiFiGenericClass::mode

    if(wifi_get_opmode() == (uint8) m) {
        return true;
    }

with regard to set_config espressif says This API can be called only if ESP8266 Station is enabled
I am not sure if this applies to *_default config (docs only mention flash) or what the consequences are, it may be necessary to add a sanity check if it is prohibited.

The main problem with persistent is that is assumes current config has not been changed from default, which it can be by toggling persistent on and off. So both need to be checked in comparisons, this has been a major thorn in some projects that preserve default config but switch in and out of alternative configs , for example captive portals, wifimanager etc.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions