Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): support compilation on non-Unix/Linux systems #10

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 5 additions & 2 deletions src/core/esp_brookesia_core_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#include <time.h>
#include "esp_brookesia_conf_internal.h"
#include "esp_brookesia_core_utils.h"
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/esp_brookesia_versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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` */
Expand Down
Loading