Skip to content

Commit db6235f

Browse files
authored
v10.8.4
1 parent ad5408e commit db6235f

File tree

11 files changed

+517
-224
lines changed

11 files changed

+517
-224
lines changed

ESP32-CAM_MJPEG2SD.ino

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
void setup() {
1111
logSetup();
1212
LOG_INF("Selected board %s", CAM_BOARD);
13-
14-
if (!DBG_ON) esp_log_level_set("*", ESP_LOG_ERROR); // show ESP_LOG_ERROR messages during init
1513
// prep storage
1614
if (startStorage()) {
1715
// Load saved user configuration
@@ -34,11 +32,7 @@ void setup() {
3432

3533
// connect network (WiFi or Ethernet per config)
3634
startNetwork();
37-
startWebServer();
38-
39-
if (!DBG_ON) esp_log_level_set("*", ESP_LOG_NONE); // suppress ESP_LOG_ERROR messages
40-
if (strlen(startupFailure)) LOG_WRN("%s", startupFailure);
41-
else {
35+
if (startWebServer()) {
4236
// start rest of services
4337
#ifndef AUXILIARY
4438
startSustainTasks();
@@ -65,7 +59,7 @@ void setup() {
6559
prepTelegram();
6660
#endif
6761
#if INCLUDE_I2C
68-
prepI2C();
62+
prepI2C();
6963
#if INCLUDE_TELEM
7064
prepTelemetry();
7165
#endif
@@ -77,10 +71,10 @@ void setup() {
7771
#if INCLUDE_RTSP
7872
prepRTSP();
7973
#endif
80-
if (!prepRecording()) {
81-
snprintf(startupFailure, SF_LEN, STARTUP_FAIL "Insufficient memory, remove optional features");
82-
LOG_WRN("%s", startupFailure);
83-
}
74+
if (!prepRecording()) {
75+
snprintf(startupFailure, SF_LEN, STARTUP_FAIL "Insufficient memory, remove optional features");
76+
LOG_WRN("%s", startupFailure);
77+
}
8478
#endif
8579
checkMemory();
8680
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The ESP32 cannot support all of the features as it will run out of heap space. F
2929
***This is a complex app and some users are raising issues when the app reports a warning, but this is the app notifying the user that there is an problem with their setup, which only the user can fix. Be aware that some clone boards have different specs to the original, eg PSRAM size. Please only raise issues for actual bugs (ERR messages, unhandled library error or crash). Thanks.
3030
To suggest an improvement or enhancement use Discussions.***
3131

32-
Changes for version 10.8.3:
32+
Changes for version 10.8.4:
3333
* Addition of [Ethernet](#configuration-web-page) network selection instead of Wifi
3434
* Pins added for [`CAMERA_MODEL_Waveshare_ESP32_S3_ETH`](https://www.waveshare.com/wiki/ESP32-S3-ETH)
3535
* Define pins for external W5500 Ethernet controller

appGlobals.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#define INCLUDE_MCPWM false // mcpwm.cpp (BDC motor control). Needs INCLUDE_PERIPH true
7575
#define INCLUDE_RTSP false // rtsp.cpp (RTSP Streaming). Requires additional library: ESP32-RTSPServer
7676
#define INCLUDE_DS18B20 false // if true, requires INCLUDE_PERIPH and additional libraries: OneWire and DallasTemperature
77+
#define INCLUDE_NEW_JPG false // true to use esp_new_jpg library, which must be installed first. Faster but uses more memory
7778
#define INCLUDE_I2C false // periphsI2C.cpp (support for I2C peripherals)
7879

7980
// if INCLUDE_I2C true, set each I2C device used to true
@@ -121,7 +122,7 @@
121122
#define DOT_MAX 50
122123
#define HOSTNAME_GRP 99
123124

124-
#define APP_VER "10.8.3"
125+
#define APP_VER "10.8.4"
125126

126127
#if defined(AUXILIARY)
127128
#define APP_NAME "ESP-CAM_AUX" // max 15 chars
@@ -162,7 +163,7 @@
162163
#define ISCAM // cam specific code in generic cpp files
163164

164165
// to determine if newer data files need to be loaded
165-
#define CFG_VER 33
166+
#define CFG_VER 34
166167

167168
#define AVI_EXT "avi"
168169
#define CSV_EXT "csv"
@@ -412,7 +413,6 @@ extern bool relayMode;
412413
// sensors
413414
extern int pirPin; // if usePir is true
414415
extern int lampPin; // if useLamp is true
415-
extern int wakePin; // if wakeUse is true
416416
extern int lightsPin;
417417
extern bool teleUse;
418418
extern int srtInterval;
@@ -552,22 +552,22 @@ struct frameStruct {
552552
// and update corresponding frameSizeData[] entries in avi.cpp
553553
// https://github.com/espressif/esp32-camera/blob/master/driver/include/sensor.h
554554
const frameStruct frameData[] = {
555-
{"96X96", 96, 96, 30, 1, 1}, // 2MP sensors // PY260
555+
{"96X96", 96, 96, 30, 1, 1}, // 2MP sensors // PY260
556556
{"QQVGA", 160, 120, 30, 1, 1},
557557
{"128X128", 128, 128, 30, 1, 1}, // PY260
558558
{"QCIF", 176, 144, 30, 1, 1},
559559
{"HQVGA", 240, 176, 30, 2, 1},
560560
{"240X240", 240, 240, 30, 2, 1},
561-
{"QVGA", 320, 240, 30, 2, 1}, // PY260
562-
{"320X320", 320, 320, 30, 2, 1}, // PY260
561+
{"QVGA", 320, 240, 30, 2, 1}, // PY260
562+
{"320X320", 320, 320, 30, 2, 1}, // PY260 only
563563
{"CIF", 400, 296, 30, 2, 1},
564564
{"HVGA", 480, 320, 30, 2, 1},
565-
{"VGA", 640, 480, 20, 3, 1}, // PY260
565+
{"VGA", 640, 480, 20, 3, 1}, // PY260
566566
{"SVGA", 800, 600, 20, 3, 1},
567567
{"XGA", 1024, 768, 5, 3, 1},
568-
{"HD", 1280, 720, 5, 3, 1}, // PY260
568+
{"HD", 1280, 720, 5, 3, 1}, // PY260
569569
{"SXGA", 1280, 1024, 5, 3, 1},
570-
{"UXGA", 1600, 1200, 5, 4, 1}, // PY260
570+
{"UXGA", 1600, 1200, 5, 4, 1}, // PY260
571571
{"FHD", 1920, 1080, 5, 3, 1}, // 3MP Sensors only // PY260
572572
{"P_HD", 720, 1280, 5, 3, 1}, //
573573
{"P_3MP", 864, 1536, 5, 3, 1}, //
@@ -576,5 +576,5 @@ const frameStruct frameData[] = {
576576
{"WQXGA", 2560, 1600, 5, 4, 1}, //
577577
{"P_FHD", 1080, 1920, 5, 4, 1}, //
578578
{"QSXGA", 2560, 1920, 4, 4, 1}, //
579-
{"5MP", 2592, 1944, 4, 4, 1} // PY260
579+
{"5MP", 2592, 1944, 4, 4, 1} // PY260 only
580580
};

appSpecific.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ bool updateAppStatus(const char* variable, const char* value, bool fromUser) {
158158
else if (!strcmp(variable, "teleInterval")) srtInterval = intVal;
159159
else if (!strcmp(variable, "wakeUse")) wakeUse = (bool)intVal;
160160
else if (!strcmp(variable, "wakePin")) wakePin = intVal;
161+
else if (!strcmp(variable, "wakeLevel")) wakeLevel = intVal;
161162
#if INCLUDE_MCPWM
162163
else if (!strcmp(variable, "motorRevPin")) motorRevPin = intVal;
163164
else if (!strcmp(variable, "motorFwdPin")) motorFwdPin = intVal;
@@ -699,7 +700,7 @@ void doAppPing() {
699700
#ifndef AUXILIARY
700701
digitalWrite(PWDN_GPIO_NUM, 1); // power down camera
701702
#endif
702-
goToSleep(wakePin, true);
703+
goToSleep(true);
703704
}
704705
#if INCLUDE_PERIPH
705706
if (relayPin && relayMode && !atNight) {
@@ -940,7 +941,8 @@ voltLow~3~3~N~Warning level for low voltage
940941
voltInterval~5~3~N~Voltage check interval (mins)
941942
voltPin~~3~N~ADC Pin used for battery voltage
942943
voltUse~0~3~C~Use Voltage check
943-
wakePin~~3~N~Pin used for to wake app from sleep
944+
wakePin~~3~N~Pin used to wake app from sleep
945+
wakeLevel~1~3~N~Pin level (0,1) to wake app from sleep
944946
wakeUse~0~3~C~Deep sleep app during night
945947
mqtt_active~0~2~C~Mqtt enabled
946948
mqtt_broker~~2~T~Mqtt server ip to connect

globals.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ size_t getFreeStorage();
152152
uint32_t getFrequency();
153153
bool getLocalNTP();
154154
float getNTCcelsius(uint16_t resistance, float oldTemp);
155-
void goToSleep(int wakeupPin, bool deepSleep);
155+
void goToSleep(bool deepSleep);
156156
bool handleWebDav(httpd_req_t* rreq);
157157
void initStatus(int cfgGroup, int delayVal);
158158
void killSocket(int skt = -99);
@@ -198,8 +198,7 @@ float smoothSensor(float latestVal, float smoothedVal, float alpha);
198198
void startOTAtask();
199199
void startSecTimer(bool startTimer);
200200
bool startStorage();
201-
void startWebServer();
202-
bool startWifi(bool firstcall = true);
201+
bool startWebServer();
203202
void stopPing();
204203
void syncToBrowser(uint32_t browserUTC);
205204
bool updateConfigVect(const char* variable, const char* value);
@@ -347,6 +346,8 @@ extern const char* failPageE_html;
347346
extern char startupFailure[];
348347
extern time_t currEpoch;
349348
extern bool RCactive;
349+
extern int wakePin;
350+
extern int wakeLevel;
350351

351352
extern UBaseType_t uxHighWaterMarkArr[];
352353

0 commit comments

Comments
 (0)