mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 04:56:53 +03:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2d1bbb4be | ||
|
|
bc6a01444a | ||
|
|
24f0902194 | ||
|
|
19fd6a10dd | ||
|
|
a45a5296e4 | ||
|
|
1459bb15c1 | ||
|
|
ce5f3c463b |
10
README.md
10
README.md
@@ -45,10 +45,16 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
|
||||
|
||||
|
||||
|
||||
##### 6.7.0 Image Processing in Memory - (2021-04-23)
|
||||
##### 6.7.2 Image Processing in Memory - (2021-01-05)
|
||||
|
||||
* NEW 6.7.2: Updated html for setup modus - remove reboot on edit configuration)
|
||||
|
||||
* NEW 6.7.1: Improved stability of camera (back to v6.6.1) - remove black strips and areas
|
||||
|
||||
* Upgrade digital CNN to v8.3.0 (added new type of digits)
|
||||
|
||||
* Internal update: TFlite (v2.5), esp32cam, startup sequence
|
||||
|
||||
* Rollback to espressif v2.1.0, as v3.2.0 shows unstable reboot
|
||||
|
||||
* Bugfix: WLan-passwords, reset of hostname
|
||||
@@ -151,4 +157,4 @@ There are some ideas and feature request, which are not followed currently - mai
|
||||
|
||||
## Solved topics
|
||||
|
||||
* n.a.
|
||||
* n.a.
|
||||
@@ -4,6 +4,6 @@ list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/proto
|
||||
|
||||
idf_component_register(SRCS ${app_sources}
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES esp32-camera-master esp_http_server jomjol_logfile jomjol_image_proc jomjol_fileserver_ota nvs_flash)
|
||||
REQUIRES esp32-camera-master esp_http_server jomjol_logfile jomjol_image_proc nvs_flash)
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#include "Helper.h"
|
||||
#include "CImageBasis.h"
|
||||
#include "server_ota.h"
|
||||
|
||||
|
||||
#define BOARD_ESP32CAM_AITHINKER
|
||||
@@ -72,7 +71,7 @@ static camera_config_t camera_config = {
|
||||
|
||||
//XCLK 20MHz or 10MHz for OV2640 double FPS (Experimental)
|
||||
// .xclk_freq_hz = 20000000, // Orginalwert
|
||||
.xclk_freq_hz = 5000000, // Test, um die Bildfehler los zu werden !!!! ging mal mit 5000000
|
||||
.xclk_freq_hz = 5000000, // Test, um die Bildfehler los zu werden !!!!
|
||||
.ledc_timer = LEDC_TIMER_0,
|
||||
.ledc_channel = LEDC_CHANNEL_0,
|
||||
|
||||
@@ -83,7 +82,7 @@ static camera_config_t camera_config = {
|
||||
|
||||
|
||||
.jpeg_quality = 5, //0-63 lower number means higher quality
|
||||
.fb_count = 2 //if more than one, i2s runs in continuous mode. Use only with JPEG
|
||||
.fb_count = 1 //if more than one, i2s runs in continuous mode. Use only with JPEG
|
||||
};
|
||||
|
||||
|
||||
@@ -225,10 +224,17 @@ void CCamera::EnableAutoExposure(int flashdauer)
|
||||
const TickType_t xDelay = flashdauer / portTICK_PERIOD_MS;
|
||||
vTaskDelay( xDelay );
|
||||
|
||||
camera_fb_t * fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAGCAMERACLASS, "Camera Capture Failed");
|
||||
}
|
||||
esp_camera_fb_return(fb);
|
||||
|
||||
sensor_t * s = esp_camera_sensor_get();
|
||||
s->set_gain_ctrl(s, 0);
|
||||
s->set_exposure_ctrl(s, 0);
|
||||
|
||||
|
||||
LEDOnOff(false);
|
||||
LightOnOff(false);
|
||||
isFixedExposure = true;
|
||||
@@ -264,10 +270,7 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay)
|
||||
camera_fb_t * fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAGCAMERACLASS, "Camera Capture Failed");
|
||||
LightOnOff(false);
|
||||
LogFile.WriteHeapInfo("Camera Capture Failed - Reinit Camera");
|
||||
Camera.InitCam();
|
||||
doReboot();
|
||||
LEDOnOff(false);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
@@ -352,9 +355,6 @@ esp_err_t CCamera::CaptureToFile(std::string nm, int delay)
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAGCAMERACLASS, "Camera Capture Failed");
|
||||
LEDOnOff(false);
|
||||
LogFile.WriteHeapInfo("Camera Capture Failed - Reinit Camera");
|
||||
Camera.InitCam();
|
||||
doReboot();
|
||||
return ESP_FAIL;
|
||||
}
|
||||
LEDOnOff(false);
|
||||
@@ -439,13 +439,10 @@ esp_err_t CCamera::CaptureToHTTP(httpd_req_t *req, int delay)
|
||||
vTaskDelay( xDelay );
|
||||
}
|
||||
|
||||
|
||||
fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
ESP_LOGE(TAGCAMERACLASS, "Camera capture failed");
|
||||
LightOnOff(false);
|
||||
LogFile.WriteHeapInfo("Camera Capture Failed - Reinit Camera");
|
||||
Camera.InitCam();
|
||||
doReboot();
|
||||
httpd_resp_send_500(req);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
@@ -581,16 +578,10 @@ CCamera::CCamera()
|
||||
contrast = -5;
|
||||
saturation = -5;
|
||||
isFixedExposure = false;
|
||||
ActualQuality = camera_config.jpeg_quality;
|
||||
ActualResolution = camera_config.frame_size;
|
||||
|
||||
}
|
||||
|
||||
esp_err_t CCamera::InitCam()
|
||||
{
|
||||
esp_camera_deinit();
|
||||
PowerResetCamera();
|
||||
|
||||
if(CAM_PIN_PWDN != -1){
|
||||
// Init the GPIO
|
||||
gpio_pad_select_gpio(CAM_PIN_PWDN);
|
||||
@@ -600,6 +591,8 @@ esp_err_t CCamera::InitCam()
|
||||
}
|
||||
|
||||
printf("Init Camera\n");
|
||||
ActualQuality = camera_config.jpeg_quality;
|
||||
ActualResolution = camera_config.frame_size;
|
||||
//initialize the camera
|
||||
esp_err_t err = esp_camera_init(&camera_config);
|
||||
if (err != ESP_OK) {
|
||||
@@ -607,42 +600,5 @@ esp_err_t CCamera::InitCam()
|
||||
return err;
|
||||
}
|
||||
|
||||
SetBrightnessContrastSaturation(brightness, contrast, saturation);
|
||||
SetQualitySize(ActualQuality, ActualResolution);
|
||||
|
||||
if (isFixedExposure)
|
||||
EnableAutoExposure(waitbeforepicture_org);
|
||||
|
||||
LightOnOff(false);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void PowerResetCamera(){
|
||||
printf("Resetting camera by power down line.\n");
|
||||
/*
|
||||
gpio_config_t conf = { 0 };
|
||||
conf.pin_bit_mask = 1LL << GPIO_NUM_32;
|
||||
conf.mode = GPIO_MODE_OUTPUT;
|
||||
gpio_config(&conf);
|
||||
*/
|
||||
|
||||
gpio_pad_select_gpio(GPIO_NUM_32);
|
||||
/* Set the GPIO as a push/pull output */
|
||||
gpio_set_direction(GPIO_NUM_32, GPIO_MODE_OUTPUT);
|
||||
|
||||
|
||||
// carefull, logic is inverted compared to reset pin
|
||||
gpio_set_level(GPIO_NUM_32, 0); // ehemals 1 !!!!!!!!!!!!!!!!!!!!
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
gpio_set_level(GPIO_NUM_32, 1); // ehemals 0 !!!!!!!!!!!!!!!!!!!!
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,7 +25,6 @@ class CCamera {
|
||||
framesize_t ActualResolution;
|
||||
int brightness, contrast, saturation;
|
||||
bool isFixedExposure;
|
||||
|
||||
int waitbeforepicture_org;
|
||||
|
||||
public:
|
||||
@@ -50,7 +49,6 @@ class CCamera {
|
||||
esp_err_t CaptureToBasisImage(CImageBasis *_Image, int delay = 0);
|
||||
};
|
||||
|
||||
void PowerResetCamera();
|
||||
|
||||
extern CCamera Camera;
|
||||
|
||||
|
||||
246
code/components/jomjol_controlcamera/server_camera.cpp
Normal file
246
code/components/jomjol_controlcamera/server_camera.cpp
Normal file
@@ -0,0 +1,246 @@
|
||||
#include "server_camera.h"
|
||||
|
||||
#include <string>
|
||||
#include "string.h"
|
||||
|
||||
#include "esp_camera.h"
|
||||
#include "ClassControllCamera.h"
|
||||
|
||||
#include "ClassLogFile.h"
|
||||
|
||||
#define SCRATCH_BUFSIZE2 8192
|
||||
char scratch2[SCRATCH_BUFSIZE2];
|
||||
|
||||
//#define DEBUG_DETAIL_ON
|
||||
|
||||
|
||||
|
||||
void PowerResetCamera(){
|
||||
ESP_LOGD(TAGPARTCAMERA, "Resetting camera by power down line");
|
||||
gpio_config_t conf = { 0 };
|
||||
conf.pin_bit_mask = 1LL << GPIO_NUM_32;
|
||||
conf.mode = GPIO_MODE_OUTPUT;
|
||||
gpio_config(&conf);
|
||||
|
||||
// carefull, logic is inverted compared to reset pin
|
||||
gpio_set_level(GPIO_NUM_32, 1);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
gpio_set_level(GPIO_NUM_32, 0);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
|
||||
esp_err_t handler_lightOn(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_lightOn - Start");
|
||||
printf("handler_lightOn uri:\n"); printf(req->uri); printf("\n");
|
||||
#endif
|
||||
|
||||
Camera.LightOnOff(true);
|
||||
const char* resp_str = (const char*) req->user_ctx;
|
||||
httpd_resp_send(req, resp_str, strlen(resp_str));
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_lightOn - Done");
|
||||
#endif
|
||||
|
||||
return ESP_OK;
|
||||
};
|
||||
|
||||
esp_err_t handler_lightOff(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_lightOff - Start");
|
||||
printf("handler_lightOff uri:\n"); printf(req->uri); printf("\n");
|
||||
#endif
|
||||
Camera.LightOnOff(false);
|
||||
const char* resp_str = (const char*) req->user_ctx;
|
||||
httpd_resp_send(req, resp_str, strlen(resp_str));
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_lightOff - Done");
|
||||
#endif
|
||||
|
||||
return ESP_OK;
|
||||
};
|
||||
|
||||
esp_err_t handler_capture(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_capture - Start");
|
||||
#endif
|
||||
|
||||
int quality;
|
||||
framesize_t res;
|
||||
|
||||
Camera.GetCameraParameter(req, quality, res);
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Size: %d", res); printf(" Quality: %d\n", quality);
|
||||
#endif
|
||||
|
||||
Camera.SetQualitySize(quality, res);
|
||||
|
||||
esp_err_t ressult;
|
||||
ressult = Camera.CaptureToHTTP(req);
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_capture - Done");
|
||||
#endif
|
||||
|
||||
return ressult;
|
||||
};
|
||||
|
||||
|
||||
esp_err_t handler_capture_with_ligth(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_capture_with_ligth - Start");
|
||||
#endif
|
||||
char _query[100];
|
||||
char _delay[10];
|
||||
|
||||
int quality;
|
||||
framesize_t res;
|
||||
int delay = 2500;
|
||||
|
||||
if (httpd_req_get_url_query_str(req, _query, 100) == ESP_OK)
|
||||
{
|
||||
printf("Query: "); printf(_query); printf("\n");
|
||||
if (httpd_query_key_value(_query, "delay", _delay, 10) == ESP_OK)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Delay: "); printf(_delay); printf("\n");
|
||||
#endif
|
||||
delay = atoi(_delay);
|
||||
|
||||
if (delay < 0)
|
||||
delay = 0;
|
||||
}
|
||||
};
|
||||
|
||||
Camera.GetCameraParameter(req, quality, res);
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Size: %d", res); printf(" Quality: %d\n", quality);
|
||||
#endif
|
||||
|
||||
Camera.SetQualitySize(quality, res);
|
||||
Camera.LightOnOff(true);
|
||||
const TickType_t xDelay = delay / portTICK_PERIOD_MS;
|
||||
vTaskDelay( xDelay );
|
||||
|
||||
esp_err_t ressult;
|
||||
ressult = Camera.CaptureToHTTP(req);
|
||||
|
||||
Camera.LightOnOff(false);
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_capture_with_ligth - Done");
|
||||
#endif
|
||||
|
||||
return ressult;
|
||||
};
|
||||
|
||||
|
||||
|
||||
esp_err_t handler_capture_save_to_file(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_capture_save_to_file - Start");
|
||||
#endif
|
||||
|
||||
char _query[100];
|
||||
char _delay[10];
|
||||
int delay = 0;
|
||||
char filename[100];
|
||||
std::string fn = "/sdcard/";
|
||||
|
||||
|
||||
int quality;
|
||||
framesize_t res;
|
||||
|
||||
if (httpd_req_get_url_query_str(req, _query, 100) == ESP_OK)
|
||||
{
|
||||
printf("Query: "); printf(_query); printf("\n");
|
||||
if (httpd_query_key_value(_query, "filename", filename, 100) == ESP_OK)
|
||||
{
|
||||
fn.append(filename);
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Filename: "); printf(fn.c_str()); printf("\n");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
fn.append("noname.jpg");
|
||||
|
||||
if (httpd_query_key_value(_query, "delay", _delay, 10) == ESP_OK)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Delay: "); printf(_delay); printf("\n");
|
||||
#endif
|
||||
delay = atoi(_delay);
|
||||
|
||||
if (delay < 0)
|
||||
delay = 0;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
fn.append("noname.jpg");
|
||||
|
||||
Camera.GetCameraParameter(req, quality, res);
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Size: %d", res); printf(" Quality: %d\n", quality);
|
||||
#endif
|
||||
Camera.SetQualitySize(quality, res);
|
||||
|
||||
esp_err_t ressult;
|
||||
ressult = Camera.CaptureToFile(fn, delay);
|
||||
|
||||
const char* resp_str = (const char*) fn.c_str();
|
||||
httpd_resp_send(req, resp_str, strlen(resp_str));
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_capture_save_to_file - Done");
|
||||
#endif
|
||||
|
||||
return ressult;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void register_server_camera_uri(httpd_handle_t server)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
ESP_LOGI(TAGPARTCAMERA, "server_part_camera - Registering URI handlers");
|
||||
#endif
|
||||
|
||||
httpd_uri_t camuri = { };
|
||||
camuri.method = HTTP_GET;
|
||||
|
||||
camuri.uri = "/lighton";
|
||||
camuri.handler = handler_lightOn;
|
||||
camuri.user_ctx = (void*) "Light On";
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
camuri.uri = "/lightoff";
|
||||
camuri.handler = handler_lightOff;
|
||||
camuri.user_ctx = (void*) "Light Off";
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
camuri.uri = "/capture";
|
||||
camuri.handler = handler_capture;
|
||||
camuri.user_ctx = NULL;
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
camuri.uri = "/capture_with_flashlight";
|
||||
camuri.handler = handler_capture_with_ligth;
|
||||
camuri.user_ctx = NULL;
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
camuri.uri = "/save";
|
||||
camuri.handler = handler_capture_save_to_file;
|
||||
camuri.user_ctx = NULL;
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
}
|
||||
16
code/components/jomjol_controlcamera/server_camera.h
Normal file
16
code/components/jomjol_controlcamera/server_camera.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef JOMJOL_CONTROLCAMERA_H
|
||||
#define JOMJOL_CONTROLCAMERA_H
|
||||
|
||||
#include <esp_log.h>
|
||||
|
||||
#include <esp_http_server.h>
|
||||
|
||||
//#include "ClassControllCamera.h"
|
||||
|
||||
static const char *TAGPARTCAMERA = "server_camera";
|
||||
|
||||
void register_server_camera_uri(httpd_handle_t server);
|
||||
|
||||
void PowerResetCamera();
|
||||
|
||||
#endif
|
||||
@@ -721,21 +721,33 @@ void register_server_file_uri(httpd_handle_t server, const char *base_path)
|
||||
|
||||
/* Validate file storage base path */
|
||||
if (!base_path) {
|
||||
// if (!base_path || strcmp(base_path, "/spiffs") != 0) {
|
||||
ESP_LOGE(TAG, "File server base_path not set");
|
||||
// return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (server_data) {
|
||||
ESP_LOGE(TAG, "File server already started");
|
||||
// return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
/* Allocate memory for server data */
|
||||
server_data = (file_server_data *) calloc(1, sizeof(struct file_server_data));
|
||||
if (!server_data) {
|
||||
ESP_LOGE(TAG, "Failed to allocate memory for server data");
|
||||
// return ESP_ERR_NO_MEM;
|
||||
}
|
||||
strlcpy(server_data->base_path, base_path,
|
||||
sizeof(server_data->base_path));
|
||||
|
||||
|
||||
|
||||
/* URI handler for getting uploaded files */
|
||||
// char zw[sizeof(serverprefix)+1];
|
||||
// strcpy(zw, serverprefix);
|
||||
// zw[strlen(serverprefix)] = '*';
|
||||
// zw[strlen(serverprefix)+1] = '\0';
|
||||
// printf("zw: %s\n", zw);
|
||||
httpd_uri_t file_download = {
|
||||
.uri = "/fileserver*", // Match all URIs of type /path/to/file
|
||||
.method = HTTP_GET,
|
||||
@@ -744,6 +756,8 @@ void register_server_file_uri(httpd_handle_t server, const char *base_path)
|
||||
};
|
||||
httpd_register_uri_handler(server, &file_download);
|
||||
|
||||
|
||||
|
||||
httpd_uri_t file_logfileact = {
|
||||
.uri = "/logfileact", // Match all URIs of type /path/to/file
|
||||
.method = HTTP_GET,
|
||||
@@ -770,4 +784,5 @@ void register_server_file_uri(httpd_handle_t server, const char *base_path)
|
||||
.user_ctx = server_data // Pass server data as context
|
||||
};
|
||||
httpd_register_uri_handler(server, &file_delete);
|
||||
|
||||
}
|
||||
|
||||
@@ -412,26 +412,11 @@ void task_reboot(void *pvParameter)
|
||||
vTaskDelete(NULL); //Delete this task if it exits from the loop above
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void invoke_abort(void)
|
||||
{
|
||||
while (1) {
|
||||
if (esp_cpu_in_ocd_debug_mode()) {
|
||||
__asm__ ("break 0,0");
|
||||
}
|
||||
*((int *) 0) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void doReboot(){
|
||||
LogFile.WriteToFile("Reboot - now");
|
||||
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
|
||||
KillTFliteTasks();
|
||||
// xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
|
||||
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
invoke_abort();
|
||||
esp_restart();
|
||||
hard_restart();
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ bool ClassFlowAnalog::doNeuralNetwork(string time)
|
||||
zwcnn = FormatFileName(zwcnn);
|
||||
printf(zwcnn.c_str());printf("\n");
|
||||
tflite->LoadModel(zwcnn);
|
||||
// tflite->MakeAllocate();
|
||||
tflite->MakeAllocate();
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < ROI.size(); ++i)
|
||||
|
||||
@@ -224,7 +224,7 @@ bool ClassFlowDigit::doNeuralNetwork(string time)
|
||||
string zwcnn = FormatFileName("/sdcard" + cnnmodelfile);
|
||||
printf(zwcnn.c_str());printf("\n");
|
||||
tflite->LoadModel(zwcnn);
|
||||
// tflite->MakeAllocate();
|
||||
tflite->MakeAllocate();
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < ROI.size(); ++i)
|
||||
|
||||
101
code/components/jomjol_flowcontroll/camera_define.h
Normal file
101
code/components/jomjol_flowcontroll/camera_define.h
Normal file
@@ -0,0 +1,101 @@
|
||||
#ifndef CAMERADEFINED
|
||||
#define CAMERADEFINED
|
||||
|
||||
|
||||
#if defined(CAMERA_MODEL_WROVER_KIT)
|
||||
#define PWDN_GPIO_NUM -1
|
||||
#define RESET_GPIO_NUM -1
|
||||
#define XCLK_GPIO_NUM 21
|
||||
#define SIOD_GPIO_NUM 26
|
||||
#define SIOC_GPIO_NUM 27
|
||||
|
||||
#define Y9_GPIO_NUM 35
|
||||
#define Y8_GPIO_NUM 34
|
||||
#define Y7_GPIO_NUM 39
|
||||
#define Y6_GPIO_NUM 36
|
||||
#define Y5_GPIO_NUM 19
|
||||
#define Y4_GPIO_NUM 18
|
||||
#define Y3_GPIO_NUM 5
|
||||
#define Y2_GPIO_NUM 4
|
||||
#define VSYNC_GPIO_NUM 25
|
||||
#define HREF_GPIO_NUM 23
|
||||
#define PCLK_GPIO_NUM 22
|
||||
|
||||
#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
|
||||
#define PWDN_GPIO_NUM -1
|
||||
#define RESET_GPIO_NUM 15
|
||||
#define XCLK_GPIO_NUM 27
|
||||
#define SIOD_GPIO_NUM 25
|
||||
#define SIOC_GPIO_NUM 23
|
||||
|
||||
#define Y9_GPIO_NUM 19
|
||||
#define Y8_GPIO_NUM 36
|
||||
#define Y7_GPIO_NUM 18
|
||||
#define Y6_GPIO_NUM 39
|
||||
#define Y5_GPIO_NUM 5
|
||||
#define Y4_GPIO_NUM 34
|
||||
#define Y3_GPIO_NUM 35
|
||||
#define Y2_GPIO_NUM 32
|
||||
#define VSYNC_GPIO_NUM 22
|
||||
#define HREF_GPIO_NUM 26
|
||||
#define PCLK_GPIO_NUM 21
|
||||
|
||||
#elif defined(CAMERA_MODEL_AI_THINKER)
|
||||
#define PWDN_GPIO_NUM GPIO_NUM_32
|
||||
#define RESET_GPIO_NUM -1
|
||||
#define XCLK_GPIO_NUM GPIO_NUM_0
|
||||
#define SIOD_GPIO_NUM GPIO_NUM_26
|
||||
#define SIOC_GPIO_NUM GPIO_NUM_27
|
||||
|
||||
#define Y9_GPIO_NUM GPIO_NUM_35
|
||||
#define Y8_GPIO_NUM GPIO_NUM_34
|
||||
#define Y7_GPIO_NUM GPIO_NUM_39
|
||||
#define Y6_GPIO_NUM GPIO_NUM_36
|
||||
#define Y5_GPIO_NUM GPIO_NUM_21
|
||||
#define Y4_GPIO_NUM GPIO_NUM_19
|
||||
#define Y3_GPIO_NUM GPIO_NUM_18
|
||||
#define Y2_GPIO_NUM GPIO_NUM_5
|
||||
#define VSYNC_GPIO_NUM GPIO_NUM_25
|
||||
#define HREF_GPIO_NUM GPIO_NUM_23
|
||||
#define PCLK_GPIO_NUM GPIO_NUM_22
|
||||
|
||||
#else
|
||||
#error "Camera model not selected"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static camera_config_t camera_config = {
|
||||
.pin_pwdn = PWDN_GPIO_NUM,
|
||||
.pin_reset = RESET_GPIO_NUM,
|
||||
.pin_xclk = XCLK_GPIO_NUM,
|
||||
.pin_sscb_sda = SIOD_GPIO_NUM,
|
||||
.pin_sscb_scl = SIOC_GPIO_NUM,
|
||||
|
||||
.pin_d7 = Y9_GPIO_NUM,
|
||||
.pin_d6 = Y8_GPIO_NUM,
|
||||
.pin_d5 = Y7_GPIO_NUM,
|
||||
.pin_d4 = Y6_GPIO_NUM,
|
||||
.pin_d3 = Y5_GPIO_NUM,
|
||||
.pin_d2 = Y4_GPIO_NUM,
|
||||
.pin_d1 = Y3_GPIO_NUM,
|
||||
.pin_d0 = Y2_GPIO_NUM,
|
||||
.pin_vsync = VSYNC_GPIO_NUM,
|
||||
.pin_href = HREF_GPIO_NUM,
|
||||
.pin_pclk = PCLK_GPIO_NUM,
|
||||
|
||||
//XCLK 20MHz or 10MHz for OV2640 double FPS (Experimental)
|
||||
.xclk_freq_hz = 20000000,
|
||||
.ledc_timer = LEDC_TIMER_0,
|
||||
.ledc_channel = LEDC_CHANNEL_0,
|
||||
|
||||
.pixel_format = PIXFORMAT_JPEG,//YUV422,GRAYSCALE,RGB565,JPEG
|
||||
// .pixel_format = PIXFORMAT_RGB888,//YUV422,GRAYSCALE,RGB565,JPEG
|
||||
// .frame_size = FRAMESIZE_QVGA,//QQVGA-QXGA Do not use sizes above QVGA when not JPEG
|
||||
.frame_size = FRAMESIZE_SVGA,//QQVGA-QXGA Do not use sizes above QVGA when not JPEG
|
||||
|
||||
.jpeg_quality = 12, //0-63 lower number means higher quality
|
||||
.fb_count = 1 //if more than one, i2s runs in continuous mode. Use only with JPEG
|
||||
};
|
||||
|
||||
#endif
|
||||
Binary file not shown.
@@ -6,13 +6,9 @@
|
||||
|
||||
// #define DEBUG_DETAIL_ON
|
||||
|
||||
//#define GET_MEMORY(X) malloc(X)
|
||||
#define GET_MEMORY(X) heap_caps_malloc(X, MALLOC_CAP_SPIRAM)
|
||||
|
||||
|
||||
float CTfLiteClass::GetOutputValue(int nr)
|
||||
{
|
||||
TfLiteTensor* output2 = interpreter->output(0);
|
||||
TfLiteTensor* output2 = this->interpreter->output(0);
|
||||
|
||||
int numeroutput = output2->dims->data[1];
|
||||
if ((nr+1) > numeroutput)
|
||||
@@ -57,7 +53,7 @@ int CTfLiteClass::GetOutClassification()
|
||||
|
||||
void CTfLiteClass::GetInputDimension(bool silent = false)
|
||||
{
|
||||
TfLiteTensor* input2 = interpreter->input(0);
|
||||
TfLiteTensor* input2 = this->interpreter->input(0);
|
||||
|
||||
int numdim = input2->dims->size;
|
||||
if (!silent) printf("NumDimension: %d\n", numdim);
|
||||
@@ -76,7 +72,7 @@ void CTfLiteClass::GetInputDimension(bool silent = false)
|
||||
|
||||
void CTfLiteClass::GetOutPut()
|
||||
{
|
||||
TfLiteTensor* output2 = interpreter->output(0);
|
||||
TfLiteTensor* output2 = this->interpreter->output(0);
|
||||
|
||||
int numdim = output2->dims->size;
|
||||
printf("NumDimension: %d\n", numdim);
|
||||
@@ -146,20 +142,20 @@ void CTfLiteClass::MakeAllocate()
|
||||
static tflite::AllOpsResolver resolver;
|
||||
|
||||
// printf(LogFile.getESPHeapInfo().c_str()); printf("\n");
|
||||
interpreter = new tflite::MicroInterpreter(model, resolver, tensor_arena, kTensorArenaSize, error_reporter);
|
||||
this->interpreter = new tflite::MicroInterpreter(this->model, resolver, this->tensor_arena, this->kTensorArenaSize, this->error_reporter);
|
||||
// printf(LogFile.getESPHeapInfo().c_str()); printf("\n");
|
||||
|
||||
TfLiteStatus allocate_status = interpreter->AllocateTensors();
|
||||
TfLiteStatus allocate_status = this->interpreter->AllocateTensors();
|
||||
if (allocate_status != kTfLiteOk) {
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "AllocateTensors() failed");
|
||||
GetInputDimension();
|
||||
this->GetInputDimension();
|
||||
return;
|
||||
}
|
||||
// printf("Allocate Done.\n");
|
||||
}
|
||||
|
||||
void CTfLiteClass::GetInputTensorSize(){
|
||||
float *zw = input;
|
||||
float *zw = this->input;
|
||||
int test = sizeof(zw);
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
printf("Input Tensor Dimension: %d\n", test);
|
||||
@@ -215,39 +211,36 @@ unsigned char* CTfLiteClass::ReadFileToCharArray(std::string _fn)
|
||||
void CTfLiteClass::LoadModel(std::string _fn){
|
||||
|
||||
#ifdef SUPRESS_TFLITE_ERRORS
|
||||
error_reporter = new tflite::OwnMicroErrorReporter;
|
||||
this->error_reporter = new tflite::OwnMicroErrorReporter;
|
||||
#else
|
||||
error_reporter = new tflite::MicroErrorReporter;
|
||||
this->error_reporter = new tflite::MicroErrorReporter;
|
||||
#endif
|
||||
|
||||
unsigned char *rd;
|
||||
rd = ReadFileToCharArray(_fn.c_str());
|
||||
|
||||
model = tflite::GetModel(rd);
|
||||
this->model = tflite::GetModel(rd);
|
||||
free(rd);
|
||||
TFLITE_MINIMAL_CHECK(model != nullptr);
|
||||
MakeAllocate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
CTfLiteClass::CTfLiteClass()
|
||||
{
|
||||
model = nullptr;
|
||||
interpreter = nullptr;
|
||||
input = nullptr;
|
||||
output = nullptr;
|
||||
kTensorArenaSize = 200 * 1024; /// laut testfile: 108000 - bisher 600
|
||||
tensor_arena = (uint8_t*) GET_MEMORY(kTensorArenaSize);
|
||||
|
||||
// tensor_arena = new uint8_t[kTensorArenaSize];
|
||||
this->model = nullptr;
|
||||
this->interpreter = nullptr;
|
||||
this->input = nullptr;
|
||||
this->output = nullptr;
|
||||
this->kTensorArenaSize = 200 * 1024; /// laut testfile: 108000 - bisher 600
|
||||
this->tensor_arena = new uint8_t[kTensorArenaSize];
|
||||
}
|
||||
|
||||
CTfLiteClass::~CTfLiteClass()
|
||||
{
|
||||
delete tensor_arena;
|
||||
delete interpreter;
|
||||
delete error_reporter;
|
||||
delete this->tensor_arena;
|
||||
delete this->interpreter;
|
||||
delete this->error_reporter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class CTfLiteClass
|
||||
const tflite::Model* model;
|
||||
tflite::MicroInterpreter* interpreter;
|
||||
TfLiteTensor* output = nullptr;
|
||||
tflite::AllOpsResolver resolver;
|
||||
static tflite::AllOpsResolver resolver;
|
||||
|
||||
int kTensorArenaSize;
|
||||
uint8_t *tensor_arena;
|
||||
@@ -52,12 +52,12 @@ class CTfLiteClass
|
||||
|
||||
long GetFileSize(std::string filename);
|
||||
unsigned char* ReadFileToCharArray(std::string _fn);
|
||||
|
||||
void MakeAllocate();
|
||||
|
||||
public:
|
||||
CTfLiteClass();
|
||||
~CTfLiteClass();
|
||||
void LoadModel(std::string _fn);
|
||||
void MakeAllocate();
|
||||
void GetInputTensorSize();
|
||||
bool LoadInputImageBasis(CImageBasis *rs);
|
||||
void Invoke();
|
||||
|
||||
@@ -128,6 +128,31 @@ void blink_task_doFlow(void *pvParameter)
|
||||
xHandleblink_task_doFlow = NULL;
|
||||
}
|
||||
|
||||
|
||||
esp_err_t handler_init(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_init - Start");
|
||||
printf("handler_doinit uri:\n"); printf(req->uri); printf("\n");
|
||||
#endif
|
||||
|
||||
char* resp_str = "Init started<br>";
|
||||
httpd_resp_send(req, resp_str, strlen(resp_str));
|
||||
|
||||
doInit();
|
||||
|
||||
resp_str = "Init done<br>";
|
||||
httpd_resp_send(req, resp_str, strlen(resp_str));
|
||||
/* Respond with an empty chunk to signal HTTP response completion */
|
||||
httpd_resp_send_chunk(req, NULL, 0);
|
||||
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
LogFile.WriteHeapInfo("handler_init - Done");
|
||||
#endif
|
||||
|
||||
return ESP_OK;
|
||||
};
|
||||
|
||||
esp_err_t handler_doflow(httpd_req_t *req)
|
||||
{
|
||||
#ifdef DEBUG_DETAIL_ON
|
||||
@@ -409,6 +434,44 @@ esp_err_t handler_editflow(httpd_req_t *req)
|
||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||
}
|
||||
|
||||
|
||||
if (_task.compare("test_align") == 0)
|
||||
{
|
||||
std::string _host = "";
|
||||
if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
|
||||
_host = std::string(_valuechar);
|
||||
}
|
||||
// printf("Parameter host: "); printf(_host.c_str()); printf("\n");
|
||||
|
||||
// string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
|
||||
std::string zw = tfliteflow.doSingleStep("[Alignment]", _host);
|
||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||
}
|
||||
if (_task.compare("test_analog") == 0)
|
||||
{
|
||||
std::string _host = "";
|
||||
if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
|
||||
_host = std::string(_valuechar);
|
||||
}
|
||||
// printf("Parameter host: "); printf(_host.c_str()); printf("\n");
|
||||
// string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
|
||||
std::string zw = tfliteflow.doSingleStep("[Analog]", _host);
|
||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||
}
|
||||
if (_task.compare("test_digits") == 0)
|
||||
{
|
||||
std::string _host = "";
|
||||
if (httpd_query_key_value(_query, "host", _valuechar, 30) == ESP_OK) {
|
||||
_host = std::string(_valuechar);
|
||||
}
|
||||
// printf("Parameter host: "); printf(_host.c_str()); printf("\n");
|
||||
|
||||
// string zwzw = "Do " + _task + " start\n"; printf(zwzw.c_str());
|
||||
std::string zw = tfliteflow.doSingleStep("[Digits]", _host);
|
||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||
}
|
||||
|
||||
|
||||
/* Respond with an empty chunk to signal HTTP response completion */
|
||||
httpd_resp_sendstr_chunk(req, NULL);
|
||||
|
||||
@@ -543,6 +606,11 @@ void register_server_tflite_uri(httpd_handle_t server)
|
||||
httpd_uri_t camuri = { };
|
||||
camuri.method = HTTP_GET;
|
||||
|
||||
camuri.uri = "/doinit";
|
||||
camuri.handler = handler_init;
|
||||
camuri.user_ctx = (void*) "Light On";
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
camuri.uri = "/setPreValue.html";
|
||||
camuri.handler = handler_prevalue;
|
||||
camuri.user_ctx = (void*) "Prevalue";
|
||||
@@ -552,6 +620,7 @@ void register_server_tflite_uri(httpd_handle_t server)
|
||||
camuri.handler = handler_doflow;
|
||||
camuri.user_ctx = (void*) "Light Off";
|
||||
httpd_register_uri_handler(server, &camuri);
|
||||
|
||||
|
||||
camuri.uri = "/editflow.html";
|
||||
camuri.handler = handler_editflow;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_sleep.h"
|
||||
// #include "nvs_flash.h"
|
||||
#include "esp_sntp.h"
|
||||
|
||||
void setup_time(void);
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "time_sntp.h"
|
||||
#include "ClassControllCamera.h"
|
||||
#include "server_main.h"
|
||||
#include "server_camera.h"
|
||||
|
||||
|
||||
#define __SD_USE_ONE_LINE_MODE__
|
||||
|
||||
@@ -113,6 +115,7 @@ void task_NoSDBlink(void *pvParameter)
|
||||
{
|
||||
gpio_pad_select_gpio(BLINK_GPIO);
|
||||
gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
|
||||
|
||||
|
||||
TickType_t xDelay;
|
||||
xDelay = 100 / portTICK_PERIOD_MS;
|
||||
@@ -124,20 +127,25 @@ void task_NoSDBlink(void *pvParameter)
|
||||
vTaskDelay( xDelay );
|
||||
gpio_set_level(BLINK_GPIO, 0);
|
||||
vTaskDelay( xDelay );
|
||||
|
||||
}
|
||||
vTaskDelete(NULL); //Delete this task if it exits from the loop above
|
||||
}
|
||||
|
||||
extern "C" void app_main(void)
|
||||
{
|
||||
printf("Do Reset Camera\n");
|
||||
PowerResetCamera();
|
||||
Camera.InitCam();
|
||||
Camera.LightOnOff(false);
|
||||
|
||||
if (!Init_NVS_SDCard())
|
||||
{
|
||||
xTaskCreate(&task_NoSDBlink, "task_NoSDBlink", configMINIMAL_STACK_SIZE * 64, NULL, tskIDLE_PRIORITY+1, NULL);
|
||||
return;
|
||||
};
|
||||
CheckOTAUpdate();
|
||||
|
||||
Camera.InitCam();
|
||||
CheckOTAUpdate();
|
||||
|
||||
LoadWlanFromFile("/sdcard/wlan.ini");
|
||||
ConnectToWLAN();
|
||||
@@ -145,7 +153,7 @@ extern "C" void app_main(void)
|
||||
|
||||
TickType_t xDelay;
|
||||
xDelay = 2000 / portTICK_PERIOD_MS;
|
||||
// printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||
// LogFile.WriteToFile("Startsequence 06");
|
||||
vTaskDelay( xDelay );
|
||||
// LogFile.WriteToFile("Startsequence 07");
|
||||
@@ -155,14 +163,17 @@ extern "C" void app_main(void)
|
||||
LogFile.WriteToFile("=============================================================================================");
|
||||
LogFile.SwitchOnOff(false);
|
||||
|
||||
// std::string zw = gettimestring("%Y%m%d-%H%M%S");
|
||||
// printf("time %s\n", zw.c_str());
|
||||
std::string zw = gettimestring("%Y%m%d-%H%M%S");
|
||||
printf("time %s\n", zw.c_str());
|
||||
|
||||
// Camera.InitCam();
|
||||
// Camera.LightOnOff(false);
|
||||
xDelay = 2000 / portTICK_PERIOD_MS;
|
||||
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||
vTaskDelay( xDelay );
|
||||
|
||||
server = start_webserver();
|
||||
register_server_camera_uri(server);
|
||||
register_server_tflite_uri(server);
|
||||
register_server_file_uri(server, "/sdcard");
|
||||
register_server_ota_sdcard_uri(server);
|
||||
@@ -174,4 +185,4 @@ extern "C" void app_main(void)
|
||||
register_server_main_uri(server, "/sdcard");
|
||||
|
||||
TFliteDoAutoStart();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <sys/param.h>
|
||||
#include "nvs_flash.h"
|
||||
#include "tcpip_adapter.h"
|
||||
//#include "esp_eth.h"
|
||||
#include "esp_eth.h"
|
||||
|
||||
|
||||
#include <esp_http_server.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="ec96b7f";
|
||||
const char* GIT_REV="a45a529";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="master";
|
||||
const char* BUILD_TIME="2021-04-23 07:11";
|
||||
const char* BUILD_TIME="2021-05-01 17:42";
|
||||
@@ -13,7 +13,7 @@ extern "C"
|
||||
#include "Helper.h"
|
||||
#include <fstream>
|
||||
|
||||
const char* GIT_BASE_BRANCH = "master - v6.7.0 - 2020-04-23";
|
||||
const char* GIT_BASE_BRANCH = "master - v6.7.1 - 2020-01-05";
|
||||
|
||||
|
||||
const char* git_base_branch(void)
|
||||
|
||||
@@ -135,11 +135,10 @@ CONFIG_EXAMPLE_CONNECT_IPV6=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_PERF is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_NONE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE=0
|
||||
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
|
||||
# CONFIG_COMPILER_CXX_RTTI is not set
|
||||
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
|
||||
@@ -247,9 +246,9 @@ CONFIG_ESP32_REV_MIN_0=y
|
||||
CONFIG_ESP32_REV_MIN=0
|
||||
CONFIG_ESP32_DPORT_WORKAROUND=y
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
|
||||
CONFIG_ESP32_SPIRAM_SUPPORT=y
|
||||
|
||||
#
|
||||
@@ -398,8 +397,18 @@ CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
|
||||
#
|
||||
# Ethernet
|
||||
#
|
||||
# CONFIG_ETH_USE_ESP32_EMAC is not set
|
||||
# CONFIG_ETH_USE_SPI_ETHERNET is not set
|
||||
CONFIG_ETH_ENABLED=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
CONFIG_ETH_PHY_INTERFACE_RMII=y
|
||||
# CONFIG_ETH_PHY_INTERFACE_MII is not set
|
||||
CONFIG_ETH_RMII_CLK_INPUT=y
|
||||
# CONFIG_ETH_RMII_CLK_OUTPUT is not set
|
||||
CONFIG_ETH_RMII_CLK_IN_GPIO=0
|
||||
CONFIG_ETH_DMA_BUFFER_SIZE=512
|
||||
CONFIG_ETH_DMA_RX_BUFFER_NUM=10
|
||||
CONFIG_ETH_DMA_TX_BUFFER_NUM=10
|
||||
CONFIG_ETH_USE_SPI_ETHERNET=y
|
||||
CONFIG_ETH_SPI_ETHERNET_DM9051=y
|
||||
# CONFIG_ETH_USE_OPENETH is not set
|
||||
# end of Ethernet
|
||||
|
||||
@@ -419,7 +428,7 @@ CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
|
||||
#
|
||||
# ESP HTTP client
|
||||
#
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
|
||||
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
|
||||
# end of ESP HTTP client
|
||||
|
||||
@@ -538,12 +547,14 @@ CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y
|
||||
# Modbus configuration
|
||||
#
|
||||
CONFIG_FMB_COMM_MODE_RTU_EN=y
|
||||
# CONFIG_FMB_COMM_MODE_ASCII_EN is not set
|
||||
CONFIG_FMB_COMM_MODE_ASCII_EN=y
|
||||
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
|
||||
CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
|
||||
CONFIG_FMB_QUEUE_LENGTH=20
|
||||
CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048
|
||||
CONFIG_FMB_SERIAL_BUF_SIZE=256
|
||||
CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8
|
||||
CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000
|
||||
CONFIG_FMB_SERIAL_TASK_PRIO=10
|
||||
# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set
|
||||
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||
@@ -982,24 +993,24 @@ CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
#
|
||||
# Supplicant
|
||||
#
|
||||
# CONFIG_WPA_MBEDTLS_CRYPTO is not set
|
||||
CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||
# CONFIG_WPA_TLS_V12 is not set
|
||||
# end of Supplicant
|
||||
|
||||
#
|
||||
# Camera configuration
|
||||
#
|
||||
# CONFIG_OV7670_SUPPORT is not set
|
||||
CONFIG_OV7670_SUPPORT=y
|
||||
# CONFIG_OV7725_SUPPORT is not set
|
||||
# CONFIG_NT99141_SUPPORT is not set
|
||||
CONFIG_NT99141_SUPPORT=y
|
||||
CONFIG_OV2640_SUPPORT=y
|
||||
# CONFIG_OV3660_SUPPORT is not set
|
||||
# CONFIG_OV5640_SUPPORT is not set
|
||||
CONFIG_OV3660_SUPPORT=y
|
||||
CONFIG_OV5640_SUPPORT=y
|
||||
# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set
|
||||
CONFIG_SCCB_HARDWARE_I2C_PORT1=y
|
||||
# CONFIG_CAMERA_CORE0 is not set
|
||||
CONFIG_CAMERA_CORE0=y
|
||||
# CONFIG_CAMERA_CORE1 is not set
|
||||
CONFIG_CAMERA_NO_AFFINITY=y
|
||||
# CONFIG_CAMERA_NO_AFFINITY is not set
|
||||
# end of Camera configuration
|
||||
# end of Component config
|
||||
|
||||
@@ -1035,11 +1046,10 @@ CONFIG_MONITOR_BAUD_OTHER_VAL=115200
|
||||
CONFIG_MONITOR_BAUD=115200
|
||||
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
||||
CONFIG_CXX_EXCEPTIONS=y
|
||||
CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE=0
|
||||
# CONFIG_CXX_EXCEPTIONS is not set
|
||||
CONFIG_STACK_CHECK_NONE=y
|
||||
# CONFIG_STACK_CHECK_NORM is not set
|
||||
# CONFIG_STACK_CHECK_STRONG is not set
|
||||
|
||||
@@ -131,15 +131,14 @@ CONFIG_EXAMPLE_CONNECT_IPV6=y
|
||||
#
|
||||
# Compiler options
|
||||
#
|
||||
# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_PERF is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_NONE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE=0
|
||||
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
|
||||
# CONFIG_COMPILER_CXX_RTTI is not set
|
||||
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
|
||||
@@ -398,8 +397,18 @@ CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
|
||||
#
|
||||
# Ethernet
|
||||
#
|
||||
# CONFIG_ETH_USE_ESP32_EMAC is not set
|
||||
# CONFIG_ETH_USE_SPI_ETHERNET is not set
|
||||
CONFIG_ETH_ENABLED=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
CONFIG_ETH_PHY_INTERFACE_RMII=y
|
||||
# CONFIG_ETH_PHY_INTERFACE_MII is not set
|
||||
CONFIG_ETH_RMII_CLK_INPUT=y
|
||||
# CONFIG_ETH_RMII_CLK_OUTPUT is not set
|
||||
CONFIG_ETH_RMII_CLK_IN_GPIO=0
|
||||
CONFIG_ETH_DMA_BUFFER_SIZE=512
|
||||
CONFIG_ETH_DMA_RX_BUFFER_NUM=10
|
||||
CONFIG_ETH_DMA_TX_BUFFER_NUM=10
|
||||
CONFIG_ETH_USE_SPI_ETHERNET=y
|
||||
CONFIG_ETH_SPI_ETHERNET_DM9051=y
|
||||
# CONFIG_ETH_USE_OPENETH is not set
|
||||
# end of Ethernet
|
||||
|
||||
@@ -419,7 +428,7 @@ CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
|
||||
#
|
||||
# ESP HTTP client
|
||||
#
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
|
||||
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
|
||||
# end of ESP HTTP client
|
||||
|
||||
@@ -538,12 +547,14 @@ CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y
|
||||
# Modbus configuration
|
||||
#
|
||||
CONFIG_FMB_COMM_MODE_RTU_EN=y
|
||||
# CONFIG_FMB_COMM_MODE_ASCII_EN is not set
|
||||
CONFIG_FMB_COMM_MODE_ASCII_EN=y
|
||||
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
|
||||
CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
|
||||
CONFIG_FMB_QUEUE_LENGTH=20
|
||||
CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048
|
||||
CONFIG_FMB_SERIAL_BUF_SIZE=256
|
||||
CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8
|
||||
CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000
|
||||
CONFIG_FMB_SERIAL_TASK_PRIO=10
|
||||
# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set
|
||||
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||
@@ -587,6 +598,7 @@ CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
|
||||
# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set
|
||||
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
|
||||
# CONFIG_FREERTOS_DEBUG_INTERNALS is not set
|
||||
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
|
||||
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
|
||||
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
|
||||
CONFIG_FREERTOS_DEBUG_OCDAWARE=y
|
||||
@@ -982,24 +994,24 @@ CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
#
|
||||
# Supplicant
|
||||
#
|
||||
# CONFIG_WPA_MBEDTLS_CRYPTO is not set
|
||||
CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||
# CONFIG_WPA_TLS_V12 is not set
|
||||
# end of Supplicant
|
||||
|
||||
#
|
||||
# Camera configuration
|
||||
#
|
||||
# CONFIG_OV7670_SUPPORT is not set
|
||||
CONFIG_OV7670_SUPPORT=y
|
||||
# CONFIG_OV7725_SUPPORT is not set
|
||||
# CONFIG_NT99141_SUPPORT is not set
|
||||
CONFIG_NT99141_SUPPORT=y
|
||||
CONFIG_OV2640_SUPPORT=y
|
||||
# CONFIG_OV3660_SUPPORT is not set
|
||||
# CONFIG_OV5640_SUPPORT is not set
|
||||
CONFIG_OV3660_SUPPORT=y
|
||||
CONFIG_OV5640_SUPPORT=y
|
||||
# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set
|
||||
CONFIG_SCCB_HARDWARE_I2C_PORT1=y
|
||||
# CONFIG_CAMERA_CORE0 is not set
|
||||
CONFIG_CAMERA_CORE0=y
|
||||
# CONFIG_CAMERA_CORE1 is not set
|
||||
CONFIG_CAMERA_NO_AFFINITY=y
|
||||
# CONFIG_CAMERA_NO_AFFINITY is not set
|
||||
# end of Camera configuration
|
||||
# end of Component config
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="ec96b7f";
|
||||
const char* GIT_REV="a45a529";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="master";
|
||||
const char* BUILD_TIME="2021-04-23 07:11";
|
||||
const char* BUILD_TIME="2021-05-01 17:42";
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -683,9 +683,13 @@ textarea {
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
<button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
|
||||
</p>
|
||||
<div id="doreboot">
|
||||
<p>
|
||||
<button class="button" id="Edit_Config_Direct" onclick="editConfigDirect()" style="display:none">Edit Config.ini direct</button>
|
||||
|
||||
<button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -701,6 +705,14 @@ textarea {
|
||||
|
||||
|
||||
function LoadConfigNeu() {
|
||||
|
||||
var isInitialSetup = getParameterByName('InitialSetup');
|
||||
if (isInitialSetup === 'true')
|
||||
{
|
||||
document.getElementById("reboot").style.display = "none";
|
||||
}
|
||||
|
||||
|
||||
basepath = getbasepath();
|
||||
if (!loadConfig(basepath)) {
|
||||
alert("Config.ini could not be loaded!\nPlease reload the page.");
|
||||
@@ -715,6 +727,16 @@ function LoadConfigNeu() {
|
||||
document.getElementById("divall").style.display = '';
|
||||
}
|
||||
|
||||
|
||||
function getParameterByName(name, url = window.location.href) {
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
||||
results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
function WriteParameter(_param, _category, _cat, _name, _optional, _select = false, _anzpara = 1){
|
||||
if (_param[_cat][_name]["found"]){
|
||||
if (_optional) {
|
||||
|
||||
@@ -9,7 +9,7 @@ function getbasepath(){
|
||||
{
|
||||
// host = "http://192.168.2.118"; // jomjol interner test
|
||||
// host = "http://192.168.178.26"; // jomjol interner test
|
||||
host = "http://192.168.178.26"; // jomjol interner Real
|
||||
host = "http://192.168.178.22"; // jomjol interner Real
|
||||
// host = "."; // jomjol interner localhost
|
||||
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ function LoadStep(){
|
||||
|
||||
break;
|
||||
case 5:
|
||||
document.getElementById('maincontent').src = '/edit_config_param.html';
|
||||
document.getElementById('maincontent').src = '/edit_config_param.html?InitialSetup=true';
|
||||
document.getElementById('explaincontent').src = '/explain_5.html';
|
||||
document.getElementById('h_iframe_explain').style.display = "";
|
||||
document.getElementById("previous").disabled = false;
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.4.1
|
||||
6.5.0
|
||||
|
||||
Reference in New Issue
Block a user