Commit Graph

15 Commits (bcd9a7279ca4a8c609b7ad32a61860e302f2ea46)

Author SHA1 Message Date
Robert Pouliot bcd9a7279c Fix crashes, races and SD/WiFi issues; per-day timelapse folders
Bug fixes against v1.1.2, tested on Freenove ESP32-S3-WROOM (OV3660),
arduino-esp32 3.3.11. Details in FIXES_SUMMARY.md.

Crashes and hangs
- Stack overflow in CheckMicroSdCard (#145); stacks sized from measured
  high-water marks, never below master; per-task stack report in telemetry
- NULL deref in /saved-photo.jpg; NULL guards on sensor and EXIF allocations
- OTA version check ran inside the async web handler (boot loop); now
  deferred to the system task
- udp_new_ip_type assert: SNTP stopped after sync, OTA check waits for NTP
- Divide-by-zero on SD card removal
- Busy-wait response loops (PrusaConnect, OTA) starved IDLE0 -> task WDT
- setTimeout() takes seconds: 1000 meant ~16 min

Camera
- Frame buffer returned multiple times per stream teardown
- Reinit frees buffers under the frame-buffer lock
- Capture failure skipped the reinit recovery and left the flash on
- Retry loop leaked a driver buffer per short frame
- Two semaphore leaks in CaptureStream(); stream failure now detectable
- OV3660 lost settings written right after init

Concurrency
- Recursive mutexes for SD card, log rotation, EEPROM and WiFi state
- Task WDT subscribe race: each task subscribes itself
- TWDT already initialised by the core: reconfigure only

Other
- Freenove: XCLK drive strength lowered (harmonics desensed 2.4 GHz WiFi),
  SD at 20 MHz (esp-idf#8521), DHT11 enabled on GPIO47
- Snapshots sent as image/jpeg (image/jpg was not shown in Prusa Connect)
- Second WiFi credential save failed ("sta is connecting")
- isCardCorrupted() misread an empty card as missing
- Log level checked before taking the log lock
- Timelapse: one folder per day, /timelapse/YYYY-MM-DD/YYYY-MM-DD_HH-MM-SS.jpg,
  skipped until NTP sync (FAT directory scans grow with file count)
- Web server started after all subsystems
- README: core and library versions
2026-10-11 22:01:40 -04:00
Miroslav Pivovarsky 20d030c808 added default cfg for the external temperature sensor 2024-07-12 21:53:50 +02:00
Miroslav Pivovarsky b64d86d308 "Added support for an external temperature sensor to more boards. 2024-07-12 21:51:29 +02:00
Miroslav Pivovarsky e99a5b6afa First version of the external temperature/humidity sensor 2024-07-12 21:44:08 +02:00
Miroslav Pivovarsky d792a1c714 update logs 2024-06-29 17:30:18 +02:00
Miroslav Pivovarsky 213e26d1e0 update FLASH led code 2024-06-27 22:23:02 +02:00
Miroslav Pivovarsky 68e26390ac updated logging and web design 2024-05-27 17:53:04 +02:00
Miroslav Pivovarsky 55bdcecf84 added saving image snapshot to micro SD card 2024-05-27 17:42:44 +02:00
Miroslav Pivovarsky 527f2a53ae added photo EXIF metadata 2024-05-27 17:15:15 +02:00
Miroslav Pivovarsky 49f89e94fd added test parts of the code for various errors 2024-05-13 21:53:56 +02:00
Miroslav Pivovarsky b092a215e2 Added the option to use a static IP address in Wi-Fi client mode. 2024-05-10 23:42:03 +02:00
Miroslav Pivovarsky 4692f10340 Added the option to disable the service AP after MCU startup 2024-05-10 23:35:08 +02:00
Miroslav Pivovarsky 449bb07b58 Fixed memory utilization issue. Utilized F() macro for moving strings from RAM to PROGMEM. 2024-05-10 23:29:55 +02:00
Miroslav Pivovarsky ebb0e41e5f Implemented WEB server control during photo upload, fixed MCU startup issue, and added jQuery source file. 2024-04-22 23:00:21 +02:00
Miroslav Pivovarsky 0eefd45e11 initial commit 2024-04-18 21:55:30 +02:00