From 23a8d114fb5d08d32136f3c4ab26006ed3117e40 Mon Sep 17 00:00:00 2001 From: Liu Zhongwei Date: Wed, 25 Sep 2024 15:01:27 +0800 Subject: [PATCH] feat(core): support compilation on non-Unix/Linux systems --- CHANGELOG.md | 6 ++++++ idf_component.yml | 2 +- library.properties | 2 +- src/core/esp_brookesia_core_utils.c | 7 +++++-- src/esp_brookesia_versions.h | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 699e354..217e145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # ChangeLog +## v0.3.1 - 2024-09-25 + +### Enhancements: + +* feat(core): support compilation on non-Unix/Linux systems + ## v0.3.0 - 2024-09-23 ### Enhancements: diff --git a/idf_component.yml b/idf_component.yml index 70ce4a8..71a09b7 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,4 +1,4 @@ -version: 0.3.0 +version: 0.3.1 description: ESP-Brookesia is a human-machine interaction development framework designed for AIoT devices. url: https://github.com/espressif/esp-brookesia issues: https://github.com/espressif/esp-brookesia/issues diff --git a/library.properties b/library.properties index 2d031e8..8ed606b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=esp-brookesia -version=0.3.0 +version=0.3.1 author=espressif maintainer=espressif sentence=ESP-Brookesia is a human-machine interaction development framework designed for AIoT devices. diff --git a/src/core/esp_brookesia_core_utils.c b/src/core/esp_brookesia_core_utils.c index ef512a8..ef399be 100644 --- a/src/core/esp_brookesia_core_utils.c +++ b/src/core/esp_brookesia_core_utils.c @@ -5,7 +5,6 @@ */ #include #include -#include #include #include "esp_brookesia_conf_internal.h" #include "esp_brookesia_core_utils.h" @@ -39,7 +38,11 @@ bool esp_brookesia_core_utils_get_internal_font_by_size(uint8_t size_px, const l uint8_t temp_size = size_px; size_px = (size_px << 2) >> 2; - size_px = MIN(MAX(size_px, ESP_BROOKESIA_STYLE_FONT_SIZE_MIN), ESP_BROOKESIA_STYLE_FONT_SIZE_MAX); + if (size_px < ESP_BROOKESIA_STYLE_FONT_SIZE_MIN) { + size_px = ESP_BROOKESIA_STYLE_FONT_SIZE_MIN; + } else if (size_px > ESP_BROOKESIA_STYLE_FONT_SIZE_MAX) { + size_px = ESP_BROOKESIA_STYLE_FONT_SIZE_MAX; + } if (temp_size != size_px) { ESP_BROOKESIA_LOGW("Font size(%d) not support, use the nearest size(%d)", temp_size, size_px); } diff --git a/src/esp_brookesia_versions.h b/src/esp_brookesia_versions.h index 9ba1762..e3c6c0d 100644 --- a/src/esp_brookesia_versions.h +++ b/src/esp_brookesia_versions.h @@ -11,7 +11,7 @@ #if !defined(ESP_BROOKESIA_VER_MAJOR) && !defined(ESP_BROOKESIA_VER_MINOR) && !defined(ESP_BROOKESIA_VER_PATCH) #define ESP_BROOKESIA_VER_MAJOR 0 #define ESP_BROOKESIA_VER_MINOR 3 -#define ESP_BROOKESIA_VER_PATCH 0 +#define ESP_BROOKESIA_VER_PATCH 1 #endif /* File `esp_brookesia_conf.h` */