diff --git a/README.md b/README.md index 93b4fbd0..d7746d53 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,12 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571 -##### Rolling - (2020-10-24) +##### Rolling - (2020-10-25) + +* Update digital CNN to v6.5.0 (additional type of numbers trained) +* Update HTML to v1.1.0 - additional host information displayed (hostname, IP, ssid) + +2020-10-24 * Bug-Fixing in case of automated restart diff --git a/code/lib/connect_wlan/connect_wlan.cpp b/code/lib/connect_wlan/connect_wlan.cpp index 8f1186ac..07b5bc6e 100644 --- a/code/lib/connect_wlan/connect_wlan.cpp +++ b/code/lib/connect_wlan/connect_wlan.cpp @@ -22,6 +22,7 @@ static const char *MAIN_TAG = "connect_wlan"; std::string ssid; std::string passphrase; std::string hostname; +std::string ipaddress; std::string std_hostname = "watermeter"; @@ -123,6 +124,7 @@ void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _ho xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY); tcpip_adapter_ip_info_t ip_info; ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info)); + ipaddress = std::string(ip4addr_ntoa(&ip_info.ip)); printf("IPv4 : %s\n", ip4addr_ntoa(&ip_info.ip)); printf("HostName : %s\n", hostname.c_str()); } @@ -191,3 +193,14 @@ void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphra } +std::string getHostname(){ + return hostname; +} + +std::string getIPAddress(){ + return ipaddress; +} + +std::string getSSID(){ + return ssid; +} diff --git a/code/lib/connect_wlan/connect_wlan.h b/code/lib/connect_wlan/connect_wlan.h index faa5c57d..3bc740d8 100644 --- a/code/lib/connect_wlan/connect_wlan.h +++ b/code/lib/connect_wlan/connect_wlan.h @@ -10,4 +10,8 @@ void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _ho void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase, std::string &_hostname); +std::string getHostname(); +std::string getIPAddress(); +std::string getSSID(); + #endif \ No newline at end of file diff --git a/code/lib/jomjol_fileserver_ota/server_ota.cpp b/code/lib/jomjol_fileserver_ota/server_ota.cpp index 773b51d6..bef94bb0 100644 --- a/code/lib/jomjol_fileserver_ota/server_ota.cpp +++ b/code/lib/jomjol_fileserver_ota/server_ota.cpp @@ -402,8 +402,11 @@ void task_reboot(void *pvParameter) 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); + vTaskDelay(5000 / portTICK_PERIOD_MS); + esp_restart(); + hard_restart(); } diff --git a/code/src/server_main.cpp b/code/src/server_main.cpp index b84d782c..e67d47a8 100644 --- a/code/src/server_main.cpp +++ b/code/src/server_main.cpp @@ -7,6 +7,8 @@ #include "time_sntp.h" +#include "connect_wlan.h" + #include "version.h" #include "esp_wifi.h" @@ -94,6 +96,34 @@ esp_err_t info_get_handler(httpd_req_t *req) return ESP_OK; } + if (_task.compare("Hostname") == 0) + { + std::string zw; + zw = std::string(getHostname()); + httpd_resp_sendstr_chunk(req, zw.c_str()); + httpd_resp_sendstr_chunk(req, NULL); + return ESP_OK; + } + + if (_task.compare("IP") == 0) + { + std::string zw; + zw = std::string(getIPAddress()); + httpd_resp_sendstr_chunk(req, zw.c_str()); + httpd_resp_sendstr_chunk(req, NULL); + return ESP_OK; + } + + if (_task.compare("SSID") == 0) + { + std::string zw; + zw = std::string(getSSID()); + httpd_resp_sendstr_chunk(req, zw.c_str()); + httpd_resp_sendstr_chunk(req, NULL); + return ESP_OK; + } + + return ESP_OK; } diff --git a/code/src/version.cpp b/code/src/version.cpp index c1660e4a..1bbc164d 100644 --- a/code/src/version.cpp +++ b/code/src/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="0d90977"; +const char* GIT_REV="1223aa7"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2020-10-24 11:45"; \ No newline at end of file +const char* BUILD_TIME="2020-10-25 19:48"; \ No newline at end of file diff --git a/code/version.cpp b/code/version.cpp index c1660e4a..1bbc164d 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="0d90977"; +const char* GIT_REV="1223aa7"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2020-10-24 11:45"; \ No newline at end of file +const char* BUILD_TIME="2020-10-25 19:48"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index 32739941..5aba167a 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index e80f487a..9b3ffcc2 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ diff --git a/firmware/html.zip b/firmware/html.zip index 47bd7ab7..a5417389 100644 Binary files a/firmware/html.zip and b/firmware/html.zip differ diff --git a/sd-card/config/config.ini b/sd-card/config/config.ini index 17fc2e0e..64219ec0 100644 --- a/sd-card/config/config.ini +++ b/sd-card/config/config.ini @@ -13,7 +13,7 @@ SearchFieldY = 20 [Digits] -Model=/config/dig0640s3.tflite +Model=/config/dig0650s3.tflite LogImageLocation = /log/digit ModelInputSize 20, 32 digit1, 306, 120, 37, 67 diff --git a/sd-card/config/dig0640s3.tflite b/sd-card/config/dig0640s3.tflite deleted file mode 100644 index 3bc9e686..00000000 Binary files a/sd-card/config/dig0640s3.tflite and /dev/null differ diff --git a/sd-card/config/dig0650s3.tflite b/sd-card/config/dig0650s3.tflite new file mode 100644 index 00000000..56ac6a92 Binary files /dev/null and b/sd-card/config/dig0650s3.tflite differ diff --git a/sd-card/html/index.html b/sd-card/html/index.html index 3989cd60..36e2fa78 100644 --- a/sd-card/html/index.html +++ b/sd-card/html/index.html @@ -73,8 +73,8 @@ li.dropdown { -

Watermeter - AI on the edge

-

An ESP32 all in neural network recognition system

+

Digitizer - AI on the edge

+

An ESP32 all inclusive neural network recognition system for meter digitalization