基本对话完成
This commit is contained in:
@@ -28,7 +28,7 @@ typedef enum {
|
|||||||
APP_COMPOSITION_BOOT_STAGE_POWER_HOLD = 1,
|
APP_COMPOSITION_BOOT_STAGE_POWER_HOLD = 1,
|
||||||
APP_COMPOSITION_BOOT_STAGE_AUDIO_INIT,
|
APP_COMPOSITION_BOOT_STAGE_AUDIO_INIT,
|
||||||
APP_COMPOSITION_BOOT_STAGE_BOOT_SOUND,
|
APP_COMPOSITION_BOOT_STAGE_BOOT_SOUND,
|
||||||
APP_COMPOSITION_BOOT_STAGE_AUDIO_RELEASE,
|
APP_COMPOSITION_BOOT_STAGE_AUDIO_READY,
|
||||||
APP_COMPOSITION_BOOT_STAGE_LCD_DEVICE,
|
APP_COMPOSITION_BOOT_STAGE_LCD_DEVICE,
|
||||||
APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
|
||||||
APP_COMPOSITION_BOOT_STAGE_PLATFORM_DOMAIN,
|
APP_COMPOSITION_BOOT_STAGE_PLATFORM_DOMAIN,
|
||||||
@@ -83,9 +83,9 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void)
|
|||||||
"Boot sound unavailable, continue boot: %s",
|
"Boot sound unavailable, continue boot: %s",
|
||||||
esp_err_to_name(boot_sound_err));
|
esp_err_to_name(boot_sound_err));
|
||||||
}
|
}
|
||||||
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_AUDIO_RELEASE,
|
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_AUDIO_READY,
|
||||||
"audio_release",
|
"audio_ready",
|
||||||
"boot_sound_policy_end");
|
"boot_sound_policy_end_keep_runtime");
|
||||||
|
|
||||||
#if CONFIG_TQ_SCREEN_ENABLE
|
#if CONFIG_TQ_SCREEN_ENABLE
|
||||||
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_LCD_DEVICE,
|
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_LCD_DEVICE,
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ static bool s_multimodal_autostart_stop_requested;
|
|||||||
static bool s_multimodal_watchdog_task_starting;
|
static bool s_multimodal_watchdog_task_starting;
|
||||||
static bool s_multimodal_autostart_task_starting;
|
static bool s_multimodal_autostart_task_starting;
|
||||||
static bool s_model_command_dispatched;
|
static bool s_model_command_dispatched;
|
||||||
|
static bool s_server_success_prompt_played;
|
||||||
static control_plane_model_command_callback_t s_model_command_cb;
|
static control_plane_model_command_callback_t s_model_command_cb;
|
||||||
static void *s_model_command_cb_user_data;
|
static void *s_model_command_cb_user_data;
|
||||||
static portMUX_TYPE s_multimodal_runtime_lock = portMUX_INITIALIZER_UNLOCKED;
|
static portMUX_TYPE s_multimodal_runtime_lock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
@@ -587,12 +588,22 @@ static void control_plane_multimodal_event_bridge(control_plane_multimodal_event
|
|||||||
(void)user_data;
|
(void)user_data;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_CONNECTED:
|
case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_CONNECTED: {
|
||||||
|
bool should_play_prompt = false;
|
||||||
|
portENTER_CRITICAL(&s_multimodal_runtime_lock);
|
||||||
|
if (!s_server_success_prompt_played) {
|
||||||
|
s_server_success_prompt_played = true;
|
||||||
|
should_play_prompt = true;
|
||||||
|
}
|
||||||
|
portEXIT_CRITICAL(&s_multimodal_runtime_lock);
|
||||||
|
if (should_play_prompt) {
|
||||||
(void)domain_runtime_behavior_play_prompt_file(CONTROL_PLANE_SERVER_SUCCESS_PROMPT_FILE);
|
(void)domain_runtime_behavior_play_prompt_file(CONTROL_PLANE_SERVER_SUCCESS_PROMPT_FILE);
|
||||||
|
}
|
||||||
if (CONTROL_PLANE_MULTIMODAL_AUTO_START_FLAG) {
|
if (CONTROL_PLANE_MULTIMODAL_AUTO_START_FLAG) {
|
||||||
schedule_autostart_if_enabled();
|
schedule_autostart_if_enabled();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_DISCONNECTED:
|
case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_DISCONNECTED:
|
||||||
control_plane_multimodal_stop_uplink();
|
control_plane_multimodal_stop_uplink();
|
||||||
|
|||||||
@@ -1515,7 +1515,6 @@ void control_plane_multimodal_stop(void)
|
|||||||
if (transport_stop_err != ESP_OK) {
|
if (transport_stop_err != ESP_OK) {
|
||||||
ESP_LOGW(TAG, "Multimodal transport stop ended with %s", esp_err_to_name(transport_stop_err));
|
ESP_LOGW(TAG, "Multimodal transport stop ended with %s", esp_err_to_name(transport_stop_err));
|
||||||
}
|
}
|
||||||
domain_runtime_multimodal_audio_deinit();
|
|
||||||
control_plane_multimodal_auth_clear();
|
control_plane_multimodal_auth_clear();
|
||||||
|
|
||||||
if (lock_state()) {
|
if (lock_state()) {
|
||||||
|
|||||||
@@ -114,12 +114,6 @@ static esp_err_t control_plane_connect_sta_with_feedback(int timeout_ms,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domain_runtime_multimodal_audio_is_initialized() &&
|
|
||||||
!domain_runtime_multimodal_audio_is_uplink_running()) {
|
|
||||||
domain_runtime_multimodal_audio_deinit();
|
|
||||||
ESP_LOGI(TAG, "Released multimodal audio before STA connect attempt %d", attempt);
|
|
||||||
}
|
|
||||||
|
|
||||||
err = domain_runtime_wifi_portal_connect_sta(attempt_timeout_ms);
|
err = domain_runtime_wifi_portal_connect_sta(attempt_timeout_ms);
|
||||||
if (err == ESP_OK) {
|
if (err == ESP_OK) {
|
||||||
break;
|
break;
|
||||||
@@ -250,8 +244,7 @@ esp_err_t control_plane_play_boot_sound(int timeout_ms)
|
|||||||
ESP_LOGW(TAG, "Boot sound playback failed: %s", esp_err_to_name(play_err));
|
ESP_LOGW(TAG, "Boot sound playback failed: %s", esp_err_to_name(play_err));
|
||||||
}
|
}
|
||||||
|
|
||||||
domain_runtime_multimodal_audio_deinit();
|
ESP_LOGI(TAG, "Boot sound audio resources kept for runtime");
|
||||||
ESP_LOGI(TAG, "Boot sound audio resources released");
|
|
||||||
return play_err;
|
return play_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user