diff --git a/code/lib/jomjol_flowcontroll/ClassFlowAlignment.cpp b/code/lib/jomjol_flowcontroll/ClassFlowAlignment.cpp index 4b33a4f2..b695864e 100644 --- a/code/lib/jomjol_flowcontroll/ClassFlowAlignment.cpp +++ b/code/lib/jomjol_flowcontroll/ClassFlowAlignment.cpp @@ -74,7 +74,7 @@ bool ClassFlowAlignment::doFlow(string time) CRotate *rt; - if (this->initalrotate != 0) + if (initalrotate != 0) { rt = new CRotate(input); rt->Rotate(this->initalrotate); diff --git a/code/lib/jomjol_flowcontroll/ClassFlowPostProcessing.cpp b/code/lib/jomjol_flowcontroll/ClassFlowPostProcessing.cpp index 013ae700..26fe2bcf 100644 --- a/code/lib/jomjol_flowcontroll/ClassFlowPostProcessing.cpp +++ b/code/lib/jomjol_flowcontroll/ClassFlowPostProcessing.cpp @@ -271,13 +271,13 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) if ((!AllowNegativeRates) && (Value < PreValue)) { - error = "Negative Rate - Return old value - " + zwvalue; + error = "Negative Rate - Returned old value - read value: " + zwvalue; Value = PreValue; } - if (useMaxRateValue && ((Value - PreValue) > MaxRateValue)) + if (useMaxRateValue && (abs(Value - PreValue) > MaxRateValue)) { - error = "Negative Rate - Return old value - " + zwvalue; + error = "Rate too high - Returned old value - read value: " + zwvalue; Value = PreValue; } diff --git a/code/lib/jomjol_image_proc/CFindTemplate.cpp b/code/lib/jomjol_image_proc/CFindTemplate.cpp index 0ed42d0a..f6f2d470 100644 --- a/code/lib/jomjol_image_proc/CFindTemplate.cpp +++ b/code/lib/jomjol_image_proc/CFindTemplate.cpp @@ -2,6 +2,8 @@ #include "Helper.h" #include "ClassLogFile.h" +#include "esp_system.h" + #define _USE_MATH_DEFINES #include #include @@ -360,13 +362,13 @@ CImageBasis::CImageBasis() CImageBasis::CImageBasis(std::string _image) { - // printf("Start CImageBasis\n"); - this->channels = 3; - this->externalImage = false; - this->filename = _image; - // printf("CImageBasis before load\n"); - // printf(_image.c_str()); printf("\n"); - this->rgb_image = stbi_load(_image.c_str(), &(this->width), &(this->height), &(this->bpp), this->channels); + channels = 3; + externalImage = false; + filename = _image; + + rgb_image = stbi_load(_image.c_str(), &width, &height, &bpp, channels); + if (rgb_image == NULL) + LogFile.WriteToFile("Image Load failed:" + _image + " FreeHeapSize: " + to_string(esp_get_free_heap_size())); // printf("CImageBasis after load\n"); // printf("w %d, h %d, b %d, c %d", this->width, this->height, this->bpp, this->channels); } diff --git a/firmware/firmware.bin b/firmware/firmware.bin index 758496fb..70fda54c 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ