diff --git a/ESP32_PrusaConnectCam/mcu_cfg.h b/ESP32_PrusaConnectCam/mcu_cfg.h index 95b6b57..1f8cce0 100644 --- a/ESP32_PrusaConnectCam/mcu_cfg.h +++ b/ESP32_PrusaConnectCam/mcu_cfg.h @@ -107,7 +107,7 @@ #define CAMERA_SOFTWARE "Prusa ESP32-cam" ///< Camera software string /* ---------------- TIMELAPS CFG ----------------*/ -#define TIMELAPS_PHOTO_FOLDER "/timelaps" ///< folder for timelaps photos +#define TIMELAPS_PHOTO_FOLDER "/timelapse" ///< folder for timelaps photos #define TIMELAPS_PHOTO_PREFIX "photo" ///< photo name for timelaps #define TIMELAPS_PHOTO_SUFFIX ".jpg" ///< photo file type for timelaps diff --git a/ESP32_PrusaConnectCam/server.cpp b/ESP32_PrusaConnectCam/server.cpp index 9066f23..78e4cf1 100644 --- a/ESP32_PrusaConnectCam/server.cpp +++ b/ESP32_PrusaConnectCam/server.cpp @@ -696,7 +696,13 @@ void Server_InitWebServer_Sets() { if (request->hasParam("timelaps_enable")) { SystemLog.AddEvent(LogLevel_Verbose, F("Set timelaps enable")); - Connect.SetTimeLapsPhotoSaveStatus(Server_TransfeStringToBool(request->getParam("timelaps_enable")->value())); + bool val = Server_TransfeStringToBool(request->getParam("timelaps_enable")->value()); + if ((true == val ) && (SystemLog.GetCardDetectedStatus() == true)) { + Connect.SetTimeLapsPhotoSaveStatus(val); + } else { + Connect.SetTimeLapsPhotoSaveStatus(false); + } + response = true; }