mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 03:56:57 +03:00
Rolling 20220206
This commit is contained in:
10
README.md
10
README.md
@@ -46,12 +46,20 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
|
||||
### Known Issues
|
||||
|
||||
* slow response of web server during picture analysis
|
||||
* spontaneous reboots (mostly due to html access during image processing) - self recovery implemented
|
||||
* ~~spontaneous reboots (mostly due to html access during image processing)~~ --> solved since v10.3.0
|
||||
|
||||
**General remark:** Beside the `firmware.bin`, typically also the content of `/html` needs to be updated!
|
||||
|
||||
------
|
||||
|
||||
##### Rolling (2022-02-06)
|
||||
|
||||
- Graphical configuration: select availalbe neural network files (*.tfl, *.tflite) from drop down menue
|
||||
- OTA-update: add option to upload tfl / tflite files to the correct locatioin (`/config/`)
|
||||
- in future the new files will also be copied to the `firmware` directory of the repository
|
||||
- Updated digital neural network file (`dig-s1-q-20220102.tflite`)
|
||||
- Updated build environment to `Espressif 3.5.0`
|
||||
|
||||
|
||||
|
||||
##### 10.3.0 - Stability Increase (2022-01-29)
|
||||
|
||||
@@ -72,40 +72,44 @@ static const char *TAG_FILESERVER = "file_server";
|
||||
|
||||
using namespace std;
|
||||
|
||||
static esp_err_t get_tflite_file_handler(httpd_req_t *req){
|
||||
esp_err_t get_tflite_file_handler(httpd_req_t *req)
|
||||
{
|
||||
DIR *verzeichnis;
|
||||
struct dirent *files;
|
||||
struct dirent *entry;
|
||||
struct stat entry_stat;
|
||||
|
||||
std::string _filename, _fileext, _result = "";
|
||||
std::string _delimiter = ".";
|
||||
|
||||
std::string _filename, _fileext;
|
||||
size_t pos = 0;
|
||||
|
||||
const char verz_name[] = "/sdcard/config";
|
||||
printf("Suche TFLITE in /sdcard/config/\n");
|
||||
|
||||
verzeichnis=opendir("/sdcard/config");
|
||||
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||
httpd_resp_set_type(req, "text/plain");
|
||||
|
||||
printf("Suche TFLITE in /sdcard/config\n");
|
||||
|
||||
while((files = readdir(verzeichnis)))
|
||||
DIR *dir = opendir(verz_name);
|
||||
while ((entry = readdir(dir)) != NULL)
|
||||
{
|
||||
_filename = files->d_name;
|
||||
_fileext = _filename;
|
||||
_filename = std::string(entry->d_name);
|
||||
printf("File: %s\t", _filename.c_str());
|
||||
|
||||
while ((pos = _fileext.find(_delimiter))) {
|
||||
_fileext.erase(0, pos + _delimiter.length());
|
||||
}
|
||||
_fileext = _filename;
|
||||
pos = _fileext.find(".");
|
||||
if (pos != std::string::npos)
|
||||
_fileext = _fileext.erase(0, pos + 1);
|
||||
|
||||
printf(" Extension: %s\n", _fileext.c_str());
|
||||
|
||||
if ((_fileext == "tfl") || (_fileext == "tflite"))
|
||||
{
|
||||
_result = _result + _filename + "\t";
|
||||
_filename = "/config/" + _filename + "\t";
|
||||
httpd_resp_sendstr_chunk(req, _filename.c_str());
|
||||
}
|
||||
}
|
||||
closedir(verzeichnis);
|
||||
closedir(dir);
|
||||
|
||||
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||
httpd_resp_set_type(req, "text/plain");
|
||||
httpd_resp_sendstr_chunk(req, _result.c_str());
|
||||
httpd_resp_sendstr_chunk(req, NULL);
|
||||
return ESP_OK;
|
||||
}
|
||||
@@ -363,6 +367,7 @@ static esp_err_t download_get_handler(httpd_req_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
printf("uri: %s, filename: %s, filepath: %s\n", req->uri, filename, filepath);
|
||||
return http_resp_dir_html(req, filepath, filename, readonly);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,4 +5,6 @@ void register_server_file_uri(httpd_handle_t server, const char *base_path);
|
||||
|
||||
void unzip(std::string _in_zip_file, std::string _target_directory);
|
||||
|
||||
void delete_all_in_directory(std::string _directory);
|
||||
void delete_all_in_directory(std::string _directory);
|
||||
|
||||
esp_err_t get_tflite_file_handler(httpd_req_t *req);
|
||||
|
||||
@@ -435,7 +435,8 @@ void ClassFlowCNNGeneral::DrawROI(CImageBasis *_zw)
|
||||
for (int i = 0; i < GENERAL[_ana]->ROI.size(); ++i)
|
||||
{
|
||||
_zw->drawRect(GENERAL[_ana]->ROI[i]->posx, GENERAL[_ana]->ROI[i]->posy, GENERAL[_ana]->ROI[i]->deltax, GENERAL[_ana]->ROI[i]->deltay, r, g, b, 1);
|
||||
_zw->drawCircle((int) (GENERAL[_ana]->ROI[i]->posx + GENERAL[_ana]->ROI[i]->deltax/2), (int) (GENERAL[_ana]->ROI[i]->posy + GENERAL[_ana]->ROI[i]->deltay/2), (int) (GENERAL[_ana]->ROI[i]->deltax/2), r, g, b, 2);
|
||||
// _zw->drawCircle((int) (GENERAL[_ana]->ROI[i]->posx + GENERAL[_ana]->ROI[i]->deltax/2), (int) (GENERAL[_ana]->ROI[i]->posy + GENERAL[_ana]->ROI[i]->deltay/2), (int) (GENERAL[_ana]->ROI[i]->deltax/2), r, g, b, 2);
|
||||
_zw->drawEllipse( (int) (GENERAL[_ana]->ROI[i]->posx + GENERAL[_ana]->ROI[i]->deltax/2), (int) (GENERAL[_ana]->ROI[i]->posy + GENERAL[_ana]->ROI[i]->deltay/2), (int) (GENERAL[_ana]->ROI[i]->deltax/2), (int) (GENERAL[_ana]->ROI[i]->deltay/2), r, g, b, 2);
|
||||
_zw->drawLine((int) (GENERAL[_ana]->ROI[i]->posx + GENERAL[_ana]->ROI[i]->deltax/2), (int) GENERAL[_ana]->ROI[i]->posy, (int) (GENERAL[_ana]->ROI[i]->posx + GENERAL[_ana]->ROI[i]->deltax/2), (int) (GENERAL[_ana]->ROI[i]->posy + GENERAL[_ana]->ROI[i]->deltay), r, g, b, 2);
|
||||
_zw->drawLine((int) GENERAL[_ana]->ROI[i]->posx, (int) (GENERAL[_ana]->ROI[i]->posy + GENERAL[_ana]->ROI[i]->deltay/2), (int) GENERAL[_ana]->ROI[i]->posx + GENERAL[_ana]->ROI[i]->deltax, (int) (GENERAL[_ana]->ROI[i]->posy + GENERAL[_ana]->ROI[i]->deltay/2), r, g, b, 2);
|
||||
}
|
||||
|
||||
@@ -274,6 +274,28 @@ void CImageBasis::drawLine(int x1, int y1, int x2, int y2, int r, int g, int b,
|
||||
}
|
||||
}
|
||||
|
||||
void CImageBasis::drawEllipse(int x1, int y1, int radx, int rady, int r, int g, int b, int thickness)
|
||||
{
|
||||
float deltarad, aktrad;
|
||||
int _thick, _x, _y;
|
||||
int rad = radx;
|
||||
|
||||
if (rady > radx)
|
||||
rad = rady;
|
||||
|
||||
deltarad = 1 / (4 * M_PI * (rad + thickness - 1));
|
||||
|
||||
for (aktrad = 0; aktrad <= (2 * M_PI); aktrad += deltarad)
|
||||
for (_thick = 0; _thick < thickness; ++_thick)
|
||||
{
|
||||
_x = sin(aktrad) * (radx + _thick) + x1;
|
||||
_y = cos(aktrad) * (rady + _thick) + y1;
|
||||
if (isInImage(_x, _y))
|
||||
setPixelColor(_x, _y, r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CImageBasis::drawCircle(int x1, int y1, int rad, int r, int g, int b, int thickness)
|
||||
{
|
||||
float deltarad, aktrad;
|
||||
|
||||
@@ -57,6 +57,8 @@ class CImageBasis
|
||||
void drawRect(int x, int y, int dx, int dy, int r = 255, int g = 255, int b = 255, int thickness = 1);
|
||||
void drawLine(int x1, int y1, int x2, int y2, int r, int g, int b, int thickness = 1);
|
||||
void drawCircle(int x1, int y1, int rad, int r, int g, int b, int thickness = 1);
|
||||
void drawEllipse(int x1, int y1, int radx, int rady, int r, int g, int b, int thickness = 1);
|
||||
|
||||
void setPixelColor(int x, int y, int r, int g, int b);
|
||||
void Contrast(float _contrast);
|
||||
bool ImageOkay();
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "ClassLogFile.h"
|
||||
#include "server_GPIO.h"
|
||||
|
||||
// #define DEBUG_DETAIL_ON
|
||||
#include "server_file.h"
|
||||
|
||||
#define DEBUG_DETAIL_ON
|
||||
|
||||
|
||||
ClassFlowControll tfliteflow;
|
||||
@@ -393,6 +395,13 @@ esp_err_t handler_editflow(httpd_req_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
if (_task.compare("tflite") == 0)
|
||||
{
|
||||
printf("Get tflite list\n");
|
||||
return get_tflite_file_handler(req);
|
||||
}
|
||||
|
||||
|
||||
if (_task.compare("copy") == 0)
|
||||
{
|
||||
string in, out, zw;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="2029bd6";
|
||||
const char* GIT_REV="641cc86";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="master";
|
||||
const char* BUILD_TIME="2022-01-29 15:53";
|
||||
const char* GIT_BRANCH="rolling";
|
||||
const char* BUILD_TIME="2022-02-06 18:35";
|
||||
@@ -63,6 +63,7 @@ CONFIG_BOOTLOADER_WDT_TIME_MS=9000
|
||||
# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set
|
||||
CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0
|
||||
# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set
|
||||
CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
# end of Bootloader config
|
||||
|
||||
#
|
||||
@@ -89,11 +90,11 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
|
||||
CONFIG_ESPTOOLPY_BEFORE_RESET=y
|
||||
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
|
||||
@@ -532,6 +533,8 @@ CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y
|
||||
CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y
|
||||
# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set
|
||||
# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set
|
||||
# CONFIG_ESP_SYSTEM_PSRAM_LEAKAGE_WORKAROUND is not set
|
||||
# CONFIG_ESP_SYSTEM_FLASH_LEAKAGE_WORKAROUND is not set
|
||||
|
||||
#
|
||||
# Memory protection
|
||||
@@ -657,6 +660,10 @@ CONFIG_FMB_SERIAL_BUF_SIZE=256
|
||||
CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8
|
||||
CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000
|
||||
CONFIG_FMB_PORT_TASK_PRIO=10
|
||||
# CONFIG_FMB_PORT_TASK_AFFINITY_NO_AFFINITY is not set
|
||||
CONFIG_FMB_PORT_TASK_AFFINITY_CPU0=y
|
||||
# CONFIG_FMB_PORT_TASK_AFFINITY_CPU1 is not set
|
||||
CONFIG_FMB_PORT_TASK_AFFINITY=0x0
|
||||
CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y
|
||||
CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233
|
||||
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||
@@ -666,6 +673,8 @@ CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20
|
||||
CONFIG_FMB_TIMER_PORT_ENABLED=y
|
||||
CONFIG_FMB_TIMER_GROUP=0
|
||||
CONFIG_FMB_TIMER_INDEX=0
|
||||
CONFIG_FMB_MASTER_TIMER_GROUP=0
|
||||
CONFIG_FMB_MASTER_TIMER_INDEX=0
|
||||
# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set
|
||||
# end of Modbus configuration
|
||||
|
||||
@@ -1212,15 +1221,13 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||
CONFIG_OV2640_SUPPORT=y
|
||||
# CONFIG_OV3660_SUPPORT is not set
|
||||
# CONFIG_OV5640_SUPPORT is not set
|
||||
CONFIG_GC2145_SUPPORT=y
|
||||
CONFIG_GC032A_SUPPORT=y
|
||||
CONFIG_GC0308_SUPPORT=y
|
||||
CONFIG_BF3005_SUPPORT=y
|
||||
# CONFIG_GC2145_SUPPORT is not set
|
||||
# CONFIG_GC032A_SUPPORT is not set
|
||||
# CONFIG_GC0308_SUPPORT is not set
|
||||
# CONFIG_BF3005_SUPPORT is not set
|
||||
# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set
|
||||
CONFIG_SCCB_HARDWARE_I2C_PORT1=y
|
||||
CONFIG_SCCB_CLK_FREQ=100000
|
||||
# CONFIG_GC_SENSOR_WINDOWING_MODE is not set
|
||||
CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y
|
||||
CONFIG_CAMERA_CORE0=y
|
||||
# CONFIG_CAMERA_CORE1 is not set
|
||||
# CONFIG_CAMERA_NO_AFFINITY is not set
|
||||
|
||||
@@ -63,6 +63,7 @@ CONFIG_BOOTLOADER_WDT_TIME_MS=9000
|
||||
# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set
|
||||
CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0
|
||||
# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set
|
||||
CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
# end of Bootloader config
|
||||
|
||||
#
|
||||
@@ -303,9 +304,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
|
||||
|
||||
#
|
||||
@@ -532,6 +533,8 @@ CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y
|
||||
CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y
|
||||
# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set
|
||||
# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set
|
||||
# CONFIG_ESP_SYSTEM_PSRAM_LEAKAGE_WORKAROUND is not set
|
||||
# CONFIG_ESP_SYSTEM_FLASH_LEAKAGE_WORKAROUND is not set
|
||||
|
||||
#
|
||||
# Memory protection
|
||||
@@ -657,6 +660,10 @@ CONFIG_FMB_SERIAL_BUF_SIZE=256
|
||||
CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8
|
||||
CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000
|
||||
CONFIG_FMB_PORT_TASK_PRIO=10
|
||||
# CONFIG_FMB_PORT_TASK_AFFINITY_NO_AFFINITY is not set
|
||||
CONFIG_FMB_PORT_TASK_AFFINITY_CPU0=y
|
||||
# CONFIG_FMB_PORT_TASK_AFFINITY_CPU1 is not set
|
||||
CONFIG_FMB_PORT_TASK_AFFINITY=0x0
|
||||
CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y
|
||||
CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233
|
||||
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||
@@ -666,6 +673,8 @@ CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20
|
||||
CONFIG_FMB_TIMER_PORT_ENABLED=y
|
||||
CONFIG_FMB_TIMER_GROUP=0
|
||||
CONFIG_FMB_TIMER_INDEX=0
|
||||
CONFIG_FMB_MASTER_TIMER_GROUP=0
|
||||
CONFIG_FMB_MASTER_TIMER_INDEX=0
|
||||
# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set
|
||||
# end of Modbus configuration
|
||||
|
||||
@@ -1212,11 +1221,19 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||
CONFIG_OV2640_SUPPORT=y
|
||||
# CONFIG_OV3660_SUPPORT is not set
|
||||
# CONFIG_OV5640_SUPPORT is not set
|
||||
CONFIG_GC2145_SUPPORT=y
|
||||
CONFIG_GC032A_SUPPORT=y
|
||||
CONFIG_GC0308_SUPPORT=y
|
||||
CONFIG_BF3005_SUPPORT=y
|
||||
# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set
|
||||
CONFIG_SCCB_HARDWARE_I2C_PORT1=y
|
||||
CONFIG_SCCB_CLK_FREQ=100000
|
||||
# CONFIG_GC_SENSOR_WINDOWING_MODE is not set
|
||||
CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y
|
||||
CONFIG_CAMERA_CORE0=y
|
||||
# CONFIG_CAMERA_CORE1 is not set
|
||||
# CONFIG_CAMERA_NO_AFFINITY is not set
|
||||
CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768
|
||||
# end of Camera configuration
|
||||
# end of Component config
|
||||
|
||||
@@ -1225,3 +1242,162 @@ CONFIG_CAMERA_CORE0=y
|
||||
#
|
||||
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
|
||||
# end of Compatibility options
|
||||
|
||||
# Deprecated options for backward compatibility
|
||||
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=3
|
||||
# CONFIG_APP_ROLLBACK_ENABLE is not set
|
||||
# CONFIG_FLASH_ENCRYPTION_ENABLED is not set
|
||||
# CONFIG_FLASHMODE_QIO is not set
|
||||
# CONFIG_FLASHMODE_QOUT is not set
|
||||
CONFIG_FLASHMODE_DIO=y
|
||||
# CONFIG_FLASHMODE_DOUT is not set
|
||||
# CONFIG_MONITOR_BAUD_9600B is not set
|
||||
# CONFIG_MONITOR_BAUD_57600B is not set
|
||||
CONFIG_MONITOR_BAUD_115200B=y
|
||||
# CONFIG_MONITOR_BAUD_230400B is not set
|
||||
# CONFIG_MONITOR_BAUD_921600B is not set
|
||||
# CONFIG_MONITOR_BAUD_2MB is not set
|
||||
# CONFIG_MONITOR_BAUD_OTHER is not set
|
||||
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=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
||||
# 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
|
||||
# CONFIG_STACK_CHECK_ALL is not set
|
||||
# CONFIG_WARN_WRITE_STRINGS is not set
|
||||
# CONFIG_DISABLE_GCC8_WARNINGS is not set
|
||||
# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
|
||||
CONFIG_ESP32_APPTRACE_DEST_NONE=y
|
||||
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
|
||||
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
|
||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0
|
||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
|
||||
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
|
||||
CONFIG_ADC2_DISABLE_DAC=y
|
||||
CONFIG_SPIRAM_SUPPORT=y
|
||||
# CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST is not set
|
||||
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
|
||||
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
|
||||
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
|
||||
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
|
||||
# CONFIG_ULP_COPROC_ENABLED is not set
|
||||
CONFIG_ULP_COPROC_RESERVE_MEM=0
|
||||
CONFIG_BROWNOUT_DET=y
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set
|
||||
CONFIG_BROWNOUT_DET_LVL=0
|
||||
CONFIG_REDUCE_PHY_TX_POWER=y
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set
|
||||
# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set
|
||||
# CONFIG_NO_BLOBS is not set
|
||||
# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
|
||||
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
|
||||
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304
|
||||
CONFIG_MAIN_TASK_STACK_SIZE=3584
|
||||
CONFIG_IPC_TASK_STACK_SIZE=1024
|
||||
CONFIG_CONSOLE_UART_DEFAULT=y
|
||||
# CONFIG_CONSOLE_UART_CUSTOM is not set
|
||||
# CONFIG_ESP_CONSOLE_UART_NONE is not set
|
||||
CONFIG_CONSOLE_UART=y
|
||||
CONFIG_CONSOLE_UART_NUM=0
|
||||
CONFIG_CONSOLE_UART_BAUDRATE=115200
|
||||
CONFIG_INT_WDT=y
|
||||
CONFIG_INT_WDT_TIMEOUT_MS=300
|
||||
CONFIG_INT_WDT_CHECK_CPU1=y
|
||||
CONFIG_TASK_WDT=y
|
||||
# CONFIG_TASK_WDT_PANIC is not set
|
||||
CONFIG_TASK_WDT_TIMEOUT_S=5
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
|
||||
# CONFIG_EVENT_LOOP_PROFILING is not set
|
||||
CONFIG_POST_EVENTS_FROM_ISR=y
|
||||
CONFIG_POST_EVENTS_FROM_IRAM_ISR=y
|
||||
# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set
|
||||
CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y
|
||||
# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set
|
||||
# CONFIG_ESP32S2_PANIC_GDBSTUB is not set
|
||||
CONFIG_TIMER_TASK_STACK_SIZE=3584
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
|
||||
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
|
||||
CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150
|
||||
CONFIG_MB_MASTER_DELAY_MS_CONVERT=200
|
||||
CONFIG_MB_QUEUE_LENGTH=20
|
||||
CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096
|
||||
CONFIG_MB_SERIAL_BUF_SIZE=256
|
||||
CONFIG_MB_SERIAL_TASK_PRIO=10
|
||||
CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y
|
||||
CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233
|
||||
CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||
CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
|
||||
CONFIG_MB_CONTROLLER_STACK_SIZE=4096
|
||||
CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
|
||||
CONFIG_MB_TIMER_PORT_ENABLED=y
|
||||
CONFIG_MB_TIMER_GROUP=0
|
||||
CONFIG_MB_TIMER_INDEX=0
|
||||
# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set
|
||||
CONFIG_TIMER_TASK_PRIORITY=1
|
||||
CONFIG_TIMER_TASK_STACK_DEPTH=2048
|
||||
CONFIG_TIMER_QUEUE_LENGTH=10
|
||||
# CONFIG_L2_TO_L3_COPY is not set
|
||||
# CONFIG_USE_ONLY_LWIP_SELECT is not set
|
||||
CONFIG_ESP_GRATUITOUS_ARP=y
|
||||
CONFIG_GARP_TMR_INTERVAL=60
|
||||
CONFIG_TCPIP_RECVMBOX_SIZE=32
|
||||
CONFIG_TCP_MAXRTX=12
|
||||
CONFIG_TCP_SYNMAXRTX=12
|
||||
CONFIG_TCP_MSS=1440
|
||||
CONFIG_TCP_MSL=60000
|
||||
CONFIG_TCP_SND_BUF_DEFAULT=5744
|
||||
CONFIG_TCP_WND_DEFAULT=5744
|
||||
CONFIG_TCP_RECVMBOX_SIZE=6
|
||||
CONFIG_TCP_QUEUE_OOSEQ=y
|
||||
# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
|
||||
CONFIG_TCP_OVERSIZE_MSS=y
|
||||
# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set
|
||||
# CONFIG_TCP_OVERSIZE_DISABLE is not set
|
||||
CONFIG_UDP_RECVMBOX_SIZE=6
|
||||
CONFIG_TCPIP_TASK_STACK_SIZE=3072
|
||||
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
|
||||
# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set
|
||||
# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set
|
||||
CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF
|
||||
# CONFIG_PPP_SUPPORT is not set
|
||||
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
|
||||
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
|
||||
CONFIG_ESP32_PTHREAD_STACK_MIN=768
|
||||
CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y
|
||||
# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set
|
||||
# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set
|
||||
CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1
|
||||
CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"
|
||||
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
|
||||
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set
|
||||
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set
|
||||
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
|
||||
CONFIG_SUPPORT_TERMIOS=y
|
||||
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
|
||||
CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
|
||||
# End of deprecated options
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="2029bd6";
|
||||
const char* GIT_REV="641cc86";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="master";
|
||||
const char* BUILD_TIME="2022-01-29 15:53";
|
||||
const char* GIT_BRANCH="rolling";
|
||||
const char* BUILD_TIME="2022-02-06 18:35";
|
||||
Binary file not shown.
BIN
firmware/dig-s1-q-20220206.tflite
Normal file
BIN
firmware/dig-s1-q-20220206.tflite
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,7 +21,7 @@ FlipImageSize = false
|
||||
/config/ref1.jpg 442 142
|
||||
|
||||
[Digits]
|
||||
Model = /config/dig-s2-q-20220104.tflite
|
||||
Model = /config/dig-s1-q-20220206.tflite
|
||||
;LogImageLocation = /log/digit
|
||||
;LogfileRetentionInDays = 3
|
||||
ModelInputSize = 20 32
|
||||
|
||||
BIN
sd-card/config/dig-s1-q-20220206.tflite
Normal file
BIN
sd-card/config/dig-s1-q-20220206.tflite
Normal file
Binary file not shown.
Binary file not shown.
@@ -291,7 +291,8 @@ textarea {
|
||||
<class id="Digits_Model_text" style="color:black;">Model</class>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="Digits_Model_value1">
|
||||
<select id="Digits_Model_value1">
|
||||
</select>
|
||||
</td>
|
||||
<td style="font-size: 80%;">
|
||||
Path to CNN model file for image recognition
|
||||
@@ -347,7 +348,10 @@ textarea {
|
||||
<tr>
|
||||
<td width="20px" style="padding-left: 40px;"> </td>
|
||||
<td width="200px"> <class id="Analog_Model_text" style="color:black;">Model</class> </td>
|
||||
<td> <input type="text" id="Analog_Model_value1"> </td>
|
||||
<td>
|
||||
<select id="Analog_Model_value1">
|
||||
</select>
|
||||
</td>
|
||||
<td style="font-size: 80%;"> Path to CNN model file for image recognition</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -466,7 +470,7 @@ textarea {
|
||||
<tr>
|
||||
<td style="padding-left: 40px;" colspan="4">
|
||||
<br>
|
||||
<b>Postprocessing Individual Paramters:
|
||||
<b>Postprocessing Individual Parameters:
|
||||
<select id="Numbers_value1" onchange="numberChanged()">
|
||||
<option value="0" selected>default</option>
|
||||
<option value="1" >NT</option>
|
||||
@@ -1727,12 +1731,12 @@ function UpdateInput() {
|
||||
WriteParameter(param, category, "Alignment", "SearchFieldY", false);
|
||||
WriteParameter(param, category, "Alignment", "AlignmentAlgo", true);
|
||||
|
||||
WriteParameter(param, category, "Digits", "Model", false);
|
||||
// WriteParameter(param, category, "Digits", "Model", false);
|
||||
WriteParameter(param, category, "Digits", "LogImageLocation", true);
|
||||
WriteParameter(param, category, "Digits", "LogfileRetentionInDays", true);
|
||||
WriteParameter(param, category, "Digits", "ModelInputSize", false);
|
||||
|
||||
WriteParameter(param, category, "Analog", "Model", false);
|
||||
// WriteParameter(param, category, "Analog", "Model", false);
|
||||
WriteParameter(param, category, "Analog", "LogImageLocation", true);
|
||||
WriteParameter(param, category, "Analog", "LogfileRetentionInDays", true);
|
||||
// WriteParameter(param, category, "Analog", "ExtendedResolution", true);
|
||||
@@ -1770,6 +1774,34 @@ function UpdateInput() {
|
||||
WriteParameter(param, category, "System", "TimeZone", true);
|
||||
WriteParameter(param, category, "System", "Hostname", true);
|
||||
WriteParameter(param, category, "System", "TimeServer", true);
|
||||
|
||||
WriteModelFiles();
|
||||
}
|
||||
|
||||
function WriteModelFiles()
|
||||
{
|
||||
list_tflite = getTFLITEList();
|
||||
|
||||
var _index1 = document.getElementById("Digits_Model_value1");
|
||||
var _index2 = document.getElementById("Analog_Model_value1");
|
||||
while (_index1.length)
|
||||
_index1.remove(0);
|
||||
while (_index2.length)
|
||||
_index2.remove(0);
|
||||
|
||||
for (var i = 0; i < list_tflite.length; ++i){
|
||||
var option1 = document.createElement("option");
|
||||
var option2 = document.createElement("option");
|
||||
option1.text = list_tflite[i];
|
||||
option1.value = list_tflite[i];
|
||||
option2.text = list_tflite[i];
|
||||
option2.value = list_tflite[i];
|
||||
_index1.add(option1);
|
||||
_index2.add(option2);
|
||||
}
|
||||
|
||||
WriteParameter(param, category, "Analog", "Model", false);
|
||||
WriteParameter(param, category, "Digits", "Model", false);
|
||||
}
|
||||
|
||||
function ReadParameterAll()
|
||||
|
||||
@@ -13,7 +13,7 @@ function getbasepath(){
|
||||
{
|
||||
// host = "http://192.168.2.219"; // jomjol interner test
|
||||
// host = "http://192.168.178.46"; // jomjol interner test
|
||||
host = "http://192.168.178.62"; // jomjol interner Real
|
||||
host = "http://192.168.178.60"; // jomjol interner Real
|
||||
// host = "http://192.168.43.191";
|
||||
// host = "."; // jomjol interner localhost
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ li.dropdown {
|
||||
var basepath = "http://192.168.178.22";
|
||||
|
||||
|
||||
function LoadHostname() {
|
||||
function LoadHostname() {
|
||||
_basepath = getbasepath();
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<style>
|
||||
h1 {font-size: 2em;}
|
||||
h2 {font-size: 1.5em;}
|
||||
h3 {font-size: 1.2em;}
|
||||
h3 {font-size: 1.2em;}
|
||||
p {font-size: 1em;}
|
||||
|
||||
input[type=number] {
|
||||
@@ -114,6 +114,36 @@ input[type=number] {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>4. Upload neural network definition (tfl/tflite file)</h2>
|
||||
<table class="fixed" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="newfiletfl">Select the tfl/tflite file</label>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<input id="newfiletfl" type="file" onchange="setpathtfl()" style="width:100%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="filepathtfl">Set path on server</label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="filepathtfl" type="text" style="width:100%;" readonly>
|
||||
</td>
|
||||
<td>
|
||||
<button id="uploadtfl" type="button" onclick="uploadtfl()" disabled>Upload</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
The file must be activated in the config.ini file.
|
||||
</table>
|
||||
|
||||
|
||||
<script type="text/javascript" src="./gethost.js"></script>
|
||||
|
||||
@@ -126,6 +156,7 @@ function init(){
|
||||
document.getElementById("uploadhtml").disabled = true;
|
||||
document.getElementById("doUpdate").disabled = true;
|
||||
document.getElementById("doUpdatehtml").disabled = true;
|
||||
document.getElementById("uploadtfl").disabled = true;
|
||||
}
|
||||
|
||||
function doUpdate() {
|
||||
@@ -203,6 +234,17 @@ function setpathhtml() {
|
||||
}
|
||||
|
||||
|
||||
function setpathtfl() {
|
||||
var nameneu = document.getElementById("newfiletfl").value;
|
||||
nameneu = nameneu.split(/[\\\/]/).pop();
|
||||
var fileserverpraefix = "/config/" + nameneu;
|
||||
document.getElementById("filepathtfl").value = fileserverpraefix;
|
||||
document.getElementById("uploadtfl").disabled = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function upload() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
@@ -342,6 +384,74 @@ function uploadhtml() {
|
||||
}
|
||||
|
||||
|
||||
function uploadtfl() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
/* first delete the old firmware */
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
/* keine Reaktion, damit sich das Dokument nicht ändert */
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
/* ----------------------------- */
|
||||
|
||||
var filePath = document.getElementById("filepathtfl").value;
|
||||
var upload_path = "/upload/" + filePath;
|
||||
var fileInput = document.getElementById("newfiletfl").files;
|
||||
|
||||
/* Max size of an individual file. Make sure this
|
||||
* value is same as that set in file_server.c */
|
||||
var MAX_FILE_SIZE = 2000*1024;
|
||||
var MAX_FILE_SIZE_STR = "2000KB";
|
||||
|
||||
if (fileInput.length == 0) {
|
||||
alert("No file selected!");
|
||||
} else if (filePath.length == 0) {
|
||||
alert("File path on server is not set!");
|
||||
} else if (filePath.indexOf(' ') >= 0) {
|
||||
alert("File path on server cannot have spaces!");
|
||||
} else if (filePath[filePath.length-1] == '/') {
|
||||
alert("File name not specified after path!");
|
||||
} else if (fileInput[0].size > 2000*1024) {
|
||||
alert("File size must be less than 2000KB!");
|
||||
} else {
|
||||
document.getElementById("newfiletfl").disabled = true;
|
||||
document.getElementById("filepathtfl").disabled = true;
|
||||
document.getElementById("uploadtfl").disabled = true;
|
||||
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
alert("Upload successfull!")
|
||||
document.getElementById("newfiletfl").disabled = false;
|
||||
document.getElementById("filepathtfl").disabled = false;
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var file = fileInput[0];
|
||||
xhttp.open("POST", upload_path, true);
|
||||
xhttp.send(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
init();
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="icon" href="data:,">
|
||||
<title>jomjol - AI on the edge</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
//]]>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<button id="testupdownload" type="button" onclick="testupdownload()">UpDownload</button>
|
||||
|
||||
<h3>It is strongly recommended to update firmware and content of /html directory on SD-card at the same time!</h3>
|
||||
<h2>1. Firmware Update</h2>
|
||||
<table class="fixed" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="newfile">Select the firmware file</label>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<input id="newfile" type="file" onchange="setpath()" style="width:100%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="filepath">Set path on server</label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="filepath" type="text" style="width:100%;" readonly>
|
||||
</td>
|
||||
<td>
|
||||
<button id="upload" type="button" onclick="upload()">Upload</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="doUpdate" type="button" onclick="doUpdate()">Flash the firmware</button> (Takes about 60s)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>2. Update /html directory</h2>
|
||||
<table class="fixed" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="newfilehtml">Select the zipped /html content</label>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<input id="newfilehtml" type="file" onchange="setpathhtml()" style="width:100%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="filepathhtml">Set path on server</label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="filepathhtml" type="text" style="width:100%;" readonly>
|
||||
</td>
|
||||
<td>
|
||||
<button id="uploadhtml" type="button" onclick="uploadhtml()">Upload</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="doUpdatehtml" type="button" onclick="doUpdatehtml()">Update "/html" directory</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>3. Reboot</h2>
|
||||
<table class="fixed" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<button id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="./gethost.js"></script>
|
||||
|
||||
|
||||
<script language="JavaScript">
|
||||
|
||||
function testupdownload(){
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("get", "https://github.com/jomjol/AI-on-the-edge-device/raw/master/firmware/html.zip", true);
|
||||
xhr.onload = function () {
|
||||
xhr.close();
|
||||
var xhr2 = new XMLHttpRequest();
|
||||
xhr2.open("post", "/upload/firmware/html2.zip", true);
|
||||
xhr2.send(xhr.response);
|
||||
}
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function init(){
|
||||
document.getElementById("reboot").disabled = true;
|
||||
document.getElementById("upload").disabled = true;
|
||||
document.getElementById("uploadhtml").disabled = true;
|
||||
document.getElementById("doUpdate").disabled = true;
|
||||
document.getElementById("doUpdatehtml").disabled = true;
|
||||
}
|
||||
|
||||
function doUpdate() {
|
||||
if (confirm("Are you sure to update the firmware?")) {
|
||||
var stringota = "/ota?file=firmware.bin";
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
document.getElementById("reboot").disabled = false;
|
||||
alert("Flash successfull - Reboot necessary to make changes active.");
|
||||
/* keine Reaktion, damit sich das Dokument nicht ändert */
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", stringota, true);
|
||||
xhttp.send();
|
||||
}
|
||||
}
|
||||
|
||||
function doUpdatehtml() {
|
||||
if (confirm("Are you sure to update the /html content?")) {
|
||||
var stringota = "/ota?task=unziphtml";
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
document.getElementById("reboot").disabled = false;
|
||||
alert("Update /html successful!");
|
||||
/* keine Reaktion, damit sich das Dokument nicht ändert */
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", stringota, true);
|
||||
xhttp.send();
|
||||
}
|
||||
}
|
||||
|
||||
function doReboot() {
|
||||
if (confirm("Are you sure you want to reboot the ESP32?")) {
|
||||
var stringota = "/reboot";
|
||||
window.location = stringota;
|
||||
window.location.href = stringota;
|
||||
window.location.assign(stringota);
|
||||
window.location.replace(stringota);
|
||||
}
|
||||
}
|
||||
|
||||
function setpath() {
|
||||
var fileserverpraefix = "/firmware/firmware.bin";
|
||||
document.getElementById("filepath").value = fileserverpraefix;
|
||||
document.getElementById("upload").disabled = false;
|
||||
}
|
||||
|
||||
function setpathhtml() {
|
||||
var fileserverpraefix = "/firmware/html.zip";
|
||||
document.getElementById("filepathhtml").value = fileserverpraefix;
|
||||
document.getElementById("uploadhtml").disabled = false;
|
||||
}
|
||||
|
||||
|
||||
function upload() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
/* first delete the old firmware */
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
/* keine Reaktion, damit sich das Dokument nicht ändert */
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", "/ota?delete=firmware.bin", false);
|
||||
xhttp.send();
|
||||
/* ----------------------------- */
|
||||
|
||||
var filePath = document.getElementById("filepath").value;
|
||||
var upload_path = "/upload/" + filePath;
|
||||
var fileInput = document.getElementById("newfile").files;
|
||||
|
||||
/* Max size of an individual file. Make sure this
|
||||
* value is same as that set in file_server.c */
|
||||
var MAX_FILE_SIZE = 2000*1024;
|
||||
var MAX_FILE_SIZE_STR = "2000KB";
|
||||
|
||||
if (fileInput.length == 0) {
|
||||
alert("No file selected!");
|
||||
} else if (filePath.length == 0) {
|
||||
alert("File path on server is not set!");
|
||||
} else if (filePath.indexOf(' ') >= 0) {
|
||||
alert("File path on server cannot have spaces!");
|
||||
} else if (filePath[filePath.length-1] == '/') {
|
||||
alert("File name not specified after path!");
|
||||
} else if (fileInput[0].size > 2000*1024) {
|
||||
alert("File size must be less than 2000KB!");
|
||||
} else {
|
||||
document.getElementById("newfile").disabled = true;
|
||||
document.getElementById("filepath").disabled = true;
|
||||
document.getElementById("upload").disabled = true;
|
||||
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
alert("Upload successfull!")
|
||||
// document.reload();
|
||||
document.getElementById("reboot").disabled = false;
|
||||
document.getElementById("doUpdate").disabled = false;
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var file = fileInput[0];
|
||||
xhttp.open("POST", upload_path, true);
|
||||
xhttp.send(file);
|
||||
}
|
||||
}
|
||||
|
||||
function uploadhtml() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
/* first delete the old firmware */
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
/* keine Reaktion, damit sich das Dokument nicht ändert */
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", "/ota?delete=html.zip", false);
|
||||
xhttp.send();
|
||||
/* ----------------------------- */
|
||||
|
||||
var filePath = document.getElementById("filepathhtml").value;
|
||||
var upload_path = "/upload/" + filePath;
|
||||
var fileInput = document.getElementById("newfilehtml").files;
|
||||
|
||||
/* Max size of an individual file. Make sure this
|
||||
* value is same as that set in file_server.c */
|
||||
var MAX_FILE_SIZE = 2000*1024;
|
||||
var MAX_FILE_SIZE_STR = "2000KB";
|
||||
|
||||
if (fileInput.length == 0) {
|
||||
alert("No file selected!");
|
||||
} else if (filePath.length == 0) {
|
||||
alert("File path on server is not set!");
|
||||
} else if (filePath.indexOf(' ') >= 0) {
|
||||
alert("File path on server cannot have spaces!");
|
||||
} else if (filePath[filePath.length-1] == '/') {
|
||||
alert("File name not specified after path!");
|
||||
} else if (fileInput[0].size > 2000*1024) {
|
||||
alert("File size must be less than 2000KB!");
|
||||
} else {
|
||||
document.getElementById("newfilehtml").disabled = true;
|
||||
document.getElementById("filepathhtml").disabled = true;
|
||||
document.getElementById("uploadhtml").disabled = true;
|
||||
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
alert("Upload successfull!")
|
||||
// document.reload();
|
||||
document.getElementById("reboot").disabled = false;
|
||||
document.getElementById("doUpdatehtml").disabled = false;
|
||||
} else if (xhttp.status == 0) {
|
||||
alert("Server closed the connection abruptly!");
|
||||
UpdatePage();
|
||||
} else {
|
||||
alert(xhttp.status + " Error!\n" + xhttp.responseText);
|
||||
UpdatePage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var file = fileInput[0];
|
||||
xhttp.open("POST", upload_path, true);
|
||||
xhttp.send(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
init();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body></html>
|
||||
@@ -10,6 +10,38 @@ var ref = new Array(2);
|
||||
var NUMBERS = new Array(0);
|
||||
var REFERENCES = new Array(0);
|
||||
|
||||
|
||||
function getTFLITEList() {
|
||||
_basepath = getbasepath();
|
||||
tflitelist = "";
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.addEventListener('load', function(event) {
|
||||
if (xhttp.status >= 200 && xhttp.status < 300) {
|
||||
tflitelist = xhttp.responseText;
|
||||
} else {
|
||||
console.warn(request.statusText, request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
url = _basepath + '/editflow.html?task=tflite';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
// alert("Loading Hostname failed");
|
||||
}
|
||||
|
||||
tflitelist = tflitelist.split("\t");
|
||||
tflitelist.pop();
|
||||
|
||||
return tflitelist;
|
||||
}
|
||||
|
||||
|
||||
function ParseConfig() {
|
||||
config_split = config_gesamt.split("\n");
|
||||
var aktline = 0;
|
||||
|
||||
@@ -1 +1 @@
|
||||
12.0.0
|
||||
13.0.0
|
||||
Reference in New Issue
Block a user