-
Notifications
You must be signed in to change notification settings - Fork 3
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
Interface class #11
Merged
Merged
Interface class #11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
добавлен метод позволяющий проводить слияение объектов ранее загруженных из джейсона с другими загружаемымы объектами. На основе этой фунции можно реализовать простенькую схему многоязычности. Языковые данные подгружаются из отдельного ресурс-файла после загрузки основных UI данных и перекрывают метки/надписи в UI блоках.
from now on, resources/data.zip is obsolete, all resource files in /data/ dir should be uploaded to contraller's FS
Method JsonArray Interface::get_block() allows to get last section's block array plus small code refactoring
send accumulated data and clears memory while preserving sections stack this call does NOT closes the frame and implies that a continuation data will follow should be used when sending really large sections by periodicaly dumping the data to network stack and reusing memory
It creates a new JsonObject at the end of current block and returns a referencing object. Since ArduinoJson 7 it is not required to fit into a limit of fixed size JsonDocument, so creating an elements in-place appending to Interface's document could help to avoid useless data copy. Another benefit - it's more simple to create any arbitrary objects without modifying lib's code and adding specific methods to Interface class.
Most of the Interface methods related to UI objects creation now returns JsonObject that points to a newly created UI object. This will allow to further add/change it's properties before submiting frame. new method Interface::make_new_object() allows to create an empty object to add any user-defined properties and structure to it.
do not use UIelement for button methods, Interface::button* methods now returns JsonObject referencing button object
added Interface::json_block_get() to access block array Interface::json_object_get() to access last added object Interface::json_object_create() replaces Interface::make_new_object() Interface::json_frame_add replaced with Interface::json_object_add Interface::json_frame_* methods new return reference to JsonObjectwith a frame (in fact private json member)
remove backup file save/load, use bare minimum This config functionality need full refactoring
…onst value it does not makes much sense to pass object by pointer 'cause JsonObject is itself a pointer, passing by value simplifies syntax and checks
those wrappers over JsonDocument cfg were quite ugly and would be better to either reimplement it or remove conmletely and work directly on cfg object.
not supported for a long time already
vortigont
force-pushed
the
interface_class
branch
2 times, most recently
from
October 13, 2024 13:24
62f8620
to
7ac6136
Compare
vortigont
force-pushed
the
interface_class
branch
from
October 13, 2024 13:28
7ac6136
to
2710013
Compare
vortigont
force-pushed
the
interface_class
branch
from
October 13, 2024 14:01
206ffce
to
2350e9e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.