Update ESP32 optional brownout disable

This commit is contained in:
Theo Arends 2020-04-18 16:34:29 +02:00
parent 9d838c001c
commit 684b7dc3a4

View File

@ -190,14 +190,14 @@ char web_log[WEB_LOG_SIZE] = {'\0'}; // Web log buffer
void setup(void) void setup(void)
{ {
global_state.data = 3; // Init global state (wifi_down, mqtt_down) to solve possible network issues
#ifdef ESP32 #ifdef ESP32
#ifdef DISABLE_BROWNOUT #ifdef DISABLE_ESP32_BROWNOUT
DisableBrownout(); DisableBrownout(); // Workaround possible weak LDO resulting in brownout detection during Wifi connection
#endif #endif
#endif #endif
global_state.data = 3; // Init global state (wifi_down, mqtt_down) to solve possible network issues
RtcRebootLoad(); RtcRebootLoad();
if (!RtcRebootValid()) { if (!RtcRebootValid()) {
RtcReboot.fast_reboot_count = 0; RtcReboot.fast_reboot_count = 0;