mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 04:26:58 +03:00
nightly update 20200808
This commit is contained in:
@@ -11,10 +11,12 @@ Details can be found on the Wiki pages.
|
|||||||
|
|
||||||
##### 0.1.0 (2020-08-07)
|
##### 0.1.0 (2020-08-07)
|
||||||
|
|
||||||
* Inital Version
|
* Initial Version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Know-Bugs
|
## Known Issues
|
||||||
|
|
||||||
* spontaneous reboot, especially in case of intensive web server access
|
* spontaneous reboot, especially in case of intensive web server access
|
||||||
|
* stuck in reboot loop
|
||||||
|
* stopping automated tflite flow
|
||||||
3
code/.helper/copy.bat
Normal file
3
code/.helper/copy.bat
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
copy "C:\Users\Muell\Documents\Programmieren\GitHub\AI-on-the-edge-device\code\.pio\build\esp32cam\firmware.bin" "C:\Users\Muell\Documents\Programmieren\GitHub\AI-on-the-edge-device\firmware\firmware.bin"
|
||||||
|
copy "C:\Users\Muell\Documents\Programmieren\GitHub\AI-on-the-edge-device\code\.pio\build\esp32cam\bootloader.bin" "C:\Users\Muell\Documents\Programmieren\GitHub\AI-on-the-edge-device\firmware\bootloader.bin"
|
||||||
|
copy "C:\Users\Muell\Documents\Programmieren\GitHub\AI-on-the-edge-device\code\.pio\build\esp32cam\partitions.bin" "C:\Users\Muell\Documents\Programmieren\GitHub\AI-on-the-edge-device\firmware\partitions.bin"
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "ClassFlowControll.h"
|
#include "ClassFlowControll.h"
|
||||||
|
|
||||||
|
#include "ClassLogFile.h"
|
||||||
#include "Helper.h"
|
#include "Helper.h"
|
||||||
|
|
||||||
std::vector<HTMLInfo*> ClassFlowControll::GetAllDigital()
|
std::vector<HTMLInfo*> ClassFlowControll::GetAllDigital()
|
||||||
@@ -112,7 +113,11 @@ bool ClassFlowControll::doFlow(string time)
|
|||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
for (int i = 0; i < FlowControll.size(); ++i)
|
for (int i = 0; i < FlowControll.size(); ++i)
|
||||||
|
{
|
||||||
|
string zw = "FlowControll.doFlow - " + FlowControll[i]->name();
|
||||||
|
LogFile.WriteToFile(zw);
|
||||||
result = result && FlowControll[i]->doFlow(time);
|
result = result && FlowControll[i]->doFlow(time);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "CFindTemplate.h"
|
#include "CFindTemplate.h"
|
||||||
#include "Helper.h"
|
#include "Helper.h"
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -453,6 +454,9 @@ void CAlignAndCutImage::Align(std::string _template0, int ref0_x, int ref0_y, st
|
|||||||
delete imgzw;
|
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);
|
CRotate rt(this->rgb_image, this->channels, this->width, this->height, this->bpp);
|
||||||
rt.Translate(dx, dy);
|
rt.Translate(dx, dy);
|
||||||
rt.Rotate(d_winkel, ref0_x, ref0_y);
|
rt.Rotate(d_winkel, ref0_x, ref0_y);
|
||||||
|
|||||||
@@ -3,13 +3,12 @@
|
|||||||
|
|
||||||
ClassLogFile LogFile("/sdcard/log.txt");
|
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;
|
FILE* pFile;
|
||||||
std::string zwtime;
|
std::string zwtime;
|
||||||
|
|
||||||
|
pFile = fopen(_fn.c_str(), "a+");
|
||||||
pFile = fopen(logfile.c_str(), "a+");
|
|
||||||
|
|
||||||
if (_time)
|
if (_time)
|
||||||
{
|
{
|
||||||
@@ -31,11 +30,12 @@ void ClassLogFile::WriteToFile(std::string info, bool _time)
|
|||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClassLogFile::WriteToFile(std::string info, bool _time)
|
||||||
|
{
|
||||||
|
WriteToDedicatedFile(logfile, info, _time);
|
||||||
|
}
|
||||||
|
|
||||||
ClassLogFile::ClassLogFile(std::string _logfile)
|
ClassLogFile::ClassLogFile(std::string _logfile)
|
||||||
{
|
{
|
||||||
logfile = _logfile;
|
logfile = _logfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassLogFile::~ClassLogFile()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -5,13 +5,12 @@
|
|||||||
class ClassLogFile
|
class ClassLogFile
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
/* data */
|
|
||||||
std::string logfile;
|
std::string logfile;
|
||||||
public:
|
public:
|
||||||
ClassLogFile(std::string _logfile);
|
ClassLogFile(std::string _logfile);
|
||||||
~ClassLogFile();
|
|
||||||
|
|
||||||
void WriteToFile(std::string info, bool _time = true);
|
void WriteToFile(std::string info, bool _time = true);
|
||||||
|
void WriteToDedicatedFile(std::string _fn, std::string info, bool _time = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ClassLogFile LogFile;
|
extern ClassLogFile LogFile;
|
||||||
@@ -115,6 +115,11 @@ extern "C" void app_main()
|
|||||||
|
|
||||||
initialise_wifi(ssid, password);
|
initialise_wifi(ssid, password);
|
||||||
|
|
||||||
|
TickType_t xDelay;
|
||||||
|
xDelay = 2000 / portTICK_PERIOD_MS;
|
||||||
|
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||||
|
vTaskDelay( xDelay );
|
||||||
|
|
||||||
setup_time();
|
setup_time();
|
||||||
LogFile.WriteToFile("===== Main Started =====");
|
LogFile.WriteToFile("===== Main Started =====");
|
||||||
|
|
||||||
@@ -122,7 +127,11 @@ extern "C" void app_main()
|
|||||||
printf("time %s\n", zw.c_str());
|
printf("time %s\n", zw.c_str());
|
||||||
|
|
||||||
Camera.InitCam();
|
Camera.InitCam();
|
||||||
Camera.LightOnOff(false);
|
Camera.LightOnOff(false);
|
||||||
|
xDelay = 2000 / portTICK_PERIOD_MS;
|
||||||
|
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||||
|
vTaskDelay( xDelay );
|
||||||
|
|
||||||
server = start_webserver();
|
server = start_webserver();
|
||||||
register_server_camera_uri(server);
|
register_server_camera_uri(server);
|
||||||
register_server_tflite_uri(server);
|
register_server_tflite_uri(server);
|
||||||
@@ -131,9 +140,4 @@ extern "C" void app_main()
|
|||||||
register_server_main_uri(server, "/sdcard");
|
register_server_main_uri(server, "/sdcard");
|
||||||
|
|
||||||
TFliteDoAutoStart();
|
TFliteDoAutoStart();
|
||||||
|
|
||||||
zw = gettimestring("%Y%m%d-%H%M%S");
|
|
||||||
printf("time %s\n", zw.c_str());
|
|
||||||
|
|
||||||
printf("Test für OTA-Update v3\n");
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user