mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 13:06:54 +03:00
cleanup.
This commit is contained in:
@@ -682,10 +682,10 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time)
|
|||||||
f2 = tflite->GetOutputValue(1);
|
f2 = tflite->GetOutputValue(1);
|
||||||
float result = fmod(atan2(f1, f2) / (M_PI * 2) + 2, 1);
|
float result = fmod(atan2(f1, f2) / (M_PI * 2) + 2, 1);
|
||||||
|
|
||||||
if(GENERAL[_ana]->ROI[i]->CCW)
|
if(GENERAL[_ana]->ROI[i]->CCW)
|
||||||
GENERAL[_ana]->ROI[i]->result_float = 10 - (result * 10);
|
GENERAL[_ana]->ROI[i]->result_float = 10 - (result * 10);
|
||||||
else
|
else
|
||||||
GENERAL[_ana]->ROI[i]->result_float = result * 10;
|
GENERAL[_ana]->ROI[i]->result_float = result * 10;
|
||||||
|
|
||||||
printf("Result General(Analog)%i - CCW: %d - %f\n", i, GENERAL[_ana]->ROI[i]->CCW, GENERAL[_ana]->ROI[i]->result_float);
|
printf("Result General(Analog)%i - CCW: %d - %f\n", i, GENERAL[_ana]->ROI[i]->CCW, GENERAL[_ana]->ROI[i]->result_float);
|
||||||
if (isLogImage)
|
if (isLogImage)
|
||||||
@@ -878,10 +878,10 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time)
|
|||||||
|
|
||||||
_num = tflite->GetOutClassification();
|
_num = tflite->GetOutClassification();
|
||||||
|
|
||||||
if(GENERAL[_ana]->ROI[i]->CCW)
|
if(GENERAL[_ana]->ROI[i]->CCW)
|
||||||
GENERAL[_ana]->ROI[i]->result_float = 10 - ((float)_num / 10.0);
|
GENERAL[_ana]->ROI[i]->result_float = 10 - ((float)_num / 10.0);
|
||||||
else
|
else
|
||||||
GENERAL[_ana]->ROI[i]->result_float = (float)_num / 10.0;
|
GENERAL[_ana]->ROI[i]->result_float = (float)_num / 10.0;
|
||||||
|
|
||||||
_result_save_file = GENERAL[_ana]->ROI[i]->result_float;
|
_result_save_file = GENERAL[_ana]->ROI[i]->result_float;
|
||||||
|
|
||||||
@@ -889,7 +889,6 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time)
|
|||||||
GENERAL[_ana]->ROI[i]->isReject = false;
|
GENERAL[_ana]->ROI[i]->isReject = false;
|
||||||
|
|
||||||
printf("Result General(Analog)%i - CCW: %d - %f\n", i, GENERAL[_ana]->ROI[i]->CCW, GENERAL[_ana]->ROI[i]->result_float);
|
printf("Result General(Analog)%i - CCW: %d - %f\n", i, GENERAL[_ana]->ROI[i]->CCW, GENERAL[_ana]->ROI[i]->result_float);
|
||||||
//printf("Result General(Analog)%i: %f\n", i, GENERAL[_ana]->ROI[i]->result_float);
|
|
||||||
|
|
||||||
if (isLogImage)
|
if (isLogImage)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ esp_err_t handler_cputemp(httpd_req_t *req)
|
|||||||
const char* resp_str;
|
const char* resp_str;
|
||||||
char cputemp[20];
|
char cputemp[20];
|
||||||
|
|
||||||
sprintf(resp_str, "CPU Temp: %4.1f°C", temperatureRead());
|
sprintf(cputemp, "CPU Temp: %4.1f°C", temperatureRead());
|
||||||
|
|
||||||
resp_str = cputemp;
|
resp_str = cputemp;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user