littlefs-do: unzip in memory and copy listed resources to SPI raw file#60
Merged
NeroBurner merged 3 commits intomainfrom Sep 8, 2022
Merged
littlefs-do: unzip in memory and copy listed resources to SPI raw file#60NeroBurner merged 3 commits intomainfrom
NeroBurner merged 3 commits intomainfrom
Conversation
Single header downloaded from https://github.com/nlohmann/json/releases/tag/v3.11.2 Add a custom CMakeLists.txt to have a `nlohmann_json::nlohmann_json` target to link against (just like the full project)
Contributor
|
Nice, thanks for adding support for this (future) feature of InfiniTime! It works very well for me! Just curious : is there any reason for not using git submodules for miniz and nlohmann_json? |
Add a new command `littlefs-do res load resource.zip` which loads resources from a zip file to the SPI raw file. Below an example `resource.zip` is loaded: ```sh $ ./littlefs-do res load infinitime-resources-1.10.0.zip --verbose Calling FS::Init() running 'res' running 'res load' loading resource file: "infinitime-resources-1.10.0.zip" zip: num of files in zip: 8 copy file teko.bin from zip to SPI path '/teko.bin' copy file lv_font_dots_40.bin from zip to SPI path '/lv_font_dots_40.bin' copy file 7segments_40.bin from zip to SPI path '/7segments_40.bin' copy file bebas.bin from zip to SPI path '/bebas.bin' copy file 7segments_115.bin from zip to SPI path '/7segments_115.bin' copy file matrix.bin from zip to SPI path '/matrix.bin' copy file infineat-1.bin from zip to SPI path '/infineat-1.bin' finished: zip file fully loaded into SPI memory: infinitime-resources-1.10.0.zip ``` Afterwards the files are listed in the SPI raw file: ```sh $ ./littlefs-do ls type: DIR name: / type: DIR name: . type: DIR name: .. type: REG size: 4928 name: 7segments\_115.bin type: REG size: 760 name: 7segments\_40.bin type: REG size: 4420 name: bebas.bin type: REG size: 1430 name: infineat-1.bin type: REG size: 1840 name: lv\_font\_dots\_40.bin type: REG size: 115204 name: matrix.bin type: REG size: 440 name: teko.bin ``` Fixes: #55
a64d3c1 to
2306807
Compare
Collaborator
Author
|
updated README, squashed into nice commits I didn't want to update the AUR package, and the small number of files to add (2 for miniz and 1 header for nlohmann_json) somehow makes it a low maintenance burden for me (I think). So in short: "I'm lazy" 😅 |
This file contains hidden or 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
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.
Add a new command
littlefs-do res load resource.zipwhich loadsresources from a zip file to the SPI raw file.
Below an example
resource.zipis loaded:Afterwards the files are listed in the SPI raw file:
Fixes: #55