Replies: 3 comments
-
There is no converter that I am aware of. Also there are no plans for reading SquareLine files in openHASP. |
Beta Was this translation helpful? Give feedback.
-
I know that there is no converter and my questions was more like if there will be converter or PR for reading SLS files, would you merge it or is it path which is not inline with idea of your project? Could you also please point to file where is code for reading and parsing JSONL file? |
Beta Was this translation helpful? Give feedback.
-
SLS only supports LVGL 8.x and openHASP uses LVGL 7.11, so a direct conversion of some objects and properties might not be possible... SLS .spj files already are in JSON format. So in theory you could read the project and parse it, then convert it into a JSONL file with the openHASP properties... I don't think openHASP can process the .spj directly, so a converter script would be the way to go. Such a conversion tool would be beneficial to a lot of users. Attributes are parsed in |
Beta Was this translation helpful? Give feedback.
-
Hello @fvanroie,
I started to play with openHASP and I like that it is using LVGL under the hood. I also really like SquareLine Studio (SLS) which is awesome help in design process of UI and I think it could be helpful with openHASP as well.
I looked at source code and I could not find part which is parsing
.jsonl
file, so I do not really know (yet) how openHASP render objects from this file, but I guess that you somehow just take what object type is used in this file and then select proper LVGL object and add properties to it (position, width/height, font size, etc.), if there are some.I do not know if you played with SLS, but you can export designed screen to
.c
&.h
files, which are basically LVGL code wraped in some helper functions. My point is that there are all information which are needed to display LVGL objects and that these information could be transformed to JSON file and uploaded to the device.My question is that if you think that this, if there will be some sort of converter or if openHASP could read exported files, could work for creating screens for openHASP?
I'm attaching simple SLS project with exported files so you can look how export looks and also import this project to SLS, if you want.
Thanks for your comment.
test_openHASP.zip
Beta Was this translation helpful? Give feedback.
All reactions