Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v2.2.0 #29

Merged
merged 2 commits into from
Sep 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,30 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571



##### Rolling - (2020-09-25)
##### Rolling - (2020-09-27)

* based on v2.1.0 (2020-09-25)
* based on v2.2.0 (2020-09-27)



##### 2.1.0 Layout update (2020-09-25)

##### 2.2.0 Version Controll (2020-09-27)

* Integrated automated versioning system (menu: SYSTEM --> INFO)
* Update Build-System to PlatformIO - Espressif 32 v2.0.0 (ESP-IDF 4.1)




##### 2.1.0 Decimal Shift, Chrome & Edge (2020-09-25)

* Implementation of Decimal Shift

* Update default CNN for digits to v6.4.0

* Improvement HTML

* Support for Chrome and Firefox
* Support for Chrome and Edge

* Reduce logging to minimum - extended logging on demand

Expand Down
7 changes: 7 additions & 0 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@ list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/proto

set(PROJECT_VER "0.0.9.3")

ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
${CMAKE_CURRENT_BINARY_DIR}/_version.cpp
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)


include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp32cam-server-only)
5 changes: 1 addition & 4 deletions code/lib/jomjol_fileserver_ota/server_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static esp_err_t download_get_handler(httpd_req_t *req)
return ESP_FAIL;
}

esp_err_t res = httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");

ESP_LOGI(TAG, "Sending file : %s (%ld bytes)...", filename, file_stat.st_size);
set_content_type_from_file(req, filename);
Expand Down Expand Up @@ -437,7 +437,6 @@ static esp_err_t delete_post_handler(httpd_req_t *req)

//////////////////////////////////////////////////////////////
char _query[200];
char _filename[30];
char _valuechar[30];
std::string fn = "/sdcard/firmware/";
std::string _task;
Expand Down Expand Up @@ -576,8 +575,6 @@ void unzip(std::string _in_zip_file, std::string _target_directory){
size_t uncomp_size;
mz_zip_archive zip_archive;
void* p;
const int N = 50;
char data[2048];
char archive_filename[64];
std::string zw;
// static const char* s_Test_archive_filename = "testhtml.zip";
Expand Down
10 changes: 8 additions & 2 deletions code/lib/jomjol_flowcontroll/ClassFlowAnalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,14 @@ bool ClassFlowAnalog::doAlignAndCut(string time)
return false;
}

if (input_roi.length() > 0)
img_roi = new CImageBasis(input_roi);
if (input_roi.length() > 0){
img_roi = new CImageBasis(input_roi);
if (!img_roi->ImageOkay()){
LogFile.WriteToFile("ClassFlowAnalog::doAlignAndCut ImageRoi not okay!");
delete img_roi;
return false;
}
}

for (int i = 0; i < ROI.size(); ++i)
{
Expand Down
2 changes: 0 additions & 2 deletions code/lib/jomjol_flowcontroll/ClassFlowControll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "server_ota.h"

std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _host){
bool found = false;
std::string _classname = "";
std::string result = "";
if (_stepname.compare("[MakeImage]") == 0){
Expand All @@ -29,7 +28,6 @@ std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _
// printf(FlowControll[i]->name().c_str()); printf("\n");
FlowControll[i]->doFlow("");
result = FlowControll[i]->getHTMLSingleStep(_host);
found = true;
}

return result;
Expand Down
9 changes: 8 additions & 1 deletion code/lib/jomjol_flowcontroll/ClassFlowDigit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,15 @@ bool ClassFlowDigit::doAlignAndCut(string time)
return false;
}

if (input_roi.length() > 0)
if (input_roi.length() > 0){
img_roi = new CImageBasis(input_roi);
if (!img_roi->ImageOkay()){
LogFile.WriteToFile("ClassFlowAnalog::doAlignAndCut ImageRoi not okay!");
delete img_roi;
return false;
}
}



for (int i = 0; i < ROI.size(); ++i)
Expand Down
65 changes: 36 additions & 29 deletions code/lib/jomjol_flowcontroll/ClassFlowPostProcessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,15 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
return true;
}

zw = ErsetzteN(ReturnRawValue);
zw = ErsetzteN(ReturnRawValue);


Value = std::stof(zw);
if (checkDigitIncreaseConsistency)
{
// Value = checkDigitConsistency(Value, DecimalShift, isanalog);
}

zwvalue = RundeOutput(Value, AnzahlAnalog - DecimalShift);

if ((!AllowNegativeRates) && (Value < PreValue))
Expand Down Expand Up @@ -413,39 +419,40 @@ string ClassFlowPostProcessing::ErsetzteN(string input)
return input;
}

string ClassFlowPostProcessing::checkDigitConsistency(string input, int _decilamshift, int lastvalueanalog){
/*
if (checkDigitIncreaseConsistency && lastvalueanalog > -1)
float ClassFlowPostProcessing::checkDigitConsistency(float input, int _decilamshift, bool _isanalog){
int aktdigit, olddigit;
int aktdigit_before, olddigit_before;
int pot, pot_max;
float zw;

pot = _decilamshift;
if (!_isanalog) // falls es keine analogwerte gibt, kann die letzte nicht bewerte werden
{
int zifferIST;
// int substrakt = 0;
bool lastcorrected = false;
for (int i = input.length() - 1; i >= 0; --i)
{
zifferIST = input[i] - 48; //std::stoi(std::string(input[i]));
if (lastcorrected)
{
zifferIST--;
input[i] = zifferIST + 48;
lastcorrected = false;
}
pot++;
}
pot_max = ((int) log10(input)) + 1;

while (pot <= pot_max)
{
zw = input / pow(10, pot-1);
aktdigit_before = ((int) zw) % 10;
zw = PreValue / pow(10, pot-1);
olddigit_before = ((int) zw) % 10;

zw = input / pow(10, pot);
aktdigit = ((int) zw) % 10;
zw = PreValue / pow(10, pot);
olddigit = ((int) zw) % 10;

pot = posPunkt - i - 1;
zw = PreValue / pow(10, pot);
ziffer = ((int) zw) % 10;
if (zifferIST < ziffer)
if (aktdigit != olddigit) {
if (olddigit_before <= aktdigit_before) // stelle vorher hat noch keinen Nulldurchgang --> nachfolgestelle sollte sich nicht verändern
{
if (lastvalueanalog >= 7)
{
input[i] = ziffer + 48;
lastvalueanalog = ziffer;
lastcorrected = true;
}
input = input + ((float) (olddigit - aktdigit)) * pow(10, pot); // Neue Digit wird durch alte Digit ersetzt;
}


}

pot++;
}
*/

return input;
}
4 changes: 2 additions & 2 deletions code/lib/jomjol_flowcontroll/ClassFlowPostProcessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ClassFlowPostProcessing :
{
protected:
bool PreValueUse;
int PreValueAgeStartup;
int PreValueAgeStartup;
bool AllowNegativeRates;
float MaxRateValue;
bool useMaxRateValue;
Expand All @@ -29,7 +29,7 @@ class ClassFlowPostProcessing :
string ShiftDecimal(string in, int _decShift);

string ErsetzteN(string);
string checkDigitConsistency(string, int _decilamshift, int lastvalueanalog = -1);
float checkDigitConsistency(float input, int _decilamshift, bool _isanalog);
string RundeOutput(float _in, int _anzNachkomma);

public:
Expand Down
2 changes: 0 additions & 2 deletions code/lib/jomjol_image_proc/CFindTemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,6 @@ void CAlignAndCutImage::CutAndSave(std::string _template1, int x1, int y1, int d
int memsize = dx * dy * this->channels;
uint8_t* odata = (unsigned char*)GET_MEMORY(memsize);


int x_source, y_source;
stbi_uc* p_target;
stbi_uc* p_source;

Expand Down
Loading