diff --git a/main/application.cc b/main/application.cc index 63d6b4f3..94e397f8 100644 --- a/main/application.cc +++ b/main/application.cc @@ -353,7 +353,7 @@ void Application::Start() { Application* app = (Application*)arg; app->MainLoop(); vTaskDelete(NULL); - }, "main_loop", 4096 * 2, this, 2, nullptr); + }, "main_loop", 4096 * 2, this, 3, nullptr); /* Wait for the network to be ready */ board.StartNetwork(); @@ -468,7 +468,7 @@ void Application::Start() { Application* app = (Application*)arg; app->CheckNewVersion(); vTaskDelete(NULL); - }, "check_new_version", 4096 * 2, this, 1, nullptr); + }, "check_new_version", 4096 * 2, this, 2, nullptr); #if CONFIG_USE_AUDIO_PROCESSOR audio_processor_.Initialize(codec->input_channels(), codec->input_reference()); diff --git a/main/audio_processing/audio_processor.cc b/main/audio_processing/audio_processor.cc index 6f72bdc4..b53c00b8 100644 --- a/main/audio_processing/audio_processor.cc +++ b/main/audio_processing/audio_processor.cc @@ -53,7 +53,7 @@ void AudioProcessor::Initialize(int channels, bool reference) { auto this_ = (AudioProcessor*)arg; this_->AudioProcessorTask(); vTaskDelete(NULL); - }, "audio_communication", 4096 * 2, this, 1, NULL); + }, "audio_communication", 4096 * 2, this, 2, NULL); } AudioProcessor::~AudioProcessor() { diff --git a/main/audio_processing/wake_word_detect.cc b/main/audio_processing/wake_word_detect.cc index c24ecb80..c986c265 100644 --- a/main/audio_processing/wake_word_detect.cc +++ b/main/audio_processing/wake_word_detect.cc @@ -88,7 +88,7 @@ void WakeWordDetect::Initialize(int channels, bool reference) { auto this_ = (WakeWordDetect*)arg; this_->AudioDetectionTask(); vTaskDelete(NULL); - }, "audio_detection", 4096 * 2, this, 1, nullptr); + }, "audio_detection", 4096 * 2, this, 2, nullptr); } void WakeWordDetect::OnWakeWordDetected(std::function callback) { @@ -202,7 +202,7 @@ void WakeWordDetect::EncodeWakeWordData() { this_->wake_word_cv_.notify_all(); } vTaskDelete(NULL); - }, "encode_detect_packets", 4096 * 8, this, 1, wake_word_encode_task_stack_, &wake_word_encode_task_buffer_); + }, "encode_detect_packets", 4096 * 8, this, 2, wake_word_encode_task_stack_, &wake_word_encode_task_buffer_); } bool WakeWordDetect::GetWakeWordOpus(std::vector& opus) { diff --git a/main/background_task.cc b/main/background_task.cc index 6d526f96..750d46cc 100644 --- a/main/background_task.cc +++ b/main/background_task.cc @@ -1,6 +1,7 @@ #include "background_task.h" #include +#include #define TAG "BackgroundTask" @@ -8,7 +9,7 @@ BackgroundTask::BackgroundTask(uint32_t stack_size) { xTaskCreate([](void* arg) { BackgroundTask* task = (BackgroundTask*)arg; task->BackgroundTaskLoop(); - }, "background_task", stack_size, this, 1, &background_task_handle_); + }, "background_task", stack_size, this, 2, &background_task_handle_); } BackgroundTask::~BackgroundTask() { diff --git a/main/display/ssd1306_display.cc b/main/display/ssd1306_display.cc index ec1bcd95..13c77882 100644 --- a/main/display/ssd1306_display.cc +++ b/main/display/ssd1306_display.cc @@ -20,6 +20,7 @@ Ssd1306Display::Ssd1306Display(void* i2c_master_handle, int width, int height, b ESP_LOGI(TAG, "Initialize LVGL"); lvgl_port_cfg_t port_cfg = ESP_LVGL_PORT_INIT_CONFIG(); + port_cfg.task_priority = 1; lvgl_port_init(&port_cfg); // SSD1306 config