Skip to content
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

Device settings handling #14

Closed
wants to merge 6 commits into from
Closed

Conversation

ixtrader
Copy link
Contributor

Chnges:

  1. Save "Devices" settings only when "Save" button is pressed.
  2. Support a "Cancel" and "Clear" button while configuring Devices/Task table.
  3. Reduce the http reply size to minimize the risk of heap overflow during device configuration
    (this problem was hurting me seriously with the board manager 1.6, the new core 2.0.0 freed at least
    15000 Bytes of dynamic memory)
  4. Detect Heap overflow while configering the devices. (In case of overflow -> reboot)
  5. Method WebServer handle_devices() modularized in shorter methods

prerequisite: Board manager esp8266 at least 2.0.0

this saves a lot bytes in the reply String. A String longer than about 3000 Bytes seems to be
a problem. In most cases the reply was truncated I dont know why.
One reason might be a very small stack size (about 5k)
https://blog.cesanta.com/esp8266_vs_stack
1. Detect Heap overflow while configering the devices. (In case of overflow -> reboot)
2. Save Device settings only when Save Button is pressed
3. Support a Cancel and Clear Button
4. Reduce the http reply size to minimize the risk of heap overflow during device configuration
@ghost
Copy link

ghost commented Dec 19, 2015

I've done a quick test on these changes, but pulling it as it is would introduce a new bug. When the edit screen is displayed and certain dropdown menu entries are changed, data is posted back and the screen is refreshed because these changes have an effect on possible choices for other dropdown menus.

With the proposed changes this does not work anymore and you can't change these dropdown fields.

Probably has to do with this javascript code that is used in several places:

F("' LANGUAGE=javascript onchange="return dept_onchange(frmselect)">");

You can check the "Level Control" plugin to see how this fails right now.

@ixtrader
Copy link
Contributor Author

Thanks for the feedback mvdbro, I will try to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant