diff --git a/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp b/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp index 4d4038b8..2cb8580a 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp @@ -65,7 +65,7 @@ bool ClassFlowAlignment::ReadParameter(FILE* pfile, string& aktparamgraph) std::vector splitted; int suchex = 40; int suchey = 40; - int alg_algo = 0; + int alg_algo = 0; //default=0; 1 =HIGHACCURACY; 2= FAST; 3= OFF //add disable aligment algo |01.2023 aktparamgraph = trim(aktparamgraph); @@ -130,6 +130,8 @@ bool ClassFlowAlignment::ReadParameter(FILE* pfile, string& aktparamgraph) alg_algo = 1; if (toUpper(splitted[1]) == "FAST") alg_algo = 2; + if (toUpper(splitted[1]) == "OFF") //no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023 + alg_algo = 3; } } @@ -145,7 +147,10 @@ bool ClassFlowAlignment::ReadParameter(FILE* pfile, string& aktparamgraph) #endif } - LoadReferenceAlignmentValues(); + //no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023 + if(References[0].alignment_algo != 3){ + LoadReferenceAlignmentValues(); + } return true; @@ -230,14 +235,22 @@ bool ClassFlowAlignment::doFlow(string time) AlignAndCutImage->SaveToFile(FormatFileName("/sdcard/img_tmp/rot.jpg")); } - if (!AlignAndCutImage->Align(&References[0], &References[1])) - { - SaveReferenceAlignmentValues(); - } + + //no align algo if set to 3 = off //add disable aligment algo |01.2023 + if(References[0].alignment_algo != 3){ + if (!AlignAndCutImage->Align(&References[0], &References[1])) + { + SaveReferenceAlignmentValues(); + } + }// no align + #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG if (AlgROI) { - DrawRef(ImageTMP); + //no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023 + if(References[0].alignment_algo != 3){ + DrawRef(ImageTMP); + } tfliteflow.DigitalDrawROI(ImageTMP); tfliteflow.AnalogDrawROI(ImageTMP); ImageTMP->writeToMemoryAsJPG((ImageData*)AlgROI, 90); @@ -261,7 +274,10 @@ bool ClassFlowAlignment::doFlow(string time) delete ImageTMP; ImageTMP = NULL; - LoadReferenceAlignmentValues(); + //no align algo if set to 3 = off => no draw ref //add disable aligment algo |01.2023 + if(References[0].alignment_algo != 3){ + LoadReferenceAlignmentValues(); + } return true; } diff --git a/sd-card/html/edit_config_param.html b/sd-card/html/edit_config_param.html index d78a6dd1..370f9d05 100644 --- a/sd-card/html/edit_config_param.html +++ b/sd-card/html/edit_config_param.html @@ -282,6 +282,7 @@ textarea { +