diff --git a/.github/workflows/check_lib_versions.yml b/.github/workflows/check_lib_versions.yml index 48a48994..ebf83aad 100644 --- a/.github/workflows/check_lib_versions.yml +++ b/.github/workflows/check_lib_versions.yml @@ -26,4 +26,4 @@ jobs: echo "prerelease: ${{ steps.last_release.outputs.prerelease }}" echo "url: ${{ steps.last_release.outputs.url }}" - name: Check & Compare versions - run: bash ./.github/scripts/check_lib_versions.sh --latest_version=${{ steps.last_release.outputs.tag_name }} + run: bash ./tools/check_lib_versions.sh --latest_version=${{ steps.last_release.outputs.tag_name }} diff --git a/.gitlab/tools/executable-list.txt b/.gitlab/tools/executable-list.txt deleted file mode 100644 index 22439eee..00000000 --- a/.gitlab/tools/executable-list.txt +++ /dev/null @@ -1,4 +0,0 @@ -.github/scripts/check_lib_versions.sh -.gitlab/tools/check_executables.py -.gitlab/tools/check_readme_links.py -.gitlab/tools/push_to_github.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 21178af8..fa34ef28 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -77,33 +77,33 @@ repos: hooks: - id: check-executables name: Check File Permissions - entry: .gitlab/tools/check_executables.py --action executables + entry: ./tools/check_executables.py --action executables language: python types: [executable] exclude: '\.pre-commit/.+' - id: check-executable-list name: Validate executable-list.txt - entry: .gitlab/tools/check_executables.py --action list + entry: ./tools/check_executables.py --action list language: python pass_filenames: false always_run: true - id: sync-conf-files name: Update when configuration files change - entry: python3 tools/sync_conf_files.py ./ ./ + entry: python3 ./tools/sync_conf_files.py ./ ./ language: system files: '.*esp_panel_(board_custom|board_supported|drivers)_conf\.h' - id: sync-template-files name: Update when template files change - entry: python3 tools/sync_conf_files.py ./template_files ./ + entry: python3 ./tools/sync_conf_files.py ./template_files ./ language: system files: '(.*esp_utils_conf\.h|.*lv_conf\.h|.*lvgl_v8_port\.cpp|.*lvgl_v8_port\.h)' - id: check-file-versions name: Update when versions change - entry: python3 tools/check_file_version.py ./ + entry: python3 ./tools/check_file_version.py ./ language: system files: '(.*esp_panel_(board_custom|board_supported|drivers)_conf\.h|library.properties|.*esp_panel_versions.h)' - id: check-library-versions name: Check library versions - entry: ./.github/scripts/check_lib_versions.sh + entry: ./tools/check_lib_versions.sh language: system files: '(idf_component.yml|library.properties)' diff --git a/CHANGELOG.md b/CHANGELOG.md index 490d02c2..b5511385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # ChangeLog +## v1.0.2 - 2025-03-24 + +### Bugfixes: + +* fix(io_expander): remove incompatible header (#175) +* fix(pre-commit): update the pre-commit script +* fix(docs): update README +* fix(conf): update comments of custom config file +* fix(examples): enable CPU 240M and task WDT default in esp_idf/lvgl_v8_port + ## v1.0.1 - 2025-03-13 ### Enhancements: diff --git a/README.md b/README.md index 5c6e8ada..8b6fb50f 100644 --- a/README.md +++ b/README.md @@ -115,9 +115,10 @@ The functional block diagram is shown below: * [How to select and configure supported boards in Arduino IDE?](./docs/envs/use_with_arduino.md#how-to-select-and-configure-supported-boards-in-arduino-ide) * [How to use SquareLine exported UI source files in Arduino IDE?](./docs/envs/use_with_arduino.md#how-to-use-squareline-exported-ui-source-files-in-arduino-ide) * [How to debug when the screen doesn't light up using the library in Arduino IDE?](./docs/envs/use_with_arduino.md#how-to-debug-when-the-screen-doesnt-light-up-using-the-library-in-arduino-ide) - * [How to reduce Flash usage and speed up compilation when using ESP32_Display_Panel in Arduino IDE?](./docs/envs/use_with_arduino.md#how-to-reduce-flash-usage-and-speed-up-compilation-when-using-esp32_display_panel-in-arduino-ide) - * [Can't see log messages or messages are incomplete in Arduino IDE's Serial Monitor, how to fix?](./docs/envs/use_with_arduino.md#can-t-see-log-messages-or-messages-are-incomplete-in-arduino-ides-serial-monitor-how-to-fix) + * [How to fix the issue that log messages are missing or incomplete in Arduino IDE's Serial Monitor?](./docs/envs/use_with_arduino.md#how-to-fix-the-issue-that-log-messages-are-missing-or-incomplete-in-arduino-ides-serial-monitor) * [Solution for screen drift issue when using ESP32-S3 to drive RGB LCD in Arduino IDE](./docs/envs/use_with_arduino.md#solution-for-screen-drift-issue-when-using-esp32-s3-to-drive-rgb-lcd-in-arduino-ide) + * [How to reduce Flash usage and speed up compilation when using ESP32_Display_Panel in Arduino IDE?](./docs/envs/use_with_arduino.md#how-to-reduce-flash-usage-and-speed-up-compilation-when-using-esp32_display_panel-in-arduino-ide) + * [How to avoid I2C re-initialization when using ESP32_Display_Panel in Arduino IDE (e.g., when using Wire library)?](./docs/envs/use_with_arduino.md#how-to-avoid-i2c-re-initialization-when-using-esp32_display_panel-in-arduino-ide-eg-when-using-wire-library) * [ESP-IDF](./docs/envs/use_with_idf.md#faq) diff --git a/README_CN.md b/README_CN.md index ae80d0e0..6a77b5b6 100644 --- a/README_CN.md +++ b/README_CN.md @@ -118,6 +118,7 @@ ESP32_Display_Panel 的主要特性如下: * [在 Arduino IDE 中打开串口调试器看不到日志信息或日志信息显示不全,如何解决?](./docs/envs/use_with_arduino_cn.md#在-arduino-ide-中打开串口调试器看不到日志信息或日志信息显示不全如何解决) * [在 Arduino IDE 中使用 ESP32-S3 驱动 RGB LCD 时出现画面漂移问题的解决方案](./docs/envs/use_with_arduino_cn.md#在-arduino-ide-中使用-esp32-s3-驱动-rgb-lcd-时出现画面漂移问题的解决方案) * [在 Arduino IDE 中使用 ESP32_Display_Panel 时,如何降低其 Flash 占用及加快编译速度?](./docs/envs/use_with_arduino_cn.md#在-arduino-ide-中使用-esp32_display_panel-时如何降低其-flash-占用及加快编译速度) + * [在 Arduino IDE 中使用 ESP32_Display_Panel 时,如何避免 I2C 重复初始化(如使用 Wire 库)?](./docs/envs/use_with_arduino_cn.md#在-arduino-ide-中使用-esp32_display_panel-时如何避免-i2c-重复初始化如使用-wire-库) * [ESP-IDF](./docs/envs/use_with_idf_cn.md#常见问题及解答) diff --git a/docs/envs/use_with_arduino.md b/docs/envs/use_with_arduino.md index 5f5a0a0a..c127a60e 100644 --- a/docs/envs/use_with_arduino.md +++ b/docs/envs/use_with_arduino.md @@ -31,8 +31,8 @@ - [How to install ESP32\_Display\_Panel in Arduino IDE?](#how-to-install-esp32_display_panel-in-arduino-ide) - [How to select and configure supported boards in Arduino IDE?](#how-to-select-and-configure-supported-boards-in-arduino-ide) - [How to use SquareLine exported UI source files in Arduino IDE?](#how-to-use-squareline-exported-ui-source-files-in-arduino-ide) - - [Screen not working in Arduino IDE, how to debug?](#screen-not-working-in-arduino-ide-how-to-debug) - - [Can't see log messages or messages are incomplete in Arduino IDE's Serial Monitor, how to fix?](#cant-see-log-messages-or-messages-are-incomplete-in-arduino-ides-serial-monitor-how-to-fix) + - [How to debug when the screen doesn't light up using the library in Arduino IDE?](#how-to-debug-when-the-screen-doesnt-light-up-using-the-library-in-arduino-ide) + - [How to fix the issue that log messages are missing or incomplete in Arduino IDE's Serial Monitor?](#how-to-fix-the-issue-that-log-messages-are-missing-or-incomplete-in-arduino-ides-serial-monitor) - [Solution for screen drift issue when using ESP32-S3 to drive RGB LCD in Arduino IDE](#solution-for-screen-drift-issue-when-using-esp32-s3-to-drive-rgb-lcd-in-arduino-ide) - [How to reduce Flash usage and speed up compilation when using ESP32\_Display\_Panel in Arduino IDE?](#how-to-reduce-flash-usage-and-speed-up-compilation-when-using-esp32_display_panel-in-arduino-ide) - [How to avoid I2C re-initialization when using ESP32\_Display\_Panel in Arduino IDE (e.g., when using Wire library)?](#how-to-avoid-i2c-re-initialization-when-using-esp32_display_panel-in-arduino-ide-eg-when-using-wire-library) @@ -506,7 +506,7 @@ Please refer to [Configuring Arduino IDE](#configuring-arduino-ide). Please refer to [Porting SquareLine Projects](#porting-squareline-projects). -### Screen not working in Arduino IDE, how to debug? +### How to debug when the screen doesn't light up using the library in Arduino IDE? Please follow these steps to troubleshoot: @@ -515,7 +515,7 @@ Please follow these steps to troubleshoot: 3. Check detailed log information through the serial monitor to analyze the problem. 4. If the problem still cannot be solved through the above steps, please submit an issue report on [GitHub Issues](https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues) with complete log information. -### Can't see log messages or messages are incomplete in Arduino IDE's Serial Monitor, how to fix? +### How to fix the issue that log messages are missing or incomplete in Arduino IDE's Serial Monitor? Please follow these steps to resolve: @@ -553,7 +553,7 @@ Please follow these steps to resolve: c. **Configure LVGL Task** - - If using LVGL, setting the task that executes `lv_timer_handler()` to run on the same core as the RGB LCD initialization task can help mitigate the screen drift issue + - If using LVGL, setting the task that executes `lv_timer_handler()` to run on the same core as the task that executes `board->begin()` can help mitigate the screen drift issue 3. **Example Code** diff --git a/docs/envs/use_with_arduino_cn.md b/docs/envs/use_with_arduino_cn.md index 3b905d4d..87f9bea0 100644 --- a/docs/envs/use_with_arduino_cn.md +++ b/docs/envs/use_with_arduino_cn.md @@ -553,7 +553,7 @@ arduino-esp32 v3.x 版本的 SDK 位于默认安装路径下的 `tools > esp32-a c. **配置 LVGL 任务** - - 如果使用 LVGL,设置执行 `lv_timer_handler()` 任务与执行 RGB LCD 初始化任务在同一个核心上运行可以缓解画面漂移问题 + - 如果使用 LVGL,设置执行 `lv_timer_handler()` 的任务与执行 `board->begin()` 的任务在同一个核心上运行可以缓解画面漂移问题 3. **示例代码** diff --git a/docs/envs/use_with_idf.md b/docs/envs/use_with_idf.md index 25537644..6bdf9d05 100644 --- a/docs/envs/use_with_idf.md +++ b/docs/envs/use_with_idf.md @@ -106,7 +106,7 @@ Please follow these steps to resolve: c. **Configure LVGL Task** - - If using LVGL, setting the task that executes `lv_timer_handler()` to run on the same core as the RGB LCD initialization task can help mitigate the screen drift issue + - If using LVGL, setting the task that executes `lv_timer_handler()` to run on the same core as the task that executes `board->begin()` can help mitigate the screen drift issue 3. **Example Code** diff --git a/docs/envs/use_with_idf_cn.md b/docs/envs/use_with_idf_cn.md index 44d0c3fa..ed927b5f 100644 --- a/docs/envs/use_with_idf_cn.md +++ b/docs/envs/use_with_idf_cn.md @@ -106,7 +106,7 @@ ESP32_Display_Panel 已上传到 [Espressif 组件库](https://components.espres c. **配置 LVGL 任务** - - 如果使用 LVGL,设置执行 `lv_timer_handler()` 任务与执行 RGB LCD 初始化任务在同一个核心上运行可以缓解画面漂移问题 + - 如果使用 LVGL,设置执行 `lv_timer_handler()` 的任务与执行 `board->begin()` 的任务在同一个核心上运行可以缓解画面漂移问题 3. **示例代码** diff --git a/esp_panel_board_custom_conf.h b/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/esp_panel_board_custom_conf.h +++ b/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h b/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h +++ b/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults b/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults index 1cd128bb..8f3d26ec 100644 --- a/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults +++ b/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults @@ -1,4 +1,3 @@ -CONFIG_ESP_TASK_WDT_EN=n CONFIG_FREERTOS_HZ=1000 CONFIG_COMPILER_CXX_EXCEPTIONS=y diff --git a/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults.esp32s3 b/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults.esp32s3 index 8770213f..4a53adb8 100644 --- a/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults.esp32s3 +++ b/examples/esp_idf/lvgl_v8_port/sdkconfig.defaults.esp32s3 @@ -1,3 +1,5 @@ +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y + CONFIG_COMPILER_OPTIMIZATION_PERF=y CONFIG_SPIRAM=y diff --git a/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h b/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h index 1b119178..1921269b 100644 --- a/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h +++ b/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h @@ -736,8 +736,8 @@ */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 -#endif // ESP_PANEL_BOARD_USE_CUSTOM +#endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM // *INDENT-ON* diff --git a/idf_component.yml b/idf_component.yml index 2b04706c..0fd8af5f 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.0.1" +version: "1.0.2" description: ESP32_Display_Panel is a display driver and GUI porting library designed by Espressif specifically for ESP series SoCs (ESP32, ESP32-S3, ESP32-P4, etc.) url: https://github.com/esp-arduino-libs/ESP32_Display_Panel repository: https://github.com/esp-arduino-libs/ESP32_Display_Panel.git diff --git a/library.properties b/library.properties index 2733fd27..8cb346a2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP32_Display_Panel -version=1.0.1 +version=1.0.2 author=espressif maintainer=espressif sentence=ESP32_Display_Panel is a display driver and GUI porting library designed by Espressif specifically for ESP series SoCs (ESP32, ESP32-S3, ESP32-P4, etc.) diff --git a/src/drivers/io_expander/esp_panel_io_expander_adapter.hpp b/src/drivers/io_expander/esp_panel_io_expander_adapter.hpp index 0c463cc8..521ffda8 100644 --- a/src/drivers/io_expander/esp_panel_io_expander_adapter.hpp +++ b/src/drivers/io_expander/esp_panel_io_expander_adapter.hpp @@ -5,7 +5,6 @@ */ #pragma once -#include #include "utils/esp_panel_utils_log.h" #include "utils/esp_panel_utils_cxx.hpp" #include "drivers/host/esp_panel_host_i2c.hpp" diff --git a/src/esp_panel_versions.h b/src/esp_panel_versions.h index fb172c5b..397b04bd 100644 --- a/src/esp_panel_versions.h +++ b/src/esp_panel_versions.h @@ -8,7 +8,7 @@ /* Library Version */ #define ESP_PANEL_VERSION_MAJOR 1 #define ESP_PANEL_VERSION_MINOR 0 -#define ESP_PANEL_VERSION_PATCH 1 +#define ESP_PANEL_VERSION_PATCH 2 /* File `esp_panel_drivers_conf.h` */ #define ESP_PANEL_DRIVERS_CONF_VERSION_MAJOR 1 @@ -18,7 +18,7 @@ /* File `esp_panel_board_custom_conf.h` */ #define ESP_PANEL_BOARD_CUSTOM_VERSION_MAJOR 1 #define ESP_PANEL_BOARD_CUSTOM_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 1 +#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 2 /* File `esp_panel_board_supported_conf.h` */ #define ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR 1 diff --git a/.gitlab/tools/check_executables.py b/tools/check_executables.py similarity index 96% rename from .gitlab/tools/check_executables.py rename to tools/check_executables.py index 64260f86..d959fa5f 100755 --- a/.gitlab/tools/check_executables.py +++ b/tools/check_executables.py @@ -25,7 +25,7 @@ def _strip_each_item(iterable: Iterable) -> List: COMPONENT_PATH = os.getenv('COMPONENT_PATH', os.getcwd()) -EXECUTABLE_LIST_FN = os.path.join(COMPONENT_PATH, '.gitlab/tools/executable-list.txt') +EXECUTABLE_LIST_FN = os.path.join(COMPONENT_PATH, 'tools/executable-list.txt') known_executables = _strip_each_item(open(EXECUTABLE_LIST_FN).readlines()) diff --git a/.github/scripts/check_lib_versions.sh b/tools/check_lib_versions.sh similarity index 100% rename from .github/scripts/check_lib_versions.sh rename to tools/check_lib_versions.sh diff --git a/tools/executable-list.txt b/tools/executable-list.txt new file mode 100644 index 00000000..120e11ce --- /dev/null +++ b/tools/executable-list.txt @@ -0,0 +1,7 @@ +.gitlab/tools/check_readme_links.py +.gitlab/tools/push_to_github.sh + +tools/check_executables.py +tools/check_file_version.py +tools/check_lib_versions.sh +tools/sync_conf_files.py diff --git a/.gitlab/tools/idf_ci_utils.py b/tools/idf_ci_utils.py similarity index 100% rename from .gitlab/tools/idf_ci_utils.py rename to tools/idf_ci_utils.py diff --git a/tools/sync_conf_files.py b/tools/sync_conf_files.py index e14c6090..46197479 100644 --- a/tools/sync_conf_files.py +++ b/tools/sync_conf_files.py @@ -10,8 +10,8 @@ './examples/platformio/lvgl_v8_port/src/lv_conf.h', ] exclude_dirs = [ - './build', - './examples/platformio/lvgl_v8_port/.pio', + r'.*build.*', + r'.*pio.*', ] @@ -25,13 +25,21 @@ def is_same_path(path1, path2): def is_in_directory(file_path, directory): - directory = os.path.realpath(directory) + import re file_path = os.path.realpath(file_path) - return file_path.startswith(directory) + # Check if the file path matches any of the exclude directory patterns + for pattern in exclude_dirs: + if re.search(pattern, file_path): + return True + return False def is_same_file(file1, file2): + # Check if both files exist + if not os.path.exists(file1) or not os.path.exists(file2): + return False + with open(file1, 'r') as f1, open(file2, 'r') as f2: file1_content = f1.read() file2_content = f2.read() @@ -53,7 +61,7 @@ def replace_files(template_directory, search_directory, file_path): filename = os.path.basename(file_path) src_file = os.path.join(template_directory, filename) - if is_exclude_file(file_path): + if is_exclude_file(file_path) or not os.path.exists(src_file): print(f"Skip '{file_path}'") return