From ae342f4a326631adf463fadb85f3c919367e0a19 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Sun, 14 Jun 2020 06:57:44 -0500 Subject: [PATCH] Remove auto erase function (#632) * Remove auto erase function * add docs --- docs/use/boards.md | 15 +++++++++++++-- main/main.ino | 3 +-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/use/boards.md b/docs/use/boards.md index 426cd7a..1582c29 100644 --- a/docs/use/boards.md +++ b/docs/use/boards.md @@ -1,6 +1,10 @@ # Boards -## ESP32 +## ESP + +### Erasing the flash + +So as to erase the flash memory on ESP boards you may do a long press to TRIGGER_GPIO button or connect the pin to the ground. ### Low power mode for ESP32 OpenMQTTGateway support a low power mode for ESP32, this mode can be set by MQTT on a barebone ESP32: @@ -56,4 +60,11 @@ OpenMQTTGateway support a low power mode for ESP32, this mode can be set by MQTT `mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoBT/config" -m '{"low_power_mode":2}'` -The low power mode can be changed also with a push to button B when the board is processing (top button on M5stickC and middle button of M5stack). \ No newline at end of file +The low power mode can be changed also with a push to button B when the board is processing (top button on M5stickC and middle button of M5stack). + +### Erasing the flash + +So as to erase the flash memory on M5Stack boards you may do a long press to TRIGGER_GPIO button: +* Button B on M5StickC (GPIO 37) +* Button C on M5Stack (GPIO 37) +* Button lateral on M5stick (GPIO 35) diff --git a/main/main.ino b/main/main.ino index ae6e300..cf8ff49 100644 --- a/main/main.ino +++ b/main/main.ino @@ -655,8 +655,7 @@ void disconnection_handling(int failure_number) { Log.warning(F("disconnection_handling, failed %d times" CR), failure_number); if (failure_number > maxConnectionRetry && !connectedOnce) { # ifndef ESPWifiManualSetup - Log.error(F("Failed connecting 1st time to mqtt, reset wifi manager & erase network credentials" CR)); - setup_wifimanager(true); + Log.error(F("Failed connecting 1st time to mqtt, you should put TRIGGER_GPIO to LOW or erase the flash" CR)); # endif } else if (failure_number <= maxConnectionRetry + ATTEMPTS_BEFORE_BG && connectedOnce) { Log.warning(F("Attempt to reinit wifi: %d" CR), wifiProtocol);