-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Replacement for 2493] EUS: Save the post data in a file on the filesystem #2810
Conversation
- make the scanning work - since we now use a POST, we need to redirect to the same page with a specific mode (trying=true) so that the page displays the "wait for it" message
Just reading the docs I see two weaknesses. local p = {}
p.wifi_ssid="ssid"
p.wifi_password="password"
-- your own parameters:
p.timeout_delay="xxx"
p.device_name="yyy"
return p But alltogether it seems to be better to return the array right away. But this could also be done in a separate PR so this one will be integrated finally. |
👍 definitely. I think we shouldn't merge it without that fix as changing the file format later would mean a breaking change. Are you up for it? Update: there's even a TODO in the code that points into that direction nodemcu-firmware/app/modules/enduser_setup.c Line 777 in e98a104
I personally see little to no benefit with that. |
I'm not sure what you mean. No benefit in json or no benefit in CB with array? I would like to implement returning the data in a CB and not writing a file at all. Having to dofile leaves a dirty heap. I don't know how bad sjson is in this respect. But probably better. |
IMO C modules shouldn't depend on each other. Being dependent on SJSON to use EUS is a no-go for me. Even more so as I see no benefit in storing the data as JSON. After all it's a simple key-value structure.
From firmware perspective this would be nice indeed. However, you're likely only delegating the "dirty" work - to the application developer. For all the use cases I can imagine (I am sure there are many more) you will want to keep the custom settings around in a persistent manner. Hence, I expect most developers will write them to a file in the callback.
No way around that? |
Looking at this I have some more ideas :-) @marcelstoer what do you think about that? Should I change it while we are at it? |
True. Strictly speaking neither does the
Both "default" and "fallback" sound good to me.
Yeah, it's odd to include a
👍
Go ahead! Can you also include the |
There is also a breaking change which should be mentioned in the release notes: |
800727f
to
1964b9f
Compare
True, thanks for mentioning it again. I added a |
This replaces #2493 (and thus fixes #1302) which has been laying around for so long that it now has a couple of merge conflicts. I pulled in that branch and rebased it on
dev
(rather than bothering the author with this).Tagging everyone who's been involved in the other PR: @Gui13, @davidcbittner, @Jcrash29, @Pirngruber, @hanfengcan, @IDispose. I invite you to take the module for one last test ride before we merge these changes.
Here's a binary with the following properties for testing:
nodemcu_float_eus_params_post_20190622-2153.bin.zip