diff --git a/README.md b/README.md index cb1e5402..3e80834c 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,14 @@ In other cases you can contact the developer via email: 0) + LightOnOff(true); const TickType_t xDelay = flashdauer / portTICK_PERIOD_MS; vTaskDelay( xDelay ); diff --git a/code/components/jomjol_flowcontroll/ClassFlowControll.cpp b/code/components/jomjol_flowcontroll/ClassFlowControll.cpp index e9020e7c..7399aa23 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowControll.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowControll.cpp @@ -22,13 +22,16 @@ static const char* TAG = "flow_controll"; std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _host){ std::string _classname = ""; std::string result = ""; +// printf("_stepname: %s\n", _stepname.c_str()); if ((_stepname.compare("[MakeImage]") == 0) || (_stepname.compare(";[MakeImage]") == 0)){ _classname = "ClassFlowMakeImage"; } if ((_stepname.compare("[Alignment]") == 0) || (_stepname.compare(";[Alignment]") == 0)){ _classname = "ClassFlowAlignment"; } - if ((_stepname.compare("[Digits]") == 0) || (_stepname.compare(";[Digits]") == 0)){ + if ((_stepname.compare(0, 7, "[Digits") == 0) || (_stepname.compare(0, 8, ";[Digits") == 0)) { +// if ((_stepname.compare("[Digits]") == 0) || (_stepname.compare(";[Digits]") == 0)){ +// printf("Digits!!!\n"); _classname = "ClassFlowDigit"; } if ((_stepname.compare("[Analog]") == 0) || (_stepname.compare(";[Analog]") == 0)){ @@ -110,7 +113,7 @@ ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type) cfc = new ClassFlowAnalog(&FlowControll); flowanalog = (ClassFlowAnalog*) cfc; } - if (toUpper(_type).compare("[DIGITS]") == 0) + if (toUpper(_type).compare(0, 7, "[DIGITS") == 0) { cfc = new ClassFlowDigit(&FlowControll); flowdigit = (ClassFlowDigit*) cfc; diff --git a/code/components/jomjol_flowcontroll/ClassFlowDigit.cpp b/code/components/jomjol_flowcontroll/ClassFlowDigit.cpp index 9225ce6e..6e37cc0b 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowDigit.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowDigit.cpp @@ -26,7 +26,8 @@ void ClassFlowDigit::SetInitialParameter(void) previousElement = NULL; SaveAllFiles = false; disabled = false; - + DecimalShift = 0; + DecimalShiftEnabled = false; } ClassFlowDigit::ClassFlowDigit() : ClassFlowImage(TAG) @@ -88,8 +89,25 @@ bool ClassFlowDigit::ReadParameter(FILE* pfile, string& aktparamgraph) if (!this->GetNextParagraph(pfile, aktparamgraph)) return false; + printf("aktparamgraph: %s\n", aktparamgraph.c_str()); + + +/* if ((aktparamgraph.compare("[Digits]") != 0) && (aktparamgraph.compare(";[Digits]") != 0)) // Paragraph passt nich zu MakeImage return false; +*/ + + if ((aktparamgraph.compare(0, 7, "[Digits") != 0) && (aktparamgraph.compare(0, 8, ";[Digits") != 0)) // Paragraph passt nich zu MakeImage + return false; + + int _pospkt = aktparamgraph.find_first_of("."); + int _posklammerzu = aktparamgraph.find_first_of("]"); +// printf("Pos: %d, %d\n", _pospkt, _posklammerzu); + if (_pospkt > -1) + NameDigit = aktparamgraph.substr(_pospkt+1, _posklammerzu - _pospkt-1); + else + NameDigit = ""; + printf("Name Digit: %s\n", NameDigit.c_str()); if (aktparamgraph[0] == ';') { diff --git a/code/components/jomjol_flowcontroll/ClassFlowDigit.h b/code/components/jomjol_flowcontroll/ClassFlowDigit.h index 941c0f27..3af92f85 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowDigit.h +++ b/code/components/jomjol_flowcontroll/ClassFlowDigit.h @@ -21,6 +21,10 @@ protected: string cnnmodelfile; int modelxsize, modelysize; bool SaveAllFiles; + string NameDigit; + int DecimalShift; + bool DecimalShiftEnabled; + ClassFlowAlignment* flowpostalignment; diff --git a/code/components/jomjol_flowcontroll/ClassFlowMakeImage.cpp b/code/components/jomjol_flowcontroll/ClassFlowMakeImage.cpp index cd1fa45b..129882ec 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowMakeImage.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowMakeImage.cpp @@ -26,6 +26,7 @@ void ClassFlowMakeImage::takePictureWithFlash(int flashdauer) rawImage->width = image_width; rawImage->height = image_height; ///////////////////////////////////////////////////////////////////////////////////// + printf("Flashdauer: %d\n", flashdauer); Camera.CaptureToBasisImage(rawImage, flashdauer); time(&TimeImageTaken); localtime(&TimeImageTaken); @@ -92,6 +93,12 @@ bool ClassFlowMakeImage::ReadParameter(FILE* pfile, string& aktparamgraph) if (toUpper(zerlegt[1]) == "TRUE") SaveAllFiles = true; } + + if ((toUpper(zerlegt[0]) == "WAITBEFORETAKINGPICTURE") && (zerlegt.size() > 1)) + { + waitbeforepicture = stoi(zerlegt[1]); + } + if ((toUpper(zerlegt[0]) == "BRIGHTNESS") && (zerlegt.size() > 1)) { @@ -124,9 +131,9 @@ bool ClassFlowMakeImage::ReadParameter(FILE* pfile, string& aktparamgraph) rawImage->CreateEmptyImage(image_width, image_height, 3); waitbeforepicture_store = waitbeforepicture; - if (FixedExposure) + if (FixedExposure && (waitbeforepicture > 0)) { - printf("Fixed Exposure enabled!\n"); +// printf("Fixed Exposure enabled!\n"); int flashdauer = (int) (waitbeforepicture * 1000); Camera.EnableAutoExposure(flashdauer); waitbeforepicture = 0.2; diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp index e63a0929..e9d54cb0 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp @@ -434,6 +434,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) if (ErrorMessageText.length() == 0) { PreValue = Value; + ErrorMessageText = "no error"; SavePreValue(Value, zwtime); } return true; diff --git a/code/components/jomjol_wlan/connect_wlan.cpp b/code/components/jomjol_wlan/connect_wlan.cpp index 906f93ba..bc177dc4 100644 --- a/code/components/jomjol_wlan/connect_wlan.cpp +++ b/code/components/jomjol_wlan/connect_wlan.cpp @@ -176,7 +176,11 @@ void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostna wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); ESP_ERROR_CHECK(esp_wifi_init(&cfg)); - if (_dns != NULL) { + if ((_ipadr != NULL) && (_gw != NULL) && (_netmask != NULL)) + { + if (_dns == NULL) + _dns = _gw; + ESP_LOGI(TAG, "set DNS manual"); esp_netif_dns_info_t dns_info; ip4_addr_t ip; diff --git a/code/dependencies.lock b/code/dependencies.lock new file mode 100644 index 00000000..de82408d --- /dev/null +++ b/code/dependencies.lock @@ -0,0 +1,2 @@ +manifest_hash: 45994dbfed009907994c31f6d279c5861a1eacbf219ce8b58e74e39b3393816a +version: 1.0.0 diff --git a/code/main/main.cpp b/code/main/main.cpp index eda84e83..75dee4f9 100644 --- a/code/main/main.cpp +++ b/code/main/main.cpp @@ -31,7 +31,7 @@ #define __SD_USE_ONE_LINE_MODE__ #ifdef __SD_USE_ONE_LINE_MODE__ -// #include "server_GPIO.h" +#include "server_GPIO.h" #endif @@ -200,7 +200,7 @@ extern "C" void app_main(void) register_server_ota_sdcard_uri(server); #ifdef __SD_USE_ONE_LINE_MODE__ -// register_server_GPIO_uri(server); + register_server_GPIO_uri(server); #endif printf("vor reg server main\n"); diff --git a/code/main/version.cpp b/code/main/version.cpp index e0311dc2..1d849532 100644 --- a/code/main/version.cpp +++ b/code/main/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="8a26b81"; +const char* GIT_REV="026bac1"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2021-05-22 11:34"; \ No newline at end of file +const char* BUILD_TIME="2021-05-27 19:10"; \ No newline at end of file diff --git a/code/version.cpp b/code/version.cpp index e0311dc2..1d849532 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="8a26b81"; +const char* GIT_REV="026bac1"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2021-05-22 11:34"; \ No newline at end of file +const char* BUILD_TIME="2021-05-27 19:10"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index dd9b63f4..94ba6dcf 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index c74baa92..86259fb8 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ