nightly update 20200808

This commit is contained in:
jomjol
2020-08-08 18:26:50 +02:00
parent c9119deaea
commit 13b5d93190
9 changed files with 36 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
#include "ClassFlowControll.h"
#include "ClassLogFile.h"
#include "Helper.h"
std::vector<HTMLInfo*> ClassFlowControll::GetAllDigital()
@@ -112,7 +113,11 @@ bool ClassFlowControll::doFlow(string time)
{
bool result = true;
for (int i = 0; i < FlowControll.size(); ++i)
{
string zw = "FlowControll.doFlow - " + FlowControll[i]->name();
LogFile.WriteToFile(zw);
result = result && FlowControll[i]->doFlow(time);
}
return result;
}

View File

@@ -1,5 +1,6 @@
#include "CFindTemplate.h"
#include "Helper.h"
#include "ClassLogFile.h"
#define _USE_MATH_DEFINES
#include <math.h>
@@ -453,6 +454,9 @@ void CAlignAndCutImage::Align(std::string _template0, int ref0_x, int ref0_y, st
delete imgzw;
}
string zw = "dx: " + to_string(dx) + "dy: " + to_string(dy) + "d_winkel: " + to_string(d_winkel);
LogFile.WriteToDedicatedFile("/sdcard/alignment.txt", zw);
CRotate rt(this->rgb_image, this->channels, this->width, this->height, this->bpp);
rt.Translate(dx, dy);
rt.Rotate(d_winkel, ref0_x, ref0_y);

View File

@@ -3,13 +3,12 @@
ClassLogFile LogFile("/sdcard/log.txt");
void ClassLogFile::WriteToFile(std::string info, bool _time)
void ClassLogFile::WriteToDedicatedFile(std::string _fn, std::string info, bool _time)
{
FILE* pFile;
std::string zwtime;
pFile = fopen(logfile.c_str(), "a+");
pFile = fopen(_fn.c_str(), "a+");
if (_time)
{
@@ -31,11 +30,12 @@ void ClassLogFile::WriteToFile(std::string info, bool _time)
fclose(pFile);
}
void ClassLogFile::WriteToFile(std::string info, bool _time)
{
WriteToDedicatedFile(logfile, info, _time);
}
ClassLogFile::ClassLogFile(std::string _logfile)
{
logfile = _logfile;
}
ClassLogFile::~ClassLogFile()
{
}
}

View File

@@ -5,13 +5,12 @@
class ClassLogFile
{
private:
/* data */
std::string logfile;
public:
ClassLogFile(std::string _logfile);
~ClassLogFile();
void WriteToFile(std::string info, bool _time = true);
void WriteToDedicatedFile(std::string _fn, std::string info, bool _time = true);
};
extern ClassLogFile LogFile;