From 49c4bb80fea323b4df1784636b6fa89742c0d993 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 21 Oct 2024 22:23:28 -0400 Subject: [PATCH 1/6] Pluralize seconds. --- ESP32_PrusaConnectCam/WebPage.h | 4 ++-- webpage/scripts.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ESP32_PrusaConnectCam/WebPage.h b/ESP32_PrusaConnectCam/WebPage.h index 28b1687..bb45115 100644 --- a/ESP32_PrusaConnectCam/WebPage.h +++ b/ESP32_PrusaConnectCam/WebPage.h @@ -15,7 +15,7 @@ #define MSG_REBOOT_MCU "Reboot process started, wait several seconds for mcu to boot up. You can close this window now" #define MSG_SAVE_OK_REBOOT "Save OK. Please reboot MCU" ///< WEB app msg save OK -#define MSG_SAVE_OK_WIFI "Save OK. Connecting to Wi-Fi. Please wait several second" +#define MSG_SAVE_OK_WIFI "Save OK. Connecting to Wi-Fi. Please wait several seconds" #define MSG_SAVE_OK "Save cfg OK" ///< WEB app msg save OK #define MSG_SAVE_NOTOK "Save cfg NOT OK!" ///< WEB app msg save NOT OK #define MSG_SCANNING "Scanning Wi-Fi networks. Wait 8s..." ///< WEB app msg Scanning wifi @@ -1342,7 +1342,7 @@ function updateProgress() { function checkUpdate() { var xmlHttp = new XMLHttpRequest(); - alert("Connecting to server... Please wait several second"); + alert("Connecting to server... Please wait several seconds"); xmlHttp.open("GET", "/check_web_ota_update", false); xmlHttp.send(null); alert(xmlHttp.responseText); diff --git a/webpage/scripts.js b/webpage/scripts.js index f206fbd..704bb60 100644 --- a/webpage/scripts.js +++ b/webpage/scripts.js @@ -434,7 +434,7 @@ function updateProgress() { function checkUpdate() { var xmlHttp = new XMLHttpRequest(); - alert("Connecting to server... Please wait several second"); + alert("Connecting to server... Please wait several seconds"); xmlHttp.open("GET", "/check_web_ota_update", false); xmlHttp.send(null); alert(xmlHttp.responseText); From 9b9fc6cf8a25fa41bc7aa477b4651637bc659068 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 21 Oct 2024 22:27:53 -0400 Subject: [PATCH 2/6] Add .gitignore. --- .gitignore | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8289e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,71 @@ +# Created by https://www.toptal.com/developers/gitignore/api/c++,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=c++,macos + +### C++ ### +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/c++,macos + From a80b349576cf7f564938d20cbece79813c820611 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 21 Oct 2024 22:30:56 -0400 Subject: [PATCH 3/6] Wording. --- ESP32_PrusaConnectCam/mcu_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP32_PrusaConnectCam/mcu_cfg.h b/ESP32_PrusaConnectCam/mcu_cfg.h index 3f34cac..d055f88 100644 --- a/ESP32_PrusaConnectCam/mcu_cfg.h +++ b/ESP32_PrusaConnectCam/mcu_cfg.h @@ -110,7 +110,7 @@ #define TIMELAPS_PHOTO_SUFFIX ".jpg" ///< photo file type for timelaps /* ---------------- FACTORY CFG ----------------*/ -#define FACTORY_CFG_PHOTO_REFRESH_INTERVAL 30 ///< in the second +#define FACTORY_CFG_PHOTO_REFRESH_INTERVAL 30 ///< in seconds #define FACTORY_CFG_PHOTO_QUALITY 10 ///< 10-63, lower is better #define FACTORY_CFG_FRAME_SIZE 0 ///< 0 - FRAMESIZE_QVGA, ..., 6 - FRAMESIZE_UXGA. Look function Cfg_TransformFrameSizeDataType #define FACTORY_CFG_BRIGHTNESS 0 ///< from -2 to 2 From b29b541eb33a5c85ab60e06dd7275bbd774fd2e1 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 21 Oct 2024 22:31:03 -0400 Subject: [PATCH 4/6] Add newline at end of file. --- ESP32_PrusaConnectCam/mcu_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP32_PrusaConnectCam/mcu_cfg.h b/ESP32_PrusaConnectCam/mcu_cfg.h index d055f88..7a83648 100644 --- a/ESP32_PrusaConnectCam/mcu_cfg.h +++ b/ESP32_PrusaConnectCam/mcu_cfg.h @@ -311,4 +311,4 @@ #endif -/* EOF */ \ No newline at end of file +/* EOF */ From 39f10d23dfca89ad14cea82a14a719215a7c320f Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 21 Oct 2024 22:51:15 -0400 Subject: [PATCH 5/6] Fix copypasta action comment. --- ESP32_PrusaConnectCam/WebServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP32_PrusaConnectCam/WebServer.cpp b/ESP32_PrusaConnectCam/WebServer.cpp index 082baae..64372ff 100644 --- a/ESP32_PrusaConnectCam/WebServer.cpp +++ b/ESP32_PrusaConnectCam/WebServer.cpp @@ -511,7 +511,7 @@ void Server_InitWebServer_Actions() { ESP.restart(); }); - /* route for change LED status */ + /* route for erasing the SD card */ server.on("/action_sderase", HTTP_GET, [](AsyncWebServerRequest* request) { SystemLog.AddEvent(LogLevel_Verbose, F("WEB server: /action_sderase remove files from SD card")); if (Server_CheckBasicAuth(request) == false) From 4edd60f1c3f672b25c17e7ad28858abf66063dca Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 21 Oct 2024 22:52:59 -0400 Subject: [PATCH 6/6] Clarify comments. --- ESP32_PrusaConnectCam/WebServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ESP32_PrusaConnectCam/WebServer.cpp b/ESP32_PrusaConnectCam/WebServer.cpp index 64372ff..7ac17b8 100644 --- a/ESP32_PrusaConnectCam/WebServer.cpp +++ b/ESP32_PrusaConnectCam/WebServer.cpp @@ -443,7 +443,7 @@ void Server_InitWebServer_Actions() { request->send(200, "text/plain", "Send Photo"); }); - /* route for change LED status */ + /* route to toggle the LED on and off. If the LED is on, this route turns it off, and vice-versa. */ server.on("/action_led", HTTP_GET, [](AsyncWebServerRequest* request) { SystemLog.AddEvent(LogLevel_Verbose, F("WEB server: /action_led Change LED status")); if (Server_CheckBasicAuth(request) == false) @@ -455,7 +455,7 @@ void Server_InitWebServer_Actions() { request->send(200, "text/plain", "Change LED status"); }); - /* route for change LED status */ + /* route to set the LED on or off manually */ server.on("/light", HTTP_GET, [](AsyncWebServerRequest* request) { SystemLog.AddEvent(LogLevel_Verbose, F("WEB server: /light set LED status")); if (Server_CheckBasicAuth(request) == false)