Add MCP server

This commit is contained in:
Terrence
2025-05-22 19:19:36 +08:00
parent f142c5469c
commit 5da66773d5
23 changed files with 845 additions and 41 deletions

View File

@@ -415,7 +415,9 @@ std::string Ota::GetActivationPayload() {
cJSON_AddStringToObject(payload, "serial_number", serial_number_.c_str());
cJSON_AddStringToObject(payload, "challenge", activation_challenge_.c_str());
cJSON_AddStringToObject(payload, "hmac", hmac_hex.c_str());
std::string json = cJSON_Print(payload);
auto json_str = cJSON_PrintUnformatted(payload);
std::string json(json_str);
cJSON_free(json_str);
cJSON_Delete(payload);
ESP_LOGI(TAG, "Activation payload: %s", json.c_str());