-
Notifications
You must be signed in to change notification settings - Fork 636
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
[wip] Dynamic settings (part 1) #1680
Conversation
- Add defaults to hardware.h header for DUAL boards - buttons are loaded in setup() instead of configure() (ref: v2)
Slight rework for migration converter. Since we can include files via
Initial enumeration can be done, so we have unique board ids. If they are saved to some index file, ID change can be avoided when hardware.h order changes. But I still do not know it is really necessary to have. |
Note about "no deallocating of relay / button / led / encoder etc lists to avoid memory fragmentation." Combined with change detection, to avoid allocating things multiple times, another thing to do is provide "moduleDeconfigure" / make "configure" two-stage. They'll need to run in a reverse order (assuming they are registered in setup, like configure). |
ee21f23#diff-efce85ec890efb697f7496c02c52e672 ps. i noticed a small library in rtos repo, which somewhat replaces both eeprom + embedis. did not find rotation support though: |
edit: Closed. See current lights for an example. Too much merge changes to handle and we no longer need migrate.
ref: https://github.com/xoseperez/espurna/tree/v2
Major difference from original v2 - no kv-only profiles (json headers). Classic header values are written to settings when
cfg
empty / 3 (current). Also, not overwriting board values and doing it only once.Minor difference - no deallocating of relay / button / led / encoder etc lists to avoid memory fragmentation. Reboot is required to reinit them, (most) settings used from loop are reloaded though so that we can configure their behaviour.
MY92XX mapping is taken straight from v2, but exposed in headers as well.
Shorter encoder settings keys. Updated button action to fit into a single "structured" value.
IDK about MAX_COMPONENTS for now (maybe per-module instead?)
I have not touched key migration yet. No sensor config yet too. Although, it might be better to do separately with WebUI part.
Function names are still from the current version.
Initial migration might also need some more thought.
edit: words...