Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

persistent inconsitancies and checks #3799

Closed
tablatronix opened this issue Nov 5, 2017 · 3 comments
Closed

persistent inconsitancies and checks #3799

tablatronix opened this issue Nov 5, 2017 · 3 comments
Assignees
Milestone

Comments

@tablatronix
Copy link
Contributor

tablatronix commented Nov 5, 2017

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.

@tablatronix
Copy link
Contributor Author

This is what I am thinking

#3798

@tablatronix
Copy link
Contributor Author

I can provide test case or scenarios, but essentially allow persistent to be disabled and wifi modes and config to be changed at will. Some of these checks do not allow this because they check only current configs and abort.

@devyte
Copy link
Collaborator

devyte commented Mar 12, 2018

Closed via #3798 .

@devyte devyte closed this as completed Mar 12, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants