fix(control-plane): trigger PTT on short press
This commit is contained in:
@@ -170,16 +170,7 @@ static void control_plane_dispatch_key_event(const control_plane_key_event_t *ev
|
||||
|
||||
switch (event->type) {
|
||||
case CONTROL_PLANE_KEY_EVENT_PRESSED: {
|
||||
#if CONFIG_TQ_PTT_MODE_CLICK_TO_TALK
|
||||
control_plane_multimodal_runtime_state_t state = {0};
|
||||
if (control_plane_multimodal_get_runtime_state(&state) == ESP_OK &&
|
||||
state.remote_responding) {
|
||||
esp_err_t err = control_plane_multimodal_send_request_to_speak();
|
||||
if (err != ESP_OK && err != ESP_ERR_INVALID_STATE) {
|
||||
ESP_LOGW(TAG, "PTT barge-in request failed: %s", esp_err_to_name(err));
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if !CONFIG_TQ_PTT_MODE_CLICK_TO_TALK
|
||||
control_plane_set_ptt_active(true);
|
||||
#endif
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user