1. 固定 RTC 数字人链路使用 ai_chat_ui_eaf,双模式开启后不再回退 LVGL/GIF 旧 RTC UI。 2. 保留电子吧唧 LVGL/SquareLine UI,只在电子吧唧运行模式启动 LVGL,避免与 EAF 抢同一 LCD flush。 3. 拆分 dzbj_hw_display_init 与 dzbj_display_init,AI/配网只初始化 LCD Touch 硬件,电子吧唧再启动 LVGL UI。 4. 配网模式使用 EAF 最小显示栈显示中文提示,请使用APP 蓝牙配网,不加载数字人资源和动画。 5. 开启 CONFIG_BAJI_BADGE_MODE,形成 RTC 数字人对话与电子吧唧图片显示双模式固件。 6. 电子吧唧图片扫描跳过 Background_360x360.jpg,避免 RTC 数字人背景进入吧唧图片列表。 7. BLE 图传在 BLE 5.0 关闭时跳过 2M PHY API,保持 legacy 1M PHY 兼容配网和图传。 8. sdkconfig.defaults 同步 BLE 内存优化,限制连接数和缓存,保留 GATT 与扫描能力。 9. 移除 ota.cc 编译和 app_update 直接依赖,双模式固件不创建 OTA 检查任务。 10. Ota 接口改为禁用 stub,保留接口兼容但不执行升级和版本检查。 11. Board 上报 JSON 的 OTA label 改为 disabled,避免依赖 OTA 运行分区。 12. partitions.csv 改为 factory 单 app 分区,扩大 app 到 0x900000,并扩大 storage 到 0x6F0000。 13. application 去除 OTA 任务句柄和服务器时间依赖,减少运行时资源占用。 14. system_info 去除 esp_ota_ops 依赖,配合无 OTA 分区配置。 15. 同步最新烧录运行日志,记录本轮双模式与配网测试结果。
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
#ifndef _OTA_H
|
|
#define _OTA_H
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
#include <map>
|
|
#include <utility>
|
|
|
|
class Ota {
|
|
public:
|
|
Ota() = default;
|
|
~Ota() = default;
|
|
|
|
void SetCheckVersionUrl(std::string check_version_url) { check_version_url_ = std::move(check_version_url); }
|
|
void SetHeader(const std::string& key, const std::string& value) { headers_[key] = value; }
|
|
void SetPostData(const std::string& post_data) { post_data_ = post_data; }
|
|
bool CheckVersion() { return false; }
|
|
bool HasNewVersion() { return false; }
|
|
bool HasMqttConfig() { return false; }
|
|
bool HasActivationCode() { return false; }
|
|
bool HasServerTime() { return false; }
|
|
void StartUpgrade(std::function<void(int progress, size_t speed)> callback) {}
|
|
void MarkCurrentVersionValid() {}
|
|
|
|
const std::string& GetFirmwareVersion() const { return firmware_version_; }
|
|
const std::string& GetCurrentVersion() const { return current_version_; }
|
|
const std::string& GetActivationMessage() const { return activation_message_; }
|
|
const std::string& GetActivationCode() const { return activation_code_; }
|
|
|
|
private:
|
|
std::string check_version_url_;
|
|
std::string activation_message_;
|
|
std::string activation_code_;
|
|
bool has_new_version_ = false;
|
|
bool has_mqtt_config_ = false;
|
|
bool has_server_time_ = false;
|
|
bool has_activation_code_ = false;
|
|
std::string current_version_;
|
|
std::string firmware_version_;
|
|
std::string firmware_url_;
|
|
std::string post_data_;
|
|
std::map<std::string, std::string> headers_;
|
|
};
|
|
|
|
#endif // _OTA_H
|