From 9727de63d8d81d9cc6e09a4312c88637f2c42a40 Mon Sep 17 00:00:00 2001 From: jameszah <36938190+jameszah@users.noreply.github.com> Date: Thu, 6 Jan 2022 22:59:20 -0700 Subject: [PATCH] Jan 6 - small updates Jan 6 - small updates - the sd_mmc delete requires a leading "/" and if you use strings to add the slash it needs lots of memory ... - add more time to type in you ssid using wifimanager --- v58/ESP32-CAM-Video-Recorder-junior-58x.ino | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/v58/ESP32-CAM-Video-Recorder-junior-58x.ino b/v58/ESP32-CAM-Video-Recorder-junior-58x.ino index 61e4d9c..a54ba54 100644 --- a/v58/ESP32-CAM-Video-Recorder-junior-58x.ino +++ b/v58/ESP32-CAM-Video-Recorder-junior-58x.ino @@ -1335,11 +1335,11 @@ bool init_wifi() wm.setHostname(devname); //wm.resetSettings(); // for debugging - erase the ssid every time - wm.setConnectTimeout(20); // how long to try to connect for before continuing - wm.setConfigPortalTimeout(30); // auto close configportal after n seconds + wm.setConnectTimeout(30); // how long to try to connect for before continuing + wm.setConfigPortalTimeout(60); // auto close configportal after n seconds // res = wm.autoConnect(); // auto generated AP name from chipid - res = wm.autoConnect("esp32cam-config"); // use the devname defined above, with no password + res = wm.autoConnect("ESP32-CAM"); // use the devname defined above, with no password //res = wm.autoConnect("AutoConnectAP","password"); // password protected ap if (res) { @@ -2000,7 +2000,7 @@ void the_camera_loop (void* pvParameter) { we_are_already_stopped = 0; - delete_old_stuff(); + //delete_old_stuff(); // move to loop avi_start_time = millis(); Serial.printf("\nStart the avi ... at %d\n", avi_start_time); @@ -2116,10 +2116,15 @@ void the_camera_loop (void* pvParameter) { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // loop() - loop runs at low prio, so I had to move it to the task the_camera_loop at higher priority +long next_delete = 1000; void loop() { long run_time = millis() - boot_time; + if ( millis() > next_delete){ + next_delete = millis() + (15 * 60 * 1000); + delete_old_stuff(); + } start_record_2nd_opinion = start_record_1st_opinion; start_record_1st_opinion = digitalRead(12);