Add missing test in pin.h for camera pins to fix compilation warnings

Fix typo in printERROR if no wifi
Add new ESP32 settings to allow more AP detection/connection due to new release restriction
This commit is contained in:
Luc 2022-06-11 16:24:48 +08:00
parent a92ba9267b
commit 4b258c666f
4 changed files with 12 additions and 5 deletions

View File

@ -178,13 +178,13 @@
#define DIRECT_PIN_FEATURE
//TIMESTAMP_FEATURE: set time system
//#define TIMESTAMP_FEATURE
#define TIMESTAMP_FEATURE
//FILESYSTEM_TIMESTAMP_FEATURE: display last write time from Flash files
//#define FILESYSTEM_TIMESTAMP_FEATURE
//FILESYSTEM_TIMESTAMP_FEATURE:display last write time from SD files
//#define SD_TIMESTAMP_FEATURE
#define SD_TIMESTAMP_FEATURE
//MDNS_FEATURE: this feature allow type the name defined
//in web browser by default: http:\\esp8266.local and connect
@ -226,7 +226,7 @@
//#define USE_BOARD_HEADER 1 //CAMERA_MODEL_ESP32_CAM_BOARD /CAMERA_MODEL_ESP32S2_CAM_BOARD
//#define CAMERA_DEVICE_FLIP_VERTICALY //comment to disable
//#define CAMERA_DEVICE_FLIP_HORIZONTALY//comment to disable
#define CUSTOM_CAMERA_NAME "ESP32-CAM"
//#define CUSTOM_CAMERA_NAME "ESP32-CAM"
//Allow remote access by enabling cross origin access

View File

@ -558,7 +558,6 @@ size_t ESP3DOutput::printERROR(const char * s, int code_error)
if (_client == ESP_SCREEN_CLIENT) {
return print(s);
}
_code = code_error;
if (_client == ESP_HTTP_CLIENT) {
#ifdef HTTP_FEATURE
(void)code_error;
@ -571,7 +570,7 @@ size_t ESP3DOutput::printERROR(const char * s, int code_error)
display ="";
}
display += s;
_webserver->send (_code, "text/plain", display.c_str());
_webserver->send (code_error, "text/plain", display.c_str());
_headerSent = true;
_footerSent = true;
return display.length();

View File

@ -50,6 +50,8 @@
#define USE_BOARD_HEADER 0
#endif //USE_BOARD_HEADER
#if defined (CAMERA_DEVICE)
#if CAMERA_DEVICE == CAMERA_MODEL_CUSTOM
#define CAM_LED_PIN 4
#define CAM_PULLUP1 -1
@ -393,6 +395,7 @@
#define PCLK_GPIO_NUM 13
#endif //CAMERA_MODEL_ESP32S3_EYE
#endif //CAMERA_DEVICE
//Pins for the support of SD Card Reader
//-1 means use default pins of your board defined core

View File

@ -176,6 +176,11 @@ bool WiFiConfig::StartSTA()
if(WiFi.isConnected()) {
WiFi.disconnect();
} else {
#if defined (ARDUINO_ARCH_ESP32)
WiFi.setMinSecurity(WIFI_AUTH_WEP);
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);
#endif //ARDUINO_ARCH_ESP32
WiFi.begin();
}
}