Add SD Card Info to info.html

This commit is contained in:
Slider0007
2022-10-22 13:11:11 +02:00
parent 485363d7a2
commit e1f8ac59cb
6 changed files with 391 additions and 4 deletions

View File

@@ -15,6 +15,8 @@
#include "server_tflite.h"
#include "helper.h"
//#define DEBUG_DETAIL_ON
@@ -134,6 +136,71 @@ esp_err_t info_get_handler(httpd_req_t *req)
return ESP_OK;
}
if (_task.compare("SDCardPartitionSize") == 0)
{
std::string zw;
zw = getSDCardPartitionSize();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
if (_task.compare("SDCardFreeParitionSpace") == 0)
{
std::string zw;
zw = getSDCardFreeParitionSpace();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
if (_task.compare("SDCardPartitionSectorSize") == 0)
{
std::string zw;
zw = getSDCardParitionAllocationSize();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
if (_task.compare("SDCardManufacturer") == 0)
{
std::string zw;
zw = getSDCardManufacturer();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
if (_task.compare("SDCardName") == 0)
{
std::string zw;
zw = getSDCardName();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
if (_task.compare("SDCardCapacity") == 0)
{
std::string zw;
zw = getSDCardCapacity();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
if (_task.compare("SDCardSectorSize") == 0)
{
std::string zw;
zw = getSDCardSectorSize();
httpd_resp_sendstr_chunk(req, zw.c_str());
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
return ESP_OK;
}