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:
Terrence
2025-02-16 06:59:19 +08:00
parent 14a89cae33
commit 3a71c1e895
39 changed files with 220 additions and 86 deletions

View File

@@ -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)]() {