mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-06 11:36:51 +03:00
Rolling 20220919
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@
|
||||
/sd-card/htm./.vscode/
|
||||
/code/build
|
||||
/sd-card/html/debug/
|
||||
/firmware/
|
||||
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
|
||||
@@ -40,6 +40,13 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
|
||||
|
||||
------
|
||||
|
||||
##### Rolling (2022-09-19)
|
||||
|
||||
- Integrated version info better into the html (main page, logfile)
|
||||
- Updated autobuild
|
||||
- Remove `/firmware` from GitHub.
|
||||
- If you want to get the latest firmware and html files, please download from the automated build action.
|
||||
|
||||
##### Rolling (2022-09-18)
|
||||
|
||||
- Updated PostProcessing with respect to `CheckDigitIncreaseConsistency`
|
||||
|
||||
@@ -302,7 +302,7 @@ esp_err_t handler_ota_update(httpd_req_t *req)
|
||||
char _valuechar[30];
|
||||
std::string fn = "/sdcard/firmware/";
|
||||
bool _file_del = false;
|
||||
std::string _task;
|
||||
std::string _task = "";
|
||||
|
||||
if (httpd_req_get_url_query_str(req, _query, 200) == ESP_OK)
|
||||
{
|
||||
@@ -419,6 +419,7 @@ esp_err_t handler_ota_update(httpd_req_t *req)
|
||||
|
||||
if (_task.compare("unziphtml") == 0)
|
||||
{
|
||||
printf("Task unziphmtl\n");
|
||||
std::string in, out, zw;
|
||||
|
||||
in = "/sdcard/firmware/html.zip";
|
||||
@@ -428,24 +429,30 @@ esp_err_t handler_ota_update(httpd_req_t *req)
|
||||
|
||||
unzip(in, out+"/");
|
||||
zw = "HTML Update Successfull!<br><br>No reboot necessary";
|
||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||
httpd_resp_send(req, zw.c_str(), strlen(zw.c_str()));
|
||||
httpd_resp_sendstr_chunk(req, NULL);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (_file_del)
|
||||
{
|
||||
printf("Delete !! _file_del: %s\n", fn.c_str());
|
||||
struct stat file_stat;
|
||||
if (stat(fn.c_str(), &file_stat) != -1) {
|
||||
int _result = stat(fn.c_str(), &file_stat);
|
||||
printf("Ergebnis %d\n", _result);
|
||||
if (_result == 0) {
|
||||
printf("Deleting file : %s", fn.c_str());
|
||||
/* Delete file */
|
||||
unlink(fn.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("File does not exist: %s\n", fn.c_str());
|
||||
}
|
||||
/* Respond with an empty chunk to signal HTTP response completion */
|
||||
std::string zw = "file deleted!\n";
|
||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||
std::string zw = "file deleted\n";
|
||||
printf((zw + "\n").c_str());
|
||||
httpd_resp_send(req, zw.c_str(), strlen(zw.c_str()));
|
||||
httpd_resp_send_chunk(req, NULL, 0);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="645fbf0";
|
||||
const char* GIT_REV="45c9914";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="rolling";
|
||||
const char* BUILD_TIME="2022-09-18 18:22";
|
||||
const char* BUILD_TIME="2022-09-19 20:06";
|
||||
1
code/sd-card/html/version.txt
Normal file
1
code/sd-card/html/version.txt
Normal file
@@ -0,0 +1 @@
|
||||
rolling, 45c9914,
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="645fbf0";
|
||||
const char* GIT_REV="45c9914";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="rolling";
|
||||
const char* BUILD_TIME="2022-09-18 18:22";
|
||||
const char* BUILD_TIME="2022-09-19 20:06";
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -158,8 +158,8 @@ function upload() {
|
||||
|
||||
/* Max size of an individual file. Make sure this
|
||||
* value is same as that set in file_server.c */
|
||||
var MAX_FILE_SIZE = 6000*1024;
|
||||
var MAX_FILE_SIZE_STR = "6MB";
|
||||
var MAX_FILE_SIZE = 8000*1024;
|
||||
var MAX_FILE_SIZE_STR = "8MB";
|
||||
|
||||
if (fileInput.length == 0) {
|
||||
alert("No file selected!");
|
||||
@@ -179,7 +179,7 @@ function upload() {
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
alert("Upload successfull!")
|
||||
// alert("Upload successfull!")
|
||||
// document.reload();
|
||||
document.getElementById("reboot").disabled = false;
|
||||
document.getElementById("doUpdate").disabled = false;
|
||||
@@ -195,9 +195,36 @@ function upload() {
|
||||
|
||||
|
||||
var file = fileInput[0];
|
||||
xhttp.open("POST", upload_path, true);
|
||||
xhttp.open("POST", upload_path, false);
|
||||
xhttp.send(file);
|
||||
}
|
||||
|
||||
alert("Start processing!");
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
/* first delete the old firmware */
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (xhttp.readyState == 4) {
|
||||
if (xhttp.status == 200) {
|
||||
alert("Processing done!\n" + xhttp.responseText);
|
||||
/* 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 _toDo = basepath + "/ota?task=update&file=" + filePath;
|
||||
xhttp.open("GET", _toDo, false);
|
||||
xhttp.send();
|
||||
/* ----------------------------- */
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
# HTML version
|
||||
# Do not edit, it will get be updated by cmake!
|
||||
rolling, 45c9914,
|
||||
Reference in New Issue
Block a user