|
@@ -689,16 +689,16 @@ esp_err_t GpioHandler::handleHttpRequest(httpd_req_t *req)
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- std::string response = "{\\"profile\\":\\"";
|
|
|
|
|
|
|
+ std::string response = "{\"profile\":\"";
|
|
|
response += profile->name;
|
|
response += profile->name;
|
|
|
- response += "\\",\\"maxChannels\\":";
|
|
|
|
|
|
|
+ response += "\",\"maxChannels\":";
|
|
|
response += std::to_string(profile->maxUserChannels);
|
|
response += std::to_string(profile->maxUserChannels);
|
|
|
- response += ",\\"pins\\":[";
|
|
|
|
|
|
|
+ response += ",\"pins\":[";
|
|
|
for (size_t i = 0; i < profile->userPinCount; ++i) {
|
|
for (size_t i = 0; i < profile->userPinCount; ++i) {
|
|
|
if (i > 0U) response += ",";
|
|
if (i > 0U) response += ",";
|
|
|
- response += "{\\"gpio\\":";
|
|
|
|
|
|
|
+ response += "{\"gpio\":";
|
|
|
response += std::to_string(static_cast<int>(profile->userPins[i].gpio));
|
|
response += std::to_string(static_cast<int>(profile->userPins[i].gpio));
|
|
|
- response += ",\\"capabilities\\":";
|
|
|
|
|
|
|
+ response += ",\"capabilities\":";
|
|
|
response += std::to_string(profile->userPins[i].capabilities);
|
|
response += std::to_string(profile->userPins[i].capabilities);
|
|
|
response += "}";
|
|
response += "}";
|
|
|
}
|
|
}
|