Update status.json message format: add severity

This commit is contained in:
Sebastien
2019-10-03 23:27:28 -04:00
parent aa81f39712
commit d2f17f5b05
6 changed files with 28 additions and 29 deletions

View File

@@ -218,31 +218,6 @@ err_t http_server_nvs_dump(struct netconn *conn, nvs_type_t nvs_type, bool * bFi
}
nvs_json = cJSON_CreateObject();
num_buffer = malloc(NUM_BUFFER_LEN);
//
//
// cJSON_AddItemToObject(ip_info_cjson, "version", cJSON_CreateString(desc->version));
// cJSON_AddNumberToObject(ip_info_cjson,"recovery", RECOVERY_APPLICATION );
// cJSON_AddNumberToObject(ip_info_cjson, "urc", update_reason_code);
// if(config){
// cJSON_AddItemToObject(ip_info_cjson, "ssid", cJSON_CreateString((char *)config->sta.ssid));
//
// if(update_reason_code == UPDATE_CONNECTION_OK){
// /* rest of the information is copied after the ssid */
// tcpip_adapter_ip_info_t ip_info;
// ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
// cJSON_AddItemToObject(ip_info_cjson, "ip", cJSON_CreateString(ip4addr_ntoa(&ip_info.ip)));
// cJSON_AddItemToObject(ip_info_cjson, "netmask", cJSON_CreateString(ip4addr_ntoa(&ip_info.netmask)));
// cJSON_AddItemToObject(ip_info_cjson, "gw", cJSON_CreateString(ip4addr_ntoa(&ip_info.gw)));
// }
// }
//
//
// cJSON_AddItemToObject(ip_info_cjson, "ota_dsc", cJSON_CreateString(ota_get_status()));
// cJSON_AddNumberToObject(ip_info_cjson,"ota_pct", ota_get_pct_complete() );
//
// cJSON_AddItemToObject(ip_info_cjson, "Jack", cJSON_CreateString(JACK_LEVEL));
//
//
nvs_iterator_t it = nvs_entry_find(NVS_PARTITION_NAME, NULL, nvs_type);
if (it == NULL) {