From 9d83cee9685ac5cdd98847260af12d67f397ede8 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Mon, 8 Jan 2024 07:12:03 +0100 Subject: [PATCH 1/7] Fix: off() API not working. (#17) This fixes #16. --- src/GigaDisplayRGB.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GigaDisplayRGB.h b/src/GigaDisplayRGB.h index 129c47c..c48a4d5 100644 --- a/src/GigaDisplayRGB.h +++ b/src/GigaDisplayRGB.h @@ -28,7 +28,7 @@ class GigaDisplayBacklight { } void cb() { static int counter = 0; - if (counter > intensity) { + if (counter >= intensity) { *pin = 0; } else { *pin = 1; @@ -50,4 +50,4 @@ class GigaDisplayBacklight { int intensity; }; -#endif \ No newline at end of file +#endif From acc3868f4113610b528b6817934f52304d97bf32 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Mon, 8 Jan 2024 08:56:25 +0100 Subject: [PATCH 2/7] Remove MacOS specific (and library irrelevant) file .DS_Store. (#18) --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 65267a919194138c52ad60b7390d4d1bbf7c55b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ8Hu~5S>X>2-3JrxmWNF7U7)07qAnhlTknfQmV?id^ErL5Mm@lnl$DO%)H&% zc`Nh^jYdSY`|P(O8xd*YhVpG;X?AYDu!qbj5RN-OWRQ26`sr<0RIewD+k*2YM>+lG zzmDTy?^wT?St>vUr~nn90#sm40qec6_9>8&3Qz$m@S}iz9}3*CCeDHW=|J!i0N5by zhPBTUz+wqtO`HRffoV{ILDd{FH0a2etgDH0V9-T#_|SZ^=7ggDblhLOT(kx;<&)@uv=0JoYm+ze}{Ab2|ldOOC( f+VQg&MP0Eq&THZv=yc?r4&={(=|ZCd|E<6UiPaUM From f9fd31dcfb7cdb980ed054f6bc7a8d172ea2e2a9 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Mon, 8 Jan 2024 09:06:16 +0100 Subject: [PATCH 3/7] Ignore CLion IDE files. (#19) --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ From 3437c723f303b5d513c10da0c22b7c2104fa65e4 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 10 Jan 2024 09:30:15 +0100 Subject: [PATCH 4/7] Add CI workflow to check for commonly misspelled words (#20) On every push, pull request, and periodically, use codespell to check for commonly misspelled words. In the event of a false positive, the problematic word should be added, in all lowercase, to the field of . Regardless of the case of the word in the false positive, it must be in all lowercase in the ignore list. The ignore list is comma-separated with no spaces. --- .codespellrc | 9 ++++ .github/workflows/spell-check-task.yml | 70 ++++++++++++++++++++++++++ README.md | 4 +- Taskfile.yml | 31 ++++++++++++ 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 .codespellrc create mode 100644 .github/workflows/spell-check-task.yml create mode 100644 Taskfile.yml diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..a8608a4 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,9 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc +# See: https://github.com/codespell-project/codespell#using-a-config-file +[codespell] +# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: +ignore-words-list = , +skip = ./.git,./.licenses,__pycache__,node_modules,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock +builtin = clear,informal,en-GB_to_en-US +check-filenames = +check-hidden = diff --git a/.github/workflows/spell-check-task.yml b/.github/workflows/spell-check-task.yml new file mode 100644 index 0000000..f4d5cfe --- /dev/null +++ b/.github/workflows/spell-check-task.yml @@ -0,0 +1,70 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md +name: Spell Check + +env: + # See: https://github.com/actions/setup-python/tree/main#available-versions-of-python + PYTHON_VERSION: "3.9" + +# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows +on: + create: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + run-determination: + runs-on: ubuntu-latest + permissions: {} + outputs: + result: ${{ steps.determination.outputs.result }} + steps: + - name: Determine if the rest of the workflow should run + id: determination + run: | + RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" + # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead. + if [[ + "${{ github.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX + ]]; then + # Run the other jobs. + RESULT="true" + else + # There is no need to run the other jobs. + RESULT="false" + fi + + echo "result=$RESULT" >> $GITHUB_OUTPUT + + spellcheck: + needs: run-determination + if: needs.run-determination.outputs.result == 'true' + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install Poetry + run: pip install poetry + + - name: Install Task + uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Spell check + run: task general:check-spelling diff --git a/README.md b/README.md index 77cf05f..767ccb1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Arduino_GigaDisplay +Arduino_GigaDisplay +=================== +[![Spell Check status](https://github.com/arduino-libraries/Arduino_GigaDisplay/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_GigaDisplay/actions/workflows/spell-check-task.yml) This library contains a set of examples to use the [GIGA Display Shield](docs.arduino.cc/hardware/giga-display-shield). Upon installing this library from the Arduino IDE, the following libraries will also be installed: - [ArduinoGraphics](https://github.com/arduino-libraries/ArduinoGraphics) diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..e5e5cb4 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,31 @@ +# See: https://taskfile.dev/#/usage +version: "3" + +tasks: + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml + poetry:install-deps: + desc: Install dependencies managed by Poetry + cmds: + - poetry install --no-root + + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml + poetry:update-deps: + desc: Update all dependencies managed by Poetry to their newest versions + cmds: + - poetry update + + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml + general:check-spelling: + desc: Check for commonly misspelled words + deps: + - task: poetry:install-deps + cmds: + - poetry run codespell + + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml + general:correct-spelling: + desc: Correct commonly misspelled words where possible + deps: + - task: poetry:install-deps + cmds: + - poetry run codespell --write-changes From 404f22a54d97e7700ecb20be1a8f613c83c4e222 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 11 Jan 2024 06:47:17 +0100 Subject: [PATCH 5/7] Add CI workflow to synchronize with shared repository labels (#21) On every push that changes relevant files, and periodically, configure the repository's issue and pull request labels according to the universal, shared, and local label configuration files. --- .github/workflows/sync-labels-npm.yml | 160 ++++++++++++++++++++++++++ README.md | 3 +- 2 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sync-labels-npm.yml diff --git a/.github/workflows/sync-labels-npm.yml b/.github/workflows/sync-labels-npm.yml new file mode 100644 index 0000000..a6714cd --- /dev/null +++ b/.github/workflows/sync-labels-npm.yml @@ -0,0 +1,160 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels-npm.md +name: Sync Labels + +env: + # See: https://github.com/actions/setup-node/#readme + NODE_VERSION: 16.x + CONFIGURATIONS_FOLDER: .github/label-configuration-files + CONFIGURATIONS_ARTIFACT: label-configuration-files + +# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/sync-labels-npm.ya?ml" + - ".github/label-configuration-files/*.ya?ml" + - "package.json" + - "package-lock.json" + pull_request: + paths: + - ".github/workflows/sync-labels-npm.ya?ml" + - ".github/label-configuration-files/*.ya?ml" + - "package.json" + - "package-lock.json" + schedule: + # Run daily at 8 AM UTC to sync with changes to shared label configurations. + - cron: "0 8 * * *" + workflow_dispatch: + repository_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Download JSON schema for labels configuration file + id: download-schema + uses: carlosperate/download-file-action@v2 + with: + file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json + location: ${{ runner.temp }}/label-configuration-schema + + - name: Install JSON schema validator + run: npm install + + - name: Validate local labels configuration + run: | + # See: https://github.com/ajv-validator/ajv-cli#readme + npx \ + --package=ajv-cli \ + --package=ajv-formats \ + ajv validate \ + --all-errors \ + -c ajv-formats \ + -s "${{ steps.download-schema.outputs.file-path }}" \ + -d "${{ env.CONFIGURATIONS_FOLDER }}/*.{yml,yaml}" + + download: + needs: check + runs-on: ubuntu-latest + permissions: {} + + strategy: + matrix: + filename: + # Filenames of the shared configurations to apply to the repository in addition to the local configuration. + # https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/sync-labels + - universal.yml + + steps: + - name: Download + uses: carlosperate/download-file-action@v2 + with: + file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} + + - name: Pass configuration files to next job via workflow artifact + uses: actions/upload-artifact@v3 + with: + path: | + *.yaml + *.yml + if-no-files-found: error + name: ${{ env.CONFIGURATIONS_ARTIFACT }} + + sync: + needs: download + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + + steps: + - name: Set environment variables + run: | + # See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable + echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV" + + - name: Determine whether to dry run + id: dry-run + if: > + github.event_name == 'pull_request' || + ( + ( + github.event_name == 'push' || + github.event_name == 'workflow_dispatch' + ) && + github.ref != format('refs/heads/{0}', github.event.repository.default_branch) + ) + run: | + # Use of this flag in the github-label-sync command will cause it to only check the validity of the + # configuration. + echo "flag=--dry-run" >> $GITHUB_OUTPUT + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download configuration files artifact + uses: actions/download-artifact@v3 + with: + name: ${{ env.CONFIGURATIONS_ARTIFACT }} + path: ${{ env.CONFIGURATIONS_FOLDER }} + + - name: Remove unneeded artifact + uses: geekyeggo/delete-artifact@v2 + with: + name: ${{ env.CONFIGURATIONS_ARTIFACT }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Merge label configuration files + run: | + # Merge all configuration files + shopt -s extglob + cat "${{ env.CONFIGURATIONS_FOLDER }}"/*.@(yml|yaml) > "${{ env.MERGED_CONFIGURATION_PATH }}" + + - name: Install github-label-sync + run: npm install + + - name: Sync labels + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # See: https://github.com/Financial-Times/github-label-sync + npx \ + github-label-sync \ + --labels "${{ env.MERGED_CONFIGURATION_PATH }}" \ + ${{ steps.dry-run.outputs.flag }} \ + ${{ github.repository }} diff --git a/README.md b/README.md index 767ccb1..e7ecaf6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ Arduino_GigaDisplay =================== [![Spell Check status](https://github.com/arduino-libraries/Arduino_GigaDisplay/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_GigaDisplay/actions/workflows/spell-check-task.yml) +[![Sync Labels status](https://github.com/arduino-libraries/Arduino_GigaDisplay/actions/workflows/sync-labels-npm.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_GigaDisplay/actions/workflows/sync-labels-npm.yml) This library contains a set of examples to use the [GIGA Display Shield](docs.arduino.cc/hardware/giga-display-shield). Upon installing this library from the Arduino IDE, the following libraries will also be installed: - [ArduinoGraphics](https://github.com/arduino-libraries/ArduinoGraphics) @@ -14,4 +15,4 @@ It will also install the [lvgl](https://github.com/lvgl/lvgl) library, which is ## GigaDisplayRGB -This library has a class called `GigaDisplayRGB`, which is used to control the built-in RGB on the GIGA Display Shield via the IS31FL3197 driver (I2C). \ No newline at end of file +This library has a class called `GigaDisplayRGB`, which is used to control the built-in RGB on the GIGA Display Shield via the IS31FL3197 driver (I2C). From e82c8b33ec25ec7ffb4a052e00082f21bb23ad9b Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 19 Mar 2024 13:13:36 +0100 Subject: [PATCH 6/7] porting LVGL examples to version 9 --- .../button_lvgl.ino | 6 +++++- examples/lvgl/image_lvgl/image_lvgl.ino | 5 +++++ examples/lvgl/image_lvgl/img_arduinologo.c | 10 ++++++++++ examples/lvgl/imu_orientation/img_arduinologo.c | 10 ++++++++++ examples/lvgl/imu_orientation/imu_orientation.ino | 5 +++++ examples/lvgl/squarelinestudio_lvgl/README.md | 3 --- examples/lvgl/squarelinestudio_lvgl_v8/README.md | 6 ++++++ .../squarelinestudio_lvgl_v8.ino} | 6 +++++- .../ui/library.properties | 0 .../ui/src/CMakeLists.txt | 0 .../ui/src/components/ui_comp_hook.c | 0 .../ui/src/filelist.txt | 0 .../ui/src/readme.txt | 0 .../ui/src/screens/ui_Screen1.c | 0 .../ui/src/ui.c | 0 .../ui/src/ui.h | 0 .../ui/src/ui_events.h | 0 .../ui/src/ui_helpers.c | 0 .../ui/src/ui_helpers.h | 0 .../ui/ui.h | 0 20 files changed, 46 insertions(+), 5 deletions(-) rename examples/lvgl/{button_lvgl_example => button_lvgl}/button_lvgl.ino (89%) delete mode 100644 examples/lvgl/squarelinestudio_lvgl/README.md create mode 100644 examples/lvgl/squarelinestudio_lvgl_v8/README.md rename examples/lvgl/{squarelinestudio_lvgl/squarelinestudio_lvgl.ino => squarelinestudio_lvgl_v8/squarelinestudio_lvgl_v8.ino} (84%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/library.properties (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/CMakeLists.txt (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/components/ui_comp_hook.c (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/filelist.txt (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/readme.txt (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/screens/ui_Screen1.c (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/ui.c (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/ui.h (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/ui_events.h (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/ui_helpers.c (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/src/ui_helpers.h (100%) rename examples/lvgl/{squarelinestudio_lvgl => squarelinestudio_lvgl_v8}/ui/ui.h (100%) diff --git a/examples/lvgl/button_lvgl_example/button_lvgl.ino b/examples/lvgl/button_lvgl/button_lvgl.ino similarity index 89% rename from examples/lvgl/button_lvgl_example/button_lvgl.ino rename to examples/lvgl/button_lvgl/button_lvgl.ino index dc0313b..dfb24de 100644 --- a/examples/lvgl/button_lvgl_example/button_lvgl.ino +++ b/examples/lvgl/button_lvgl/button_lvgl.ino @@ -6,7 +6,11 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Arduino_GigaDisplayTouch TouchDetector; static void btn_event_cb(lv_event_t * e) { - lv_obj_t * btn = lv_event_get_target(e); + #if (LVGL_VERSION_MAJOR == 9) + lv_obj_t * btn = (lv_obj_t *) lv_event_get_target(e); + #else + lv_obj_t * btn = lv_event_get_target(e); + #endif lv_obj_t * label = lv_obj_get_child(btn, 0); lv_label_set_text_fmt(label, "Clicked!"); } diff --git a/examples/lvgl/image_lvgl/image_lvgl.ino b/examples/lvgl/image_lvgl/image_lvgl.ino index d42ec21..eeb104f 100644 --- a/examples/lvgl/image_lvgl/image_lvgl.ino +++ b/examples/lvgl/image_lvgl/image_lvgl.ino @@ -1,3 +1,8 @@ +/* +* Online image converter for LVGL v9: https://lvgl.io/tools/imageconverter_v9 +* Online image converter for LVGL v8 or earlier: https://lvgl.io/tools/imageconverter +*/ + #include "Arduino_H7_Video.h" #include "lvgl.h" diff --git a/examples/lvgl/image_lvgl/img_arduinologo.c b/examples/lvgl/image_lvgl/img_arduinologo.c index 244e455..e938d79 100644 --- a/examples/lvgl/image_lvgl/img_arduinologo.c +++ b/examples/lvgl/image_lvgl/img_arduinologo.c @@ -636,6 +636,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_ARDUI #endif }; +#if (LVGL_VERSION_MAJOR == 9) +const lv_img_dsc_t img_arduinologo = { + .header.cf = LV_COLOR_FORMAT_RGB565, + .header.w = 200, + .header.h = 150, + .data_size = 30000 * LV_COLOR_DEPTH / 8, + .data = img_arduinologo_map, +}; +#else const lv_img_dsc_t img_arduinologo = { .header.cf = LV_IMG_CF_TRUE_COLOR, .header.always_zero = 0, @@ -645,3 +654,4 @@ const lv_img_dsc_t img_arduinologo = { .data_size = 30000 * LV_COLOR_SIZE / 8, .data = img_arduinologo_map, }; +#endif \ No newline at end of file diff --git a/examples/lvgl/imu_orientation/img_arduinologo.c b/examples/lvgl/imu_orientation/img_arduinologo.c index 244e455..aaaf009 100644 --- a/examples/lvgl/imu_orientation/img_arduinologo.c +++ b/examples/lvgl/imu_orientation/img_arduinologo.c @@ -636,6 +636,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_ARDUI #endif }; +#if (LVGL_VERSION_MAJOR == 9) +const lv_img_dsc_t img_arduinologo = { + .header.cf = LV_COLOR_FORMAT_RGB565, + .header.w = 200, + .header.h = 150, + .data_size = 30000 * LV_COLOR_DEPTH / 8, + .data = img_arduinologo_map, +}; +#else const lv_img_dsc_t img_arduinologo = { .header.cf = LV_IMG_CF_TRUE_COLOR, .header.always_zero = 0, @@ -645,3 +654,4 @@ const lv_img_dsc_t img_arduinologo = { .data_size = 30000 * LV_COLOR_SIZE / 8, .data = img_arduinologo_map, }; +#endif diff --git a/examples/lvgl/imu_orientation/imu_orientation.ino b/examples/lvgl/imu_orientation/imu_orientation.ino index 556540a..134df8e 100644 --- a/examples/lvgl/imu_orientation/imu_orientation.ino +++ b/examples/lvgl/imu_orientation/imu_orientation.ino @@ -1,3 +1,8 @@ +/* +* Online image converter for LVGL v9: https://lvgl.io/tools/imageconverter_v9 +* Online image converter for LVGL v8 or earlier: https://lvgl.io/tools/imageconverter +*/ + #include "Arduino_BMI270_BMM150.h" #include "Arduino_H7_Video.h" #include "lvgl.h" diff --git a/examples/lvgl/squarelinestudio_lvgl/README.md b/examples/lvgl/squarelinestudio_lvgl/README.md deleted file mode 100644 index 1871654..0000000 --- a/examples/lvgl/squarelinestudio_lvgl/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# How to run the sketch: -- copy the `ui` folder into your `Arduino/libraries` directory -- upload the sketch and see the magic! \ No newline at end of file diff --git a/examples/lvgl/squarelinestudio_lvgl_v8/README.md b/examples/lvgl/squarelinestudio_lvgl_v8/README.md new file mode 100644 index 0000000..276b899 --- /dev/null +++ b/examples/lvgl/squarelinestudio_lvgl_v8/README.md @@ -0,0 +1,6 @@ +> [!NOTE] +> SquareLine Studio has ended its collaboration with LVGL. It only supports LVGL version 8 and earlier. + +# How to run the sketch: +- move the `ui` folder into your `Arduino/libraries` directory +- upload the sketch and see the magic! \ No newline at end of file diff --git a/examples/lvgl/squarelinestudio_lvgl/squarelinestudio_lvgl.ino b/examples/lvgl/squarelinestudio_lvgl_v8/squarelinestudio_lvgl_v8.ino similarity index 84% rename from examples/lvgl/squarelinestudio_lvgl/squarelinestudio_lvgl.ino rename to examples/lvgl/squarelinestudio_lvgl_v8/squarelinestudio_lvgl_v8.ino index c90a704..2684ce9 100644 --- a/examples/lvgl/squarelinestudio_lvgl/squarelinestudio_lvgl.ino +++ b/examples/lvgl/squarelinestudio_lvgl_v8/squarelinestudio_lvgl_v8.ino @@ -8,7 +8,7 @@ * 1. Create a SquareLine Studio project with the following settings: * - Resolution: 800x480 * - Color depth: 16-bit - * - LVGL version: 8.3.x + * - LVGL version: 8.3.x (NOTE: It only supports LVGL version 8 and earlier.) * 2. Design your GUI using the drag-and-drop tool. * 3. Export the LVGL UI files. * 4. Open the exported file and copy the 'libraries/ui' folder into your 'Arduino/libraries' directory. @@ -29,6 +29,10 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Arduino_GigaDisplayTouch Touch; +#if (LVGL_VERSION_MAJOR >= 9) + #error "SquareLine Studio has ended its collaboration with LVGL. It only supports LVGL version 8 and earlier." +#endif + void setup() { Display.begin(); Touch.begin(); diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/library.properties b/examples/lvgl/squarelinestudio_lvgl_v8/ui/library.properties similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/library.properties rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/library.properties diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/CMakeLists.txt b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/CMakeLists.txt similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/CMakeLists.txt rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/CMakeLists.txt diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/components/ui_comp_hook.c b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/components/ui_comp_hook.c similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/components/ui_comp_hook.c rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/components/ui_comp_hook.c diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/filelist.txt b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/filelist.txt similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/filelist.txt rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/filelist.txt diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/readme.txt b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/readme.txt similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/readme.txt rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/readme.txt diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/screens/ui_Screen1.c b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/screens/ui_Screen1.c similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/screens/ui_Screen1.c rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/screens/ui_Screen1.c diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/ui.c b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui.c similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/ui.c rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui.c diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/ui.h b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui.h similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/ui.h rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui.h diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/ui_events.h b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui_events.h similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/ui_events.h rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui_events.h diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/ui_helpers.c b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui_helpers.c similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/ui_helpers.c rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui_helpers.c diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/src/ui_helpers.h b/examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui_helpers.h similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/src/ui_helpers.h rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/src/ui_helpers.h diff --git a/examples/lvgl/squarelinestudio_lvgl/ui/ui.h b/examples/lvgl/squarelinestudio_lvgl_v8/ui/ui.h similarity index 100% rename from examples/lvgl/squarelinestudio_lvgl/ui/ui.h rename to examples/lvgl/squarelinestudio_lvgl_v8/ui/ui.h From 45fc30c1a039b0cfc8da59646ec55714080a6080 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 13 May 2024 11:13:41 +0200 Subject: [PATCH 7/7] Release 1.0.2 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index d20783c..ccace4c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_GigaDisplay -version=1.0.1 +version=1.0.2 author=Arduino maintainer=Arduino sentence=Examples for GIGA Display Shield