forked from xiaozhi/xiaozhi-esp32
更新Wi-Fi组件版本,从OTA接口读取Websocket服务器
This commit is contained in:
@@ -13,13 +13,13 @@ public:
|
||||
Ota();
|
||||
~Ota();
|
||||
|
||||
void SetCheckVersionUrl(std::string check_version_url);
|
||||
void SetHeader(const std::string& key, const std::string& value);
|
||||
bool CheckVersion();
|
||||
esp_err_t Activate();
|
||||
bool HasActivationChallenge() { return has_activation_challenge_; }
|
||||
bool HasNewVersion() { return has_new_version_; }
|
||||
bool HasMqttConfig() { return has_mqtt_config_; }
|
||||
bool HasWebsocketConfig() { return has_websocket_config_; }
|
||||
bool HasActivationCode() { return has_activation_code_; }
|
||||
bool HasServerTime() { return has_server_time_; }
|
||||
void StartUpgrade(std::function<void(int progress, size_t speed)> callback);
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
const std::string& GetCurrentVersion() const { return current_version_; }
|
||||
const std::string& GetActivationMessage() const { return activation_message_; }
|
||||
const std::string& GetActivationCode() const { return activation_code_; }
|
||||
const std::string& GetCheckVersionUrl() const { return check_version_url_; }
|
||||
|
||||
private:
|
||||
std::string check_version_url_;
|
||||
@@ -36,6 +37,7 @@ private:
|
||||
std::string activation_code_;
|
||||
bool has_new_version_ = false;
|
||||
bool has_mqtt_config_ = false;
|
||||
bool has_websocket_config_ = false;
|
||||
bool has_server_time_ = false;
|
||||
bool has_activation_code_ = false;
|
||||
bool has_serial_number_ = false;
|
||||
|
||||
Reference in New Issue
Block a user