mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 04:56:53 +03:00
Change data to csv, harmonize REST API editflow
This commit is contained in:
@@ -979,20 +979,20 @@ string ClassFlowCNNGeneral::getReadoutRawString(int _analog)
|
||||
{
|
||||
if (CNNType == Analogue || CNNType == Analogue100)
|
||||
{
|
||||
rt = rt + "\t" + RundeOutput(GENERAL[_analog]->ROI[i]->result_float, 1);
|
||||
rt = rt + "," + RundeOutput(GENERAL[_analog]->ROI[i]->result_float, 1);
|
||||
}
|
||||
|
||||
if (CNNType == Digital)
|
||||
{
|
||||
if (GENERAL[_analog]->ROI[i]->result_klasse == 10)
|
||||
rt = rt + "\tN";
|
||||
rt = rt + ",N";
|
||||
else
|
||||
rt = rt + "\t" + RundeOutput(GENERAL[_analog]->ROI[i]->result_klasse, 0);
|
||||
rt = rt + "," + RundeOutput(GENERAL[_analog]->ROI[i]->result_klasse, 0);
|
||||
}
|
||||
|
||||
if ((CNNType == DoubleHyprid10) || (CNNType == Digital100))
|
||||
{
|
||||
rt = rt + "\t" + RundeOutput(GENERAL[_analog]->ROI[i]->result_float, 1);
|
||||
rt = rt + "," + RundeOutput(GENERAL[_analog]->ROI[i]->result_float, 1);
|
||||
}
|
||||
}
|
||||
return rt;
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
|
||||
static const char *TAG = "log";
|
||||
|
||||
ClassLogFile LogFile("/sdcard/log/message", "log_%Y-%m-%d.txt", "/sdcard/log/data", "data_%Y-%m-%d.txt");
|
||||
ClassLogFile LogFile("/sdcard/log/message", "log_%Y-%m-%d.txt", "/sdcard/log/data", "data_%Y-%m-%d.csv");
|
||||
|
||||
void ClassLogFile::WriteHeapInfo(std::string _id)
|
||||
{
|
||||
@@ -90,19 +90,19 @@ void ClassLogFile::WriteToData(std::string _timestamp, std::string _name, std::s
|
||||
|
||||
if (pFile!=NULL) {
|
||||
fputs(_timestamp.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_name.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_ReturnRawValue.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_ReturnValue.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_ReturnPreValue.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_ReturnRateValue.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_ReturnChangeAbsolute.c_str(), pFile);
|
||||
fputs("\t", pFile);
|
||||
fputs(",", pFile);
|
||||
fputs(_ErrorMessageText.c_str(), pFile);
|
||||
fputs(_digital.c_str(), pFile);
|
||||
fputs(_analog.c_str(), pFile);
|
||||
|
||||
@@ -28,7 +28,6 @@ public:
|
||||
void CreateLogDirectories();
|
||||
void RemoveOld();
|
||||
|
||||
// void WriteToData(std::string _ReturnRawValue, std::string _ReturnValue, std::string _ReturnPreValue, std::string _ErrorMessageText, std::string _digital, std::string _analog);
|
||||
void WriteToData(std::string _timestamp, std::string _name, std::string _ReturnRawValue, std::string _ReturnValue, std::string _ReturnPreValue, std::string _ReturnRateValue, std::string _ReturnChangeAbsolute, std::string _ErrorMessageText, std::string _digital, std::string _analog);
|
||||
|
||||
|
||||
|
||||
@@ -859,7 +859,7 @@ void register_server_tflite_uri(httpd_handle_t server)
|
||||
camuri.user_ctx = (void*) "Light Off";
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
camuri.uri = "/editflow.html";
|
||||
camuri.uri = "/editflow";
|
||||
camuri.handler = handler_editflow;
|
||||
camuri.user_ctx = (void*) "EditFlow";
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
Reference in New Issue
Block a user