diff --git a/Changelog.md b/Changelog.md index 9952c6b8..c663f63b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,7 +6,9 @@ ##### 7.1.2 MQTT-Update - (2021-06-17) -* NEW: 7.1.2: bug fix setting hostname, Flash-LED not off during rebootNEW: 7.1.1: bug fix wlan password with "=" (again) +* NEW: 7.1.2: bug fix setting hostname, Flash-LED not off during reboot + +* NEW: 7.1.1: bug fix wlan password with "=" (again) * MQTT error message: changes "no error", send retain flag diff --git a/README.md b/README.md index 3223490a..057d0aee 100644 --- a/README.md +++ b/README.md @@ -47,20 +47,12 @@ In other cases you can contact the developer via email: Runde die Zahl + { + if ((ergebnis_nachkomma <= 2) || (ergebnis_nachkomma >= 8)) // Band um die Ziffer --> Runden, da Ziffer im Rahmen Ungenauigkeit erreicht + return (int) round(zahl); + else + return (int) trunc(zahl); + } + + if (zahl_vorgaenger > 9.2) // Ziffernwechsel beginnt + { + if (eval_vorgaenger == 0) // Wechsel hat schon stattgefunden + { + return (int) round(zahl); // Annahme, dass die neue Zahl schon in der Nähe des Ziels ist + } + else + { + if (zahl_vorgaenger <= 9.5) // Wechsel startet gerade, aber beginnt erst + { + if ((ergebnis_nachkomma <= 2) || (ergebnis_nachkomma >= 8)) // Band um die Ziffer --> Runden, da Ziffer im Rahmen Ungenauigkeit erreicht + return (int) round(zahl); + else + return (int) trunc(zahl); + } + else + { + return (int) trunc(zahl); // Wechsel schon weiter fortgeschritten, d.h. über 2 als Nachkomma + } + } + } + + if ((ergebnis_nachkomma <= 2) || (ergebnis_nachkomma >= 8)) // Band um die Ziffer --> Runden, da Ziffer im Rahmen Ungenauigkeit erreicht + return (int) round(zahl); + + return (int) trunc(zahl); +} + int ClassFlowCNNGeneral::ZeigerEval(float zahl, int ziffer_vorgaenger) { int ergebnis_nachkomma = ((int) floor(zahl * 10)) % 10; @@ -407,6 +455,8 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time) printf(zwcnn.c_str());printf("\n"); if (!tflite->LoadModel(zwcnn)) { printf("Can't read model file /sdcard%s\n", cnnmodelfile.c_str()); + LogFile.WriteToFile("Cannot load model"); + delete tflite; return false; } @@ -488,12 +538,19 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time) _num = tflite->GetOutClassification(0, 10); _nachkomma = tflite->GetOutClassification(11, 22); + + string _zwres = "Nach Invoke - Nummer: " + to_string(_num) + " Nachkomma: " + to_string(_nachkomma); + if (debugdetailgeneral) LogFile.WriteToFile(_zwres); + if ((_num == 10) || (_nachkomma == 10)) // NaN detektiert GENERAL[_ana]->ROI[i]->result = -1; else - GENERAL[_ana]->ROI[i]->result = fmod(_num + (_nachkomma-5)/10 + 10, 10); + GENERAL[_ana]->ROI[i]->result = fmod((double) _num + (((double)_nachkomma)-5)/10 + (double) 10, 10); printf("Result General(DigitalHyprid)%i: %f\n", i, GENERAL[_ana]->ROI[i]->result); + _zwres = "Result General(DigitalHyprid)" + to_string(i) + ": " + to_string(GENERAL[_ana]->ROI[i]->result); + if (debugdetailgeneral) LogFile.WriteToFile(_zwres); + if (isLogImage) LogImage(logPath, GENERAL[_ana]->ROI[i]->name, &GENERAL[_ana]->ROI[i]->result, NULL, time, GENERAL[_ana]->ROI[i]->image_org); } break; diff --git a/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.h b/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.h index 573f1253..2b2c7ac7 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.h +++ b/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.h @@ -40,6 +40,8 @@ protected: bool extendedResolution; int ZeigerEval(float zahl, int ziffer_vorgaenger); + int ZeigerEvalHybrid(float zahl, float zahl_vorgaenger, int eval_vorgaenger); + bool doNeuralNetwork(string time); bool doAlignAndCut(string time); @@ -64,7 +66,7 @@ public: general* FindGENERAL(string _name_number); string getNameGENERAL(int _analog); - bool isExtendedResolution(int _number); + bool isExtendedResolution(int _number = 0); void UpdateNameNumbers(std::vector *_name_numbers); diff --git a/code/components/jomjol_flowcontroll/ClassFlowImage.cpp b/code/components/jomjol_flowcontroll/ClassFlowImage.cpp index 4348688d..1473fe6c 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowImage.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowImage.cpp @@ -48,9 +48,14 @@ void ClassFlowImage::LogImage(string logPath, string name, float *resultFloat, i if (!isLogImage) return; + char buf[10]; + if (resultFloat != NULL) { - sprintf(buf, "%.1f_", *resultFloat); + if (*resultFloat < 0) + sprintf(buf, "N.N_"); + else + sprintf(buf, "%.1f_", *resultFloat); } else if (resultInt != NULL) { sprintf(buf, "%d_", *resultInt); } else { diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp index 0e1fa97e..b20ef9fc 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp @@ -559,6 +559,10 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) if (flowAnalog) NUMBERS[j]->AnzahlAnalog = flowAnalog->AnzahlROIs(j); if (flowDigit) NUMBERS[j]->AnzahlDigital = flowDigit->AnzahlROIs(j); + + if (flowDigit->isExtendedResolution()) + NUMBERS[j]->DecimalShift = NUMBERS[j]->DecimalShiftInitial - 1; + NUMBERS[j]->Nachkomma = NUMBERS[j]->AnzahlAnalog - NUMBERS[j]->DecimalShift; diff --git a/code/components/jomjol_tfliteclass/CTfLiteClass.cpp b/code/components/jomjol_tfliteclass/CTfLiteClass.cpp index f136895b..f6957e06 100644 --- a/code/components/jomjol_tfliteclass/CTfLiteClass.cpp +++ b/code/components/jomjol_tfliteclass/CTfLiteClass.cpp @@ -194,6 +194,8 @@ void CTfLiteClass::MakeAllocate() TfLiteStatus allocate_status = this->interpreter->AllocateTensors(); if (allocate_status != kTfLiteOk) { TF_LITE_REPORT_ERROR(error_reporter, "AllocateTensors() failed"); + LogFile.WriteToFile("AllocateTensors() failed"); + this->GetInputDimension(); return; } diff --git a/code/main/version.cpp b/code/main/version.cpp index efdabf75..13581333 100644 --- a/code/main/version.cpp +++ b/code/main/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="af99de3"; +const char* GIT_REV="dd995ec"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2021-09-10 07:03"; \ No newline at end of file +const char* BUILD_TIME="2021-09-12 07:26"; \ No newline at end of file diff --git a/code/main/version.h b/code/main/version.h index 551c53f8..eb5e597a 100644 --- a/code/main/version.h +++ b/code/main/version.h @@ -13,7 +13,7 @@ extern "C" #include "Helper.h" #include -const char* GIT_BASE_BRANCH = "master - v8.2.0 - 2021-08-24"; +const char* GIT_BASE_BRANCH = "master - v8.3.0 - 2021-09-12"; const char* git_base_branch(void) diff --git a/code/version.cpp b/code/version.cpp index efdabf75..13581333 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="af99de3"; +const char* GIT_REV="dd995ec"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2021-09-10 07:03"; \ No newline at end of file +const char* BUILD_TIME="2021-09-12 07:26"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index ef053309..f603934f 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/dig1210s2q.tflite b/firmware/dig1210s2q.tflite deleted file mode 100644 index 0f531fff..00000000 Binary files a/firmware/dig1210s2q.tflite and /dev/null differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index 95aeee7f..c18e4b03 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ diff --git a/firmware/html.zip b/firmware/html.zip index a842f27a..ae06f6dc 100644 Binary files a/firmware/html.zip and b/firmware/html.zip differ diff --git a/sd-card/html/edit_digits.html b/sd-card/html/edit_digits.html index 5c4db40e..e01b4a9e 100644 --- a/sd-card/html/edit_digits.html +++ b/sd-card/html/edit_digits.html @@ -468,6 +468,13 @@ function draw() { context.strokeRect(x0, y0, dx, dy); context.lineWidth = 1; context.strokeRect(x0+dx*0.2, y0+dy*0.2, dx*0.6, dy*0.6); + + context.lineWidth = 2; + context.beginPath(); + context.moveTo(x0, y0+dy/2); + context.lineTo(x0+dx, y0+dy/2); + context.stroke(); + ROIInfo[aktindex]["x"] = rect.startX; ROIInfo[aktindex]["y"] = rect.startY; ROIInfo[aktindex]["dx"] = rect.w; diff --git a/sd-card/html/gethost.js b/sd-card/html/gethost.js index b65fb48a..26a5520d 100644 --- a/sd-card/html/gethost.js +++ b/sd-card/html/gethost.js @@ -9,7 +9,7 @@ function getbasepath(){ { // host = "http://192.168.2.219"; // jomjol interner test // host = "http://192.168.178.46"; // jomjol interner test - host = "http://192.168.178.64"; // jomjol interner Real + host = "http://192.168.178.22"; // jomjol interner Real // host = "http://192.168.43.191"; // host = "."; // jomjol interner localhost diff --git a/sd-card/html/readconfigparam.js b/sd-card/html/readconfigparam.js index 3bdbf86a..47717a20 100644 --- a/sd-card/html/readconfigparam.js +++ b/sd-card/html/readconfigparam.js @@ -53,6 +53,7 @@ function ParseConfig() { ParamAddValue(param, catname, "LogImageLocation"); ParamAddValue(param, catname, "LogfileRetentionInDays"); ParamAddValue(param, catname, "ModelInputSize", 2); + ParamAddValue(param, catname, "ExtendedResolution"); var catname = "Analog"; category[catname] = new Object(); diff --git a/sd-card/img_tmp/leer.txt b/sd-card/img_tmp/leer.txt deleted file mode 100644 index e69de29b..00000000