forked from xiaozhi/xiaozhi-esp32
Enhance device activation and OTA update process
- Add support for device activation with audio feedback - Refactor OTA update flow to include activation code handling - Update asset management for localized sound resources - Improve error handling and device state management - Reorganize binary asset includes and CMake configuration
This commit is contained in:
@@ -20,7 +20,10 @@ BackgroundTask::~BackgroundTask() {
|
||||
void BackgroundTask::Schedule(std::function<void()> callback) {
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
if (active_tasks_ >= 30) {
|
||||
ESP_LOGW(TAG, "active_tasks_ == %u", active_tasks_.load());
|
||||
int free_sram = heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
|
||||
if (free_sram < 10000) {
|
||||
ESP_LOGW(TAG, "active_tasks_ == %u, free_sram == %u", active_tasks_.load(), free_sram);
|
||||
}
|
||||
}
|
||||
active_tasks_++;
|
||||
main_tasks_.emplace_back([this, cb = std::move(callback)]() {
|
||||
|
||||
Reference in New Issue
Block a user