This commit is contained in:
Anthony
2022-08-28 02:11:08 -04:00
parent 8cd5a89d6a
commit cfaeaa370a
3 changed files with 11 additions and 12 deletions

View File

@@ -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)
{ {

View File

@@ -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.