删除LVGL,屏幕驱动测试完成
This commit is contained in:
@@ -69,7 +69,7 @@ Additional enforcement rules:
|
|||||||
- New expression semantics must be declared as `domain_expression_*` contracts in `components/domain/include/domain.h` and mapped in the domain runtime adapter catalog.
|
- New expression semantics must be declared as `domain_expression_*` contracts in `components/domain/include/domain.h` and mapped in the domain runtime adapter catalog.
|
||||||
- Upper layers must request expressions through `domain_runtime_request_expression()`; they must not call `platform_lcd_*` playback APIs directly.
|
- Upper layers must request expressions through `domain_runtime_request_expression()`; they must not call `platform_lcd_*` playback APIs directly.
|
||||||
- Platform LCD code must expose playback primitives only and must not reference `DOMAIN_EXPRESSION_*` semantic IDs.
|
- Platform LCD code must expose playback primitives only and must not reference `DOMAIN_EXPRESSION_*` semantic IDs.
|
||||||
- Asset-backed expressions should place `.bin` frames under `components/platform/assets/lvgl_animations/<asset_dir>/`; custom playback order belongs in the domain catalog, not in duplicated asset files or control-plane logic.
|
- Asset-backed expressions should use the platform-owned direct LCD asset path documented in `docs/lcd-expressions.md`; custom playback order belongs in the domain catalog, not in duplicated asset files or control-plane logic.
|
||||||
- Do not add one-off expression APIs for each emotion/state unless an ADR explicitly justifies a new contract family.
|
- Do not add one-off expression APIs for each emotion/state unless an ADR explicitly justifies a new contract family.
|
||||||
|
|
||||||
## Concurrency and Callback Safety
|
## Concurrency and Callback Safety
|
||||||
|
|||||||
@@ -100,10 +100,21 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void)
|
|||||||
if (lcd_ready) {
|
if (lcd_ready) {
|
||||||
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
||||||
"lcd_render_loop",
|
"lcd_render_loop",
|
||||||
"deferred_to_runtime_worker_task");
|
"control_plane_start_lcd_render_worker");
|
||||||
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_BOOT_EXPRESSION,
|
esp_err_t lcd_worker_err = control_plane_start_lcd_render_worker();
|
||||||
"boot_expression",
|
app_composition_log_stage_result(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
||||||
"deferred_until_runtime_worker_started");
|
"lcd_render_loop",
|
||||||
|
lcd_worker_err);
|
||||||
|
if (lcd_worker_err != ESP_OK) {
|
||||||
|
lcd_ready = false;
|
||||||
|
app_composition_log_stage_skipped(APP_COMPOSITION_BOOT_STAGE_BOOT_EXPRESSION,
|
||||||
|
"boot_expression",
|
||||||
|
"lcd_render_worker_unavailable");
|
||||||
|
} else {
|
||||||
|
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_BOOT_EXPRESSION,
|
||||||
|
"boot_expression",
|
||||||
|
"deferred_until_runtime_worker_started");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
app_composition_log_stage_skipped(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
app_composition_log_stage_skipped(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
||||||
"lcd_render_loop",
|
"lcd_render_loop",
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ void control_plane_stop_event_observer_runtime(void);
|
|||||||
esp_err_t control_plane_fortune_refresh_now(void);
|
esp_err_t control_plane_fortune_refresh_now(void);
|
||||||
|
|
||||||
esp_err_t control_plane_init_lcd_device(void);
|
esp_err_t control_plane_init_lcd_device(void);
|
||||||
|
esp_err_t control_plane_start_lcd_render_worker(void);
|
||||||
void control_plane_start_lcd_render_loop(void);
|
void control_plane_start_lcd_render_loop(void);
|
||||||
esp_err_t control_plane_request_boot_expression(void);
|
esp_err_t control_plane_request_boot_expression(void);
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1469,6 +1469,34 @@ static void control_plane_daily_fortune_task(void *arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
esp_err_t control_plane_start_lcd_render_worker(void)
|
||||||
|
{
|
||||||
|
#if CONFIG_TQ_SCREEN_ENABLE
|
||||||
|
control_plane_set_runtime_stop_requested(false);
|
||||||
|
|
||||||
|
if (control_plane_get_task_handle(&s_lcd_render_loop_task) != NULL) {
|
||||||
|
ESP_LOGI(TAG, "LCD render worker already running");
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
esp_err_t task_err = control_plane_create_task(control_plane_lcd_render_loop_task,
|
||||||
|
"cp_lcd_render",
|
||||||
|
CONTROL_PLANE_LCD_RENDER_LOOP_TASK_STACK_SIZE,
|
||||||
|
4,
|
||||||
|
CONTROL_PLANE_LOCAL_TASK_CORE,
|
||||||
|
&s_lcd_render_loop_task);
|
||||||
|
if (task_err != ESP_OK) {
|
||||||
|
return task_err;
|
||||||
|
}
|
||||||
|
|
||||||
|
ESP_LOGI(TAG, "LCD render worker started");
|
||||||
|
return ESP_OK;
|
||||||
|
#else
|
||||||
|
ESP_LOGI(TAG, "LCD render worker disabled by configuration");
|
||||||
|
return ESP_ERR_NOT_SUPPORTED;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
esp_err_t control_plane_start_runtime_workers(void)
|
esp_err_t control_plane_start_runtime_workers(void)
|
||||||
{
|
{
|
||||||
control_plane_set_runtime_stop_requested(false);
|
control_plane_set_runtime_stop_requested(false);
|
||||||
@@ -1513,17 +1541,10 @@ esp_err_t control_plane_start_runtime_workers(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_TQ_SCREEN_ENABLE
|
#if CONFIG_TQ_SCREEN_ENABLE
|
||||||
if (control_plane_get_task_handle(&s_lcd_render_loop_task) == NULL) {
|
esp_err_t lcd_worker_err = control_plane_start_lcd_render_worker();
|
||||||
esp_err_t task_err = control_plane_create_task(control_plane_lcd_render_loop_task,
|
if (lcd_worker_err != ESP_OK) {
|
||||||
"cp_lcd_render",
|
control_plane_stop_runtime_workers();
|
||||||
CONTROL_PLANE_LCD_RENDER_LOOP_TASK_STACK_SIZE,
|
return lcd_worker_err;
|
||||||
4,
|
|
||||||
CONTROL_PLANE_LOCAL_TASK_CORE,
|
|
||||||
&s_lcd_render_loop_task);
|
|
||||||
if (task_err != ESP_OK) {
|
|
||||||
control_plane_stop_runtime_workers();
|
|
||||||
return task_err;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
ESP_LOGI(TAG, "LCD render loop disabled by configuration");
|
ESP_LOGI(TAG, "LCD render loop disabled by configuration");
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
idf_component_register(
|
set(platform_srcs
|
||||||
SRCS
|
|
||||||
"src/runtime/platform_core_runtime.c"
|
"src/runtime/platform_core_runtime.c"
|
||||||
"src/runtime/platform_storage.c"
|
"src/runtime/platform_storage.c"
|
||||||
"src/runtime/platform_time.c"
|
"src/runtime/platform_time.c"
|
||||||
@@ -9,19 +8,17 @@ idf_component_register(
|
|||||||
"src/runtime/platform_behavior_runtime.c"
|
"src/runtime/platform_behavior_runtime.c"
|
||||||
"src/runtime/platform_multimodal_runtime.c"
|
"src/runtime/platform_multimodal_runtime.c"
|
||||||
"src/runtime/platform_lcd_runtime.c"
|
"src/runtime/platform_lcd_runtime.c"
|
||||||
"src/lcd_face.c"
|
|
||||||
"src/platform_stepper_driver.c"
|
"src/platform_stepper_driver.c"
|
||||||
"src/platform_digital_input_driver.c"
|
"src/platform_digital_input_driver.c"
|
||||||
"src/lcd.c"
|
"src/lcd_direct.c"
|
||||||
|
"src/lcd_direct_assets.c"
|
||||||
"src/multimodal/audio_pipeline.c"
|
"src/multimodal/audio_pipeline.c"
|
||||||
"src/multimodal/transport_ws.c"
|
"src/multimodal/transport_ws.c"
|
||||||
"src/wifi_portal_bridge.cpp"
|
"src/wifi_portal_bridge.cpp"
|
||||||
"src/platform_behavior_stubs.c"
|
"src/platform_behavior_stubs.c"
|
||||||
INCLUDE_DIRS
|
)
|
||||||
"include"
|
|
||||||
PRIV_INCLUDE_DIRS
|
set(platform_priv_requires
|
||||||
"internal"
|
|
||||||
PRIV_REQUIRES
|
|
||||||
78__esp-wifi-connect
|
78__esp-wifi-connect
|
||||||
cxx
|
cxx
|
||||||
driver
|
driver
|
||||||
@@ -45,56 +42,57 @@ idf_component_register(
|
|||||||
json
|
json
|
||||||
littlefs
|
littlefs
|
||||||
log
|
log
|
||||||
lvgl
|
|
||||||
espressif__mdns
|
espressif__mdns
|
||||||
mbedtls
|
mbedtls
|
||||||
nvs_flash
|
nvs_flash
|
||||||
)
|
)
|
||||||
|
|
||||||
set(platform_lvgl_animation_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/lvgl_animations")
|
idf_component_register(
|
||||||
set(platform_audio_prompt_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/audio_prompts")
|
SRCS
|
||||||
set(platform_lvgl_animation_image_dir "${CMAKE_CURRENT_BINARY_DIR}/lvgl_animations_image")
|
${platform_srcs}
|
||||||
set(platform_lvgl_animation_stage_stamp "${CMAKE_CURRENT_BINARY_DIR}/lvgl_animations_image.stamp")
|
INCLUDE_DIRS
|
||||||
file(GLOB_RECURSE platform_lvgl_animation_bin_files CONFIGURE_DEPENDS
|
"include"
|
||||||
"${platform_lvgl_animation_src_dir}/*.bin"
|
PRIV_INCLUDE_DIRS
|
||||||
|
"internal"
|
||||||
|
PRIV_REQUIRES
|
||||||
|
${platform_priv_requires}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_add_binary_data(${COMPONENT_LIB}
|
||||||
|
"assets/lcd/buyunqian1.rle"
|
||||||
|
BINARY
|
||||||
|
)
|
||||||
|
|
||||||
|
set(platform_audio_prompt_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/audio_prompts")
|
||||||
|
set(platform_asset_image_dir "${CMAKE_CURRENT_BINARY_DIR}/asset_image")
|
||||||
|
set(platform_asset_stage_stamp "${CMAKE_CURRENT_BINARY_DIR}/asset_image.stamp")
|
||||||
file(GLOB_RECURSE platform_audio_prompt_files CONFIGURE_DEPENDS
|
file(GLOB_RECURSE platform_audio_prompt_files CONFIGURE_DEPENDS
|
||||||
"${platform_audio_prompt_src_dir}/*.opus"
|
"${platform_audio_prompt_src_dir}/*.opus"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(platform_lvgl_animation_stage_commands)
|
set(platform_asset_stage_commands)
|
||||||
foreach(animation_file IN LISTS platform_lvgl_animation_bin_files)
|
|
||||||
file(RELATIVE_PATH animation_rel_path "${platform_lvgl_animation_src_dir}" "${animation_file}")
|
|
||||||
get_filename_component(animation_rel_dir "${animation_rel_path}" DIRECTORY)
|
|
||||||
list(APPEND platform_lvgl_animation_stage_commands
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}/${animation_rel_dir}"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
"${animation_file}"
|
|
||||||
"${platform_lvgl_animation_image_dir}/${animation_rel_path}"
|
|
||||||
)
|
|
||||||
endforeach()
|
|
||||||
foreach(audio_file IN LISTS platform_audio_prompt_files)
|
foreach(audio_file IN LISTS platform_audio_prompt_files)
|
||||||
file(RELATIVE_PATH audio_rel_path "${platform_audio_prompt_src_dir}" "${audio_file}")
|
file(RELATIVE_PATH audio_rel_path "${platform_audio_prompt_src_dir}" "${audio_file}")
|
||||||
list(APPEND platform_lvgl_animation_stage_commands
|
list(APPEND platform_asset_stage_commands
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}/audio_prompts"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_asset_image_dir}/audio_prompts"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
"${audio_file}"
|
"${audio_file}"
|
||||||
"${platform_lvgl_animation_image_dir}/audio_prompts/${audio_rel_path}"
|
"${platform_asset_image_dir}/audio_prompts/${audio_rel_path}"
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${platform_lvgl_animation_stage_stamp}"
|
OUTPUT "${platform_asset_stage_stamp}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${platform_lvgl_animation_image_dir}"
|
COMMAND ${CMAKE_COMMAND} -E rm -rf "${platform_asset_image_dir}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_asset_image_dir}"
|
||||||
${platform_lvgl_animation_stage_commands}
|
${platform_asset_stage_commands}
|
||||||
COMMAND ${CMAKE_COMMAND} -E touch "${platform_lvgl_animation_stage_stamp}"
|
COMMAND ${CMAKE_COMMAND} -E touch "${platform_asset_stage_stamp}"
|
||||||
DEPENDS ${platform_lvgl_animation_bin_files} ${platform_audio_prompt_files}
|
DEPENDS ${platform_audio_prompt_files}
|
||||||
)
|
)
|
||||||
|
|
||||||
littlefs_create_partition_image(
|
littlefs_create_partition_image(
|
||||||
gifpack
|
gifpack
|
||||||
"${platform_lvgl_animation_image_dir}"
|
"${platform_asset_image_dir}"
|
||||||
FLASH_IN_PROJECT
|
FLASH_IN_PROJECT
|
||||||
DEPENDS "${platform_lvgl_animation_stage_stamp}"
|
DEPENDS "${platform_asset_stage_stamp}"
|
||||||
)
|
)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user