[WIFI] Added macros for ESP - WifiGMode and WifiPower to reduce/eliminate Wifi interference on sensors like HC-SR501 (#1531)

* Fix WiFi interference on PIR

* Added to DOCS re: WiFi interference.

* Add sufficx -custom to configs without prod binaries

* Add ESP32 Wifi band and tx power to user_config.h

---------

Co-authored-by: andre <agreylin@gmail.com>
This commit is contained in:
Die Peter Panandandre authored and GitHub committed 2023-03-16 17:50:14 -05:00
1 parent d530841b0e
commit 3b4af96990
4 files changed
+101

No files matched your search

+14
View File
@@ -617,6 +617,20 @@ CRGB leds2[FASTLED_IND_NUM_LEDS];
# define LOG_LEVEL LOG_LEVEL_NOTICE
#endif
/*-------------------ESP32 Wifi band and tx power ---------------------*/
//Certain sensors are sensitive to ESP32 Wifi which can cause interference with their normal operation
//For example it can cause false triggers on a PIR HC-SR501
//It is reccomended to change Wifi BAND to G and reduce tx power level to 11dBm
//Since the WiFi protocol is persisted in the flash of the ESP32 you have to run at least once with `WiFiGMode` defined false to get Band N back.
#ifdef ESP32
# ifndef WifiGMode
//# define WifiGMode true
# endif
# ifndef WifiPower
//# define WifiPower WIFI_POWER_11dBm
# endif
#endif
/*-----------PLACEHOLDERS FOR OLED/LCD DISPLAY--------------*/
// The real definitions are in config_M5.h / config_SSD1306.h
#define pubOled(...) // display the published message onto the OLED display