Switch to 2.0 branch (#1152)

* Adapt boards to v2 partition tables

* fix esp log error

* fix display style

* reset emotion after download assets

* fix compiling

* update assets default url

* Add user only tools

* Add image cache

* smaller cache and buffer, more heap

* use MAIN_EVENT_CLOCK_TICK to avoid audio glitches

* bump to 2.0.0

* fix compiling errors

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
This commit is contained in:
Xiaoxia
2025-09-04 15:41:28 +08:00
committed by GitHub
parent 3a3dfc003e
commit 83f6f8c703
196 changed files with 3918 additions and 4902 deletions

View File

@@ -29,7 +29,7 @@ watcher 中一些额外的配置项如下需要在menuconfig 中选择.
```
CONFIG_BOARD_TYPE_SENSECAP_WATCHER=y
CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions/v1/32m.csv"
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions/v2/32m.csv"
CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y
CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n
CONFIG_IDF_EXPERIMENTAL_FEATURES=y

View File

@@ -29,7 +29,7 @@ There are some additional configuration options for the watcher. Please select t
```
CONFIG_BOARD_TYPE_SENSECAP_WATCHER=y
CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions/v1/32m.csv"
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions/v2/32m.csv"
CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y
CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n
CONFIG_IDF_EXPERIMENTAL_FEATURES=y

View File

@@ -5,7 +5,7 @@
"name": "sensecap-watcher",
"sdkconfig_append": [
"CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y",
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/32m.csv\"",
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v2/32m.csv\"",
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
"CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n",
"CONFIG_IDF_EXPERIMENTAL_FEATURES=y",

View File

@@ -5,7 +5,7 @@
"name": "sensecap-watcher-en",
"sdkconfig_append": [
"CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y",
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/32m.csv\"",
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v2/32m.csv\"",
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
"CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n",
"CONFIG_IDF_EXPERIMENTAL_FEATURES=y",

View File

@@ -33,7 +33,7 @@
#define TAG "sensecap_watcher"
LV_FONT_DECLARE(font_puhui_30_4);
LV_FONT_DECLARE(font_puhui_basic_30_4);
LV_FONT_DECLARE(font_awesome_20_4);
class CustomLcdDisplay : public SpiLcdDisplay {
@@ -48,14 +48,10 @@ class CustomLcdDisplay : public SpiLcdDisplay {
bool mirror_y,
bool swap_xy)
: SpiLcdDisplay(io_handle, panel_handle, width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy,
{
.text_font = &font_puhui_30_4,
.icon_font = &font_awesome_20_4,
.emoji_font = font_emoji_64_init(),
}) {
{&font_puhui_basic_30_4, &font_awesome_20_4}) {
DisplayLockGuard lock(this);
lv_obj_set_size(status_bar_, LV_HOR_RES, fonts_.text_font->line_height * 2 + 10);
lv_obj_set_size(status_bar_, LV_HOR_RES, style_.text_font->line_height * 2 + 10);
lv_obj_set_style_layout(status_bar_, LV_LAYOUT_NONE, 0);
lv_obj_set_style_pad_top(status_bar_, 10, 0);
lv_obj_set_style_pad_bottom(status_bar_, 1, 0);
@@ -63,9 +59,9 @@ class CustomLcdDisplay : public SpiLcdDisplay {
// 针对圆形屏幕调整位置
// network battery mute //
// status //
lv_obj_align(battery_label_, LV_ALIGN_TOP_MID, -2.5*fonts_.icon_font->line_height, 0);
lv_obj_align(network_label_, LV_ALIGN_TOP_MID, -0.5*fonts_.icon_font->line_height, 0);
lv_obj_align(mute_label_, LV_ALIGN_TOP_MID, 1.5*fonts_.icon_font->line_height, 0);
lv_obj_align(battery_label_, LV_ALIGN_TOP_MID, -2.5 * style_.icon_font->line_height, 0);
lv_obj_align(network_label_, LV_ALIGN_TOP_MID, -0.5 * style_.icon_font->line_height, 0);
lv_obj_align(mute_label_, LV_ALIGN_TOP_MID, 1.5 * style_.icon_font->line_height, 0);
lv_obj_align(status_label_, LV_ALIGN_BOTTOM_MID, 0, 0);
lv_obj_set_flex_grow(status_label_, 0);
@@ -537,6 +533,11 @@ public:
InitializeCamera();
}
virtual Assets* GetAssets() override {
static Assets assets(ASSETS_XIAOZHI_PUHUI_COMMON_30_4_EMOJI_64);
return &assets;
}
virtual AudioCodec* GetAudioCodec() override {
static SensecapAudioCodec audio_codec(
i2c_bus_,