删除LVGL,屏幕驱动测试完成
This commit is contained in:
@@ -100,10 +100,21 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void)
|
||||
if (lcd_ready) {
|
||||
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
||||
"lcd_render_loop",
|
||||
"deferred_to_runtime_worker_task");
|
||||
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_BOOT_EXPRESSION,
|
||||
"boot_expression",
|
||||
"deferred_until_runtime_worker_started");
|
||||
"control_plane_start_lcd_render_worker");
|
||||
esp_err_t lcd_worker_err = control_plane_start_lcd_render_worker();
|
||||
app_composition_log_stage_result(APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
||||
"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 {
|
||||
app_composition_log_stage_skipped(APP_COMPOSITION_BOOT_STAGE_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_init_lcd_device(void);
|
||||
esp_err_t control_plane_start_lcd_render_worker(void);
|
||||
void control_plane_start_lcd_render_loop(void);
|
||||
esp_err_t control_plane_request_boot_expression(void);
|
||||
/**
|
||||
|
||||
@@ -1469,6 +1469,34 @@ static void control_plane_daily_fortune_task(void *arg)
|
||||
}
|
||||
#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)
|
||||
{
|
||||
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 (control_plane_get_task_handle(&s_lcd_render_loop_task) == NULL) {
|
||||
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) {
|
||||
control_plane_stop_runtime_workers();
|
||||
return task_err;
|
||||
}
|
||||
esp_err_t lcd_worker_err = control_plane_start_lcd_render_worker();
|
||||
if (lcd_worker_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
return lcd_worker_err;
|
||||
}
|
||||
#else
|
||||
ESP_LOGI(TAG, "LCD render loop disabled by configuration");
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
idf_component_register(
|
||||
SRCS
|
||||
set(platform_srcs
|
||||
"src/runtime/platform_core_runtime.c"
|
||||
"src/runtime/platform_storage.c"
|
||||
"src/runtime/platform_time.c"
|
||||
@@ -9,19 +8,17 @@ idf_component_register(
|
||||
"src/runtime/platform_behavior_runtime.c"
|
||||
"src/runtime/platform_multimodal_runtime.c"
|
||||
"src/runtime/platform_lcd_runtime.c"
|
||||
"src/lcd_face.c"
|
||||
"src/platform_stepper_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/transport_ws.c"
|
||||
"src/wifi_portal_bridge.cpp"
|
||||
"src/platform_behavior_stubs.c"
|
||||
INCLUDE_DIRS
|
||||
"include"
|
||||
PRIV_INCLUDE_DIRS
|
||||
"internal"
|
||||
PRIV_REQUIRES
|
||||
)
|
||||
|
||||
set(platform_priv_requires
|
||||
78__esp-wifi-connect
|
||||
cxx
|
||||
driver
|
||||
@@ -45,56 +42,57 @@ idf_component_register(
|
||||
json
|
||||
littlefs
|
||||
log
|
||||
lvgl
|
||||
espressif__mdns
|
||||
mbedtls
|
||||
nvs_flash
|
||||
)
|
||||
|
||||
set(platform_lvgl_animation_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/lvgl_animations")
|
||||
set(platform_audio_prompt_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/audio_prompts")
|
||||
set(platform_lvgl_animation_image_dir "${CMAKE_CURRENT_BINARY_DIR}/lvgl_animations_image")
|
||||
set(platform_lvgl_animation_stage_stamp "${CMAKE_CURRENT_BINARY_DIR}/lvgl_animations_image.stamp")
|
||||
file(GLOB_RECURSE platform_lvgl_animation_bin_files CONFIGURE_DEPENDS
|
||||
"${platform_lvgl_animation_src_dir}/*.bin"
|
||||
idf_component_register(
|
||||
SRCS
|
||||
${platform_srcs}
|
||||
INCLUDE_DIRS
|
||||
"include"
|
||||
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
|
||||
"${platform_audio_prompt_src_dir}/*.opus"
|
||||
)
|
||||
|
||||
set(platform_lvgl_animation_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()
|
||||
set(platform_asset_stage_commands)
|
||||
foreach(audio_file IN LISTS platform_audio_prompt_files)
|
||||
file(RELATIVE_PATH audio_rel_path "${platform_audio_prompt_src_dir}" "${audio_file}")
|
||||
list(APPEND platform_lvgl_animation_stage_commands
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}/audio_prompts"
|
||||
list(APPEND platform_asset_stage_commands
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_asset_image_dir}/audio_prompts"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${audio_file}"
|
||||
"${platform_lvgl_animation_image_dir}/audio_prompts/${audio_rel_path}"
|
||||
"${platform_asset_image_dir}/audio_prompts/${audio_rel_path}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${platform_lvgl_animation_stage_stamp}"
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${platform_lvgl_animation_image_dir}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}"
|
||||
${platform_lvgl_animation_stage_commands}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${platform_lvgl_animation_stage_stamp}"
|
||||
DEPENDS ${platform_lvgl_animation_bin_files} ${platform_audio_prompt_files}
|
||||
OUTPUT "${platform_asset_stage_stamp}"
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${platform_asset_image_dir}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_asset_image_dir}"
|
||||
${platform_asset_stage_commands}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${platform_asset_stage_stamp}"
|
||||
DEPENDS ${platform_audio_prompt_files}
|
||||
)
|
||||
|
||||
littlefs_create_partition_image(
|
||||
gifpack
|
||||
"${platform_lvgl_animation_image_dir}"
|
||||
"${platform_asset_image_dir}"
|
||||
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