forked from xiaozhi/xiaozhi-esp32
v1.7.7: 支持 EC801E 模组,增加 xmini-c3-v3, xmini-c3-4g (#930)
This commit is contained in:
@@ -53,7 +53,8 @@ Http* Ota::SetupHttp() {
|
||||
auto& board = Board::GetInstance();
|
||||
auto app_desc = esp_app_get_description();
|
||||
|
||||
auto http = board.CreateHttp();
|
||||
auto network = board.GetNetwork();
|
||||
auto http = network->CreateHttp(0);
|
||||
http->SetHeader("Activation-Version", has_serial_number_ ? "2" : "1");
|
||||
http->SetHeader("Device-Id", SystemInfo::GetMacAddress().c_str());
|
||||
http->SetHeader("Client-Id", board.GetUuid());
|
||||
@@ -272,7 +273,8 @@ void Ota::Upgrade(const std::string& firmware_url) {
|
||||
bool image_header_checked = false;
|
||||
std::string image_header;
|
||||
|
||||
auto http = std::unique_ptr<Http>(Board::GetInstance().CreateHttp());
|
||||
auto network = Board::GetInstance().GetNetwork();
|
||||
auto http = std::unique_ptr<Http>(network->CreateHttp(0));
|
||||
if (!http->Open("GET", firmware_url)) {
|
||||
ESP_LOGE(TAG, "Failed to open HTTP connection");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user