diff --git a/app_httpd.cpp b/app_httpd.cpp index fb126f3..9f10f5d 100644 --- a/app_httpd.cpp +++ b/app_httpd.cpp @@ -623,9 +623,9 @@ static esp_err_t cmd_handler(httpd_req_t *req){ } else if(!strcmp(variable, "reboot")) { Serial.print("REBOOT requested"); - for (int i=0; i<20; i++) { + for (int i=0; i<16; i++) { flashLED(50); - delay(150); + delay(120); Serial.print('.'); } Serial.printf(" Thats all folks!\n\n"); @@ -730,7 +730,7 @@ static esp_err_t dump_handler(httpd_req_t *req){ Serial.println("\nDump Requested"); Serial.print("Preferences file: "); dumpPrefs(SPIFFS); - static char dumpOut[1200] = ""; + static char dumpOut[1500] = ""; char * d = dumpOut; // Header d+= sprintf(d,"\n"); @@ -817,9 +817,12 @@ static esp_err_t dump_handler(httpd_req_t *req){ // Footer d+= sprintf(d,"
\n"); - d+= sprintf(d,"\n"); + d+= sprintf(d,"\n"); d+= sprintf(d,"\n"); - d+= sprintf(d,"
\n\n\n"); + d+= sprintf(d,"\n\n"); + // A javascript timer to refresh the page every minute. + d+= sprintf(d,"\n\n"); *d++ = 0; httpd_resp_set_type(req, "text/html"); httpd_resp_set_hdr(req, "Content-Encoding", "identity"); diff --git a/index_ov2640.h b/index_ov2640.h index 9d75f31..8c75705 100644 --- a/index_ov2640.h +++ b/index_ov2640.h @@ -293,6 +293,7 @@ const uint8_t index_ov2640_html[] = R"=====( var streamURL = 'Undefined'; var viewerURL = 'Undefined'; + const header = document.getElementById('logo') const settings = document.getElementById('sidebar') const waitSettings = document.getElementById('wait-settings') const lampGroup = document.getElementById('lamp-group') @@ -632,7 +633,11 @@ const uint8_t index_ov2640_html[] = R"=====( if (confirm("Reboot the Camera Module?")) { updateConfig(rebootButton); // Some sort of countdown here? - location.reload(); + hide(settings); + header.innerHTML = '

Rebooting!


Page will reload after 20 seconds.'; + setTimeout(function() { + location.replace(document.URL); + }, 20000); } }